Volume rendering?


#1

Hello,

About this time last year I asked about volume rendering support for participating media. You said then that it was a high priority feature, and now I see that there was a GSoC project to add it, and there are lots of source files with ‘Volume’ in the name…

Does this mean that volume rendering is now ready to use? I don’t see any demo pictures — does anyone have a .appleseed file demonstrating it which I can try?

My particular interests are clouds and rendering planetary atmospheres (both from above and below).

Thanks!


#2

Hi David,

Indeed, Artem, one of our GSoC 2017 student, implemented a big part of the volume rendering infrastructure in appleseed.

As of version 1.8.1, appleseed supports homogeneous volumes, with single and multiple scattering, and we are currently testing a new Random Walk BSSRDF model that makes use of the same infrastructure. appleseed also implements advanced volumetric sampling.

The big missing pieces right now are support for heterogenous volumes, support for OpenVDB, and exposing volumes to OSL.

We posted a sample scene in the release notes for appleseed 1.8.0, here it is:

You can download this scene from the Download page.

The next version of our Blender plugin (blenderseed 0.8.0) will expose the volume functionalities if you’re interested in giving it a try.


#3

That’s great! Is Rayleigh scattering implemented (for planetary atmospheres)? And is there any documentation on how to use it?

I don’t use GUI tools for this, so would need to know how to do this from XML.


#4

Look! :

I’ve made some test with the volume shader.

Look at that subtle orange tint where light ends, like a sunset.


#5

While this is very cool, we need to think of how to provide physically-based Rayleigh/Mie scattering.

I’d love for @luis to chime in since he’s interested in planetary rendering.


#6

Looks good — the reddening at the limbs is great. No Rayleigh or Mie support is a shame, though.

I know that Mitsuba has both and is a physically based renderer, but apparently it’s not right; Tungsten has a corrected version, allegedly somewhere in https://github.com/tunabrain/tungsten/tree/master/src/core/media, but I don’t understand a word of it…


#7

Hi

We have this in the TODO list actually, Rayleight & Mie scattering, physical measurements of atmospheric scattering to render physically correct atmospheres (not only Earth, we wanted to test this with Mars data as well).
If you have some urgency, there is around a OSL implementation of the Nichita atmospheric model that allows you to specify an altitude as well

For the time being, until we finish the volume work and exposing it to OSL, this might the best, though i haven’t tested this particular shader.
I can guarantee you that we’re heading to full physically correct spectral rendering of atmospheres however.


#8

I think I’ve seen the technology behind that link before — it works well for skyboxes but I’m going to want to look down at the atmosphere as well as up. Here’s a Povray picture demonstrating:

(That’s the western limb of the moon with nearside on the right. Mare Imbrium is top right.)

OSL volume integration sounds great. The atmosphere in the image above uses Povray’s built-in Rayleigh/Mie scattering, but there’s a custom Povray ‘shader’ which acts a density function for the heterogeneous volume object; I’d love to be able to do something similar with OSL. I also experimented with procedural clouds in Povray, using a similar density function to provide turbulence in a different scattering layer, but it was achingly slow and worked quite badly due to Povray limitations (it doesn’t like having overlapping volume objects).

How do the existing Appleseed volumes work?


#9

Hi, David

Appleseed started to implement volumes last summer and the work is still in progress. Let me clarify what was done in appleseed regarding to volumes and what features are still missing!

So, at first, what was done. During GSoC our goal was to introduce homogeneous volumes to appleseed and make them work robustly with different lighting setup. Basically, you now can fill any object with volume of certain constant properties (just like you can assign any material to the object). Homogeneous means that all media inside the object has the uniform density. A lot of effort was taken to carefully provide importance sampling for lights, so now it is possible to place lights not just outside the volumes, but also inside without having much of noise. At the end, we have a good support for rendering foggy scenes with complex illumination.

Also, we provide two phase functions: Isotropic (for sky and other media with small particles) and Henyey-Greenstein (for clouds and fog).

Finally, for the next release we are preparing new random-walk SSS, which combines volume rendering approach with subsurface scattering.

Now, what is yet to be done:

Firstly, we haven’t yet exposed our volumes in Maya and 3ds max. Neither have we OSL Volume Shaders support.

Secondly, it is important to implement rendering of volumes with various density, because this obviously covers a lot more use cases (like smoke and clouds). It is a big task and we are not sure if it is possible for us to finish this in the next couple of releases.

In you case, it seems that lacking of non-homogeneous volume is an issue, since this is necessary for clouds (otherwise you can make only cloud-like objects like the bunny above), and it is also necessary for smooth atmosphere gradient. Here I performed a quick test with two interleaving spheres, where the larger one is volumetric:

atmosphere

Unfortunately, you can easily see the border of the atmosphere.

Thirdly, we don’t really support intersecting/interleaving volumes in a sense that our volumes have priorities and the one with higher priority always replaces the one with lower priority. (if you have a cloud in airy atmosphere, air properties are ignored in favor of cloud properties).

No Rayleigh or Mie support is a shame, though.

Thank you for pointing it out! Well, Rayleigh/Mie scattering model is mostly implemented in our renderer, and if you set up the values properly, you can get very realistic atmosphere material. Currently, we approximate “Rayleigh” case of the Mie equations (i.e. media with small particles) with Isotropic phase function, while “Mie” case (large particles) is very well approximated by Henyey-Greenstein phase function with large anisotropic factor.

However, your post initiated a discussion in our team and it seems that it is worth to implement also Rayleigh phase function which describes Rayleigh scattering more accurately. Also, we need to support mixing of these two functions to get physically correct atmospheres. (now you can only choose between Isotropic and Henyey-Greenstein).

We are striving to bring volumes to the same high level of quality as the rest of our renderer, but this is a vast amount of work! We are really thankful for the discussion (it helps us to clearly understand what to do) and hope you will not lose your interest in appleseed!


#10

Awesome summary of the state of volume rendering in appleseed, thanks!


#11

For planetary atmospheres, homogeneous volumes may do fine — I can create a series of nested spheres, each one with a different density and with a lower priority than the one below. If they’re placed intelligently, it should look like a smooth transition.

For clouds, yes, heterogeneous volumes would be necessary, but as I don’t have procedural clouds working in anything yet I’m willing to do without these.

I’d like to give this a try; do you have a .appleseed scene for the sample image above which I can play with?


#12

Here you go:

atmosphere.zip (165.1 KB)

Sorry for the odd format. I compressed it firstly to .appleseedz, and than to .zip, because I cannot attach .appleseedz files to this forum directly.


#13

Thanks — I’ll take a look. (It’ll have to wait until next week because right now I’m travelling and all my devices are ARM based.)


#14

Should be fixed!


#15

Should be fixed!

Thanks!

Thanks — I’ll take a look.

Please, let us know how it is going =)