Cycles – Nested Refractive Volumes

Software:
Blender 2.79 | Cycles Renderer

When it comes to rendering nested refractive volumes, like a glass containing a beverage, the way to set it up in Cycles is common to many modern ray-tracers.
The touching bodies of refractive material like glass and liquid must overlap each other slightly so that rays being traced “meet” the right surface without having surfaces touching and causing “Z fighting” artifacts.

Transparencies_Air_Bubbles-01

When the render includes volumetric shading, like Volume Absorption (sometimes referred to as “fog”), the meshes must be set-up in a certain way for Cycles to interpret the volumes properly.

Intersecting volumes like a beverage glass and liquid must be separate objects to be rendered correctly. When joined into one mesh the renderer doesn’t treat the different volumes separately even though they have different shaders.
And the result is that the volume (depth) of the inner volume is calculated as just the depth on the intersection (the overlap) of the volumes.
In this example the wine can’t be rendered correctly when the glass and liquid meshes are joined.
The wine liquid doesn’t get it’s deep color because the renderer “thinks” it’s very thin.

Untitled-1.jpg

When the meshes are separated the renderer interprets the wines volume correctly and the Volume Absorption shader produces the right color:

Untitled-2

Setting up cavities within a volume like air bubbles, is similar to many other modern ray-tracers. You just have to create inner meshes that have flipped normals facing inwards, so air bubbles within the wine don’t need to have “air” material, they have the same wine shader, but have their faces flipped.

Note that in this case, it’s the other way around from the previous example.
If the bubble meshes are separate from the liquid mesh the renderer doesn’t interpret them as holes in the liquid volume, and produces an incorrect result:

Untitled-3

When the bubble meshes are joined to the liquid mesh, the volume is interpreted correctly:

Untitled-4.jpg

In short:
For these refractive volumetric effects to be rendered correctly in Cycles,
Surfaces of the same material volume must be joined to one mesh, and separated from meshes belonging to different material volumes.
* This may sound trivial, but it’s not. there are rendering systems in which only the surface shader determines volume interpretation and that has advantages like the convenience to aninate bubbles as separate objects from the liquid itself or the ability to join a glass bottle with the liquid into one mesh model.

 

Related:
> Understanding Transparency Render Settings

Arnold for Maya – Transmission Scattering (Ray Traced SSS)

Software:
Maya 2018 | Arnold 5

Scatter

The Arnold Standard Surface Shader’s Transmission Scattering options can be used for simulating highly realistic volumetrically ray-traced sub-surface-scattering suitable for materials like wax, soap, milk etc.

While the Transmission Depth attribute controls volumetric light absorption within the object (fog), the Scatter attribute controls what percentage of the light will be scattered instead of absorbed, effectively creating the murky effect of semi-transparent materials.

Note that for the scattering effect to work Scatter must have a dominant percentage value, and the Depth attribute must generally be much lower (shallower) than what would create coloring without scattering, otherwise the object will continue to look transparent and lacking the internal substance that we want to simulate.

Also note that the Opaque attribute must be unchecked in the Arnold attributes of the object’s shape node for the light to be able to pass into the mesh and illuminate the volume.
*This is actually a “cheat”, because physical semi-transparency has to be simulated by indirect light calculation or caustics, but for dense volumes like wax it’s very effective and the loss of realism is insignificant.

Untitled-1

Untitled-2.jpg

You can simulate the effect more accurately by rendering caustics,
In that case the Opaque attribute in the Arnold attributes of the object’s shape node must be checked and more steps must be taken allow refractive caustics to be ray-traced.

Note that simulating the effect using caustics will be very demanding in Transmission samples and Ray Depth.

Scatter_Caustics

Related:
>
Understanding Transparency Render Settings
>
Arnold Translucency
> Arnold Refractive Caustics

Reuse volumetric (smoke) simulation data in Blender

Software:
Blender 2.79

  1. Create a smoke simulation
  2. Set the Smoke Cache File Format to OpenVDB.
    * File must be saved for caching to be accessible.
  3. Set the Smoke Cache to External and choose the folder location.
  4. Cache the simulation.
  5. Create a new box object and make sure it has the same proportions as the original Smoke Domain box object.
  6. In the Physics tab, a Smoke Modifier to the new box, and set it to be a Smoke Domain.
    * make sure is has the same Divisions value in Resolution.
  7. For the new Smoke Domain, Set the Smoke Cache File Format to OpenVDB.
  8. For the new Smoke Domain, Set the Smoke Cache to External and choose the same folder location as the cache for the original Smoke Domain.

Untitled-7.jpg