Cycles Volumetric Rendering

I recall reading about a technology known as isosurfaces which, if implemented, would allow Cycles to construct a virtual solid complete with normals from a volume texture or the result of a mix of them. It’s really cool stuff, but this would be a big project that is not likely to happen soon unless someone steps in to develop it.

Look it up on Youtube if you want to know how it works. I believe Farsthary’s original (messy) volumetrics build with his early volume rendering work for BI also had this ability, but almost none of his original code ended up being used.

The great thing about engines that try to simulate real light behavior is that you can kind of look at the real world and see if it’s possible in the engine. In the case of your question though I wonder if you are just asking a purely theoretical question without a real world material in mind.

There is no such thing as a glossy volume, in the real world or in cycles.

In fact there are no glossy surfaces either, or no diffuse surfaces - there are only reflective and transmissive surfaces, of varying roughness. You could go one final step and say there are no surfaces at all, only volumes with densities that vary in characteristic ways, and program one volume shader that will suffice for every single material imaginable (wait, someone’s already done that, right…?) It’s important to understand that every other shader is just a shortcut that assumes some parameters of this theoretical volume shader will contribute so little that they can be safely ignored in order to gain some speed in rendering.

You could translate the concept of roughness to volumes by talking of particle size. A homogenous volume shader (as used in cycles) assumes a particle size that is uniform and infinitesimal, so therefore you could call it ‘glossy’!

Then you could have a heterogenous volume shader with a noise texture and eventually move up to a particle system with small particles that have their own volume properties, embedded in a volume… and you can do it now, in Cycles…

One of these methods is probably what you are looking for. But if you can imagine those very dense, smooth flat particles (glossy) that have shading normals, shrinking to a smaller and smaller size, they become - a homogenous volume. You can’t retain the characteristic of a large particle and still make it infinetsimal if you get what I’m saying.

But I may have misunderstood you entirely, and you know all this and are asking a much more technical question!

Edit:@Ace: Isosurfaces as I understand them are a great way to specify changes in density within a solid, but I don’t see how that would be ‘glossy’…

Actually - I was thinking about my Opal material. Opal has microscopic irregularities in its microscopic structure (close packed spheres). These irregularities reflect and refract light. This the irregularities themselves could be simulated using a volume texture.

The refraction (which causes the different colours) can be simulated using the fresnel or layer weight node based plugged into a colour ramp to attenuate the colour based on viewing angle to give a fairly close approximation - however the reflection is where the volume shader falls down since even dense volume shaders scatter light in a diffuse manner at arbitrary angles.

By utilising the anisotropic property of the volume scattering - its possible to get a reasonable approximation of a glossy specular effect (see images below) - however the current anisotropic only supports forward or backscattering at 0 or 180 degrees (camera, object, lightsource angle) - whereas to simulate the microstructures in opal would require scattering at arbitrary angles.

Thats kinda where my second suggestion above comes in. Could the anisotropic parameter be split into two. Rather than scattering forwards/backwards(180 and 0 degrees)…could it be split into anisotropic scattering strength (say a value between 0 and 1) and anisotropic scattering angle (0 - 180) - which would dictate which angle between the light, object and camera the scattering was strongest.

The following images were produced by putting a volume scatter shader on a plane, setting the density high (50) and the anisotropic value to -0.95 and -1 respectively. A point lamp was then placed between the plane and the camera.



To illustrate my point further. I have applied the following node group to a sphere:


Essentially what this node group is doing is introducing sparse irregular volume regions into the sphere.

I have set the anisotropic value to -0.9 to back scatter most of the light. I then set up a scene with a light source between the sphere and camera.

This is the result if the light source is directly between the camera and sphere (you get bright flashes of light off the irregularities due to the back scattered light)


However - move the light source 45 degrees “off axis” - and the irregularities look dull because they no longer scatter light in the direction of the camera.


If you could set the scattering angle separately to the anisotropic strength - you could have a light source off axis by 45 degrees, but by setting the scattering angle to 45 degrees - you would get an image similar to the first posted above.

Going further - by plugging a texture into the anisotropic angle slot - you could have irregularities which scatter light at random angles - thereby giving you the flashes of light (which can then be coloured) at all viewing angles as seen in Opal.

An example of a real world material that isosurfaces would be good to simulate: foam! Any type of foam. If you look at, say, polyurethane foam (packing foam) it looks diffuse from far away, but up close you see that all of the tiny bubbles that make up the foam have shiny surfaces on the inside which cause the characteristic shiny spots and variegated look. This is possible to fake (badly) using bumpmaps but in general foams (breads, bubbles, etc) are more or less impossible to simulate without isosurfaces. It would be a handy tool to have. I hope someone works on it.


@Moony: wouldn’t a main object with both a Surface and volume shader combined with particles filling the volume using only Surface shader work?

I can’t find fault with this statement, because I think this actually would work (as I have done it myself).

There’s nothing in Blender that would prevent you from using shard particles, or a whole group of them used randomly to create variety.

Testing the volumentrics!
more about that project LINK to the wip


Yep - I have tried such an approach. It does work.

Clouds… What do you think ? :slight_smile:


HD : http://imageshack.com/a/img571/4769/c587.png
1 Like

Look like a snow to me.:stuck_out_tongue:

Great looking snow landscape :slight_smile: Seriously though, it looks more like ice snow than clouds. I couldn´t do better, he he, but as a constructive criticism I would say they just look too solid to be clouds if that helps.

Here’s a simple “cloud tank” just using the noise texture. It has obvious sharp edges, but just scale those out of the camera view and it looks reasonably convincing.


It doesn’t render fast at all though. I haven’t experimented with optimizing it much, so maybe I have some horribly wrong setting. (I hope)

cloudy_sky.blend.zip (96.7 KB)

made this special project to test cycles volumetric rendering, hope you like it (Blend available for download)

wip / download link:

current render


Blend file overview

awesome demo of the volumetrics emirage! very nice colors
(color scheme quite similar to realflow ads :wink: )

great breakdown, thanks for posting:) I can’t wait to see the final result.

volumetric liquid :smiley:

Using volumetric scatter to recreate the tesseract :smiley: Happy Ragnarök day


Just a fast test with mesh particles:
http://i.imgur.com/MWklzcu.gif

I had much better results with metaball particles, but for some reason the displacement was scaled funny in the F12 render. It looked fine in the viewport preview. Everything was at 1.0 for scale, and metaball settings were the same for both render and preview, but still no idea why preview was so different from render. I guess I’ll have to wait to use meta objects with displacement.