About Us   Contact Us   0.0.0
World Origin
Home V-Ray for Revit V-Ray for Unreal V-Ray for MODO V-Ray for SketchUp V-Ray for 3ds Max / Design V-Ray for Maya V-Ray for Rhino V-Ray for Cinema 4D V-Ray for NUKE Learn V-Ray

 Subscribe to our V-Ray News Feed

Categories Categories
V-Ray for Revit
V-Ray for Unreal
(Coming Soon)
V-Ray for MODO
V-Ray for SketchUp
V-Ray for 3ds Max
V-Ray for Maya
V-Ray for Rhino
V-Ray for Cinema 4D
V-Ray for NUKE
V-Ray for Blender
V-Ray Materials
Learn V-Ray

V-Ray Showcase
V-Ray Gallery
V-Ray Tutorials
V-Ray Manuals
V-Ray Artist Spotlight

Product Select Product Select
Universal V-Ray 3.0 Render Nodes
V-Ray for Revit
Free V-Ray for Revit Demo / Trial
V-Ray 3.5 for MODO
V-Ray 3.6 for 3ds Max
Free V-Ray for 3ds Max / Design Demo / Trial
V-Ray for 3ds Max / Design Academic University Bundle
Phoenix FD for 3ds Max
AutoGrass for V-Ray
V-Ray 3.6 for Maya
Free V-Ray for Maya Demo / Trial
V-Ray for Maya Academic University Bundle
Phoenix FD for Maya
V-Ray 3 for SketchUp (Win)
Free V-Ray for SketchUp Demo / Trial (Win)
V-Ray 3 for SketchUp Mac OS X
Free V-Ray for SketchUp Demo / Trial (Mac OS X)
V-Ray for SketchUp Academic University Bundle
Skatter for SketchUp
V-Ray 3 for Rhino
Free V-Ray for Rhino Demo / Trial
V-Ray 3 for Rhino Academic University Bundle
V-Ray 3.4 for C4D

V-Ray Resources V-Ray Resources
Free V-Ray Demo
Free V-Ray Tools

Help Help
V-Ray Product Support
Contact us
Retrieve Account Information
Privacy statement
Terms & Conditions

Payment Options Payment Options
Visa Accepted
MasterCard Accepted
Discover/Novus Accepted
American Express Accepted
PayPal Accepted
Official PayPal Seal

VRay.com - Your source for all things VRay  ::  VRay for 3ds Max  ::  Tutorials  ::  Rendering Surface Interfaces

VRay for 3ds Max Tutorials

VRay for 3ds Max Tutorials

Rendering Surface Interfaces

Initial rendering
Rendering the liquid
Final rendering

Search Keywords: glass, liquid, surface interface


In this tutorial we will discuss the rendering of refractive surface interfaces with V-Ray. A typical example of this is the rendering of a liquid in a glass container. The problem is that we have two separate objects, which share the exact same surface boundary.

From a modeling point of view, it is very difficult to ensure that the two objects have the exact same boundary geometry. While this can be achieved (although with difficulty) for static scenes, things become very problematic in animation.

From a rendering point of view, if the two surfaces match exactly, the renderer cannot distinguish between them accurately, which may lead to errors in the rendering.

Considering these two issues, it is obvious that we will need to separate the surfaces, or to model the surface interface separately. We have the following three options:

  • The liquid and the container do not touch and have a gap between them. This approach is simple to implement and does not require any special support from the renderer. However, it does not produce a reallistic result. This is because the gap between the two surfaces changes the rendering drastically and makes the liquid look like a solid block.


  • The liquid overlaps the container. This approach potentially produces much more realistic results, but it requires special support from the renderer. This is because the renderer must keep track of which surfaces have been intersected along a ray path, so that it can compute the correct index of refraction. Without this built-in support, this method cannot be used. Luckily, V-Ray supports the necessary framework for this, which makes this approach the preferred one.


  • The third approach is to model the interface separately. In general, this is difficult to implement - especially in animations. Further on, with this approach introduces a third object in the scene with a separate material, which makes things more complicated. Also, it will not work very well with things like fog in the glass - since in that case, V-Ray cannot make the connection between the glass/liquid material, and the surface interface material, and cannot apply the correct fogging value.

Below, we will discuss the first two methods only; the third method is more difficult and we do not recommend it with V-Ray.

Initial rendering

1.1. Open the starting scene, which can be found here.

1.2. Assign V-Ray as the current renderer.

1.3. To make the previews of the scene faster, go to the Image sampler rollout and set the Image sampler type to Fixed.

Next, we want to get some fast GI:

1.4. In the Indirect illumination rollout, turn GI on and set both the Primary and Secondary GI engines to Light cache.

1.5. Turn off the Refractive GI caustics. We will add photon-mapped caustics later on for the final image.

1.6. In the Light cache rollout, set the light cache Sample size to 0.04 for less noisy light cache samples.

1.7. Set the light cache Filter mode to Fixed and set the Filter size to 0.08 since we will display the light cache directly.

1.8. Turn off the Store direct light option for the light cache, since we want to compute direct lighting separately.

1.9. Set the light cache Subdivs to 500.

1.10. Optionally, turn on the frame stamp from the System rollout.

1.11. Render:

This shows the container that we will fill with liquid in the next section.

Rendering the liquid

Now that we have the container, we have to add the liquid.

2.1. Unhide the "liquid inside" object. If you look at the from the Front viewport, you will notice that the object is slightly inside the glass container, without touching it:

2.2. Render:

Although the distance between the container and the liquid is really small, the rendering does not look realistic - it looks like we have a glass with a solid block inside it. To avoid this, we will make the liquid to overlap the container a little bit.

2.3. Hide the "liquid inside" object and unhide the "liquid overlapped" object. In the Front viewport you can notice that this object overlaps the container a little bit:

2.4. Render:

Now it looks a lot better; the liquid really seems to be touching the glass.

Final rendering

For the final rendering we would like to improve the antialiasing, and to add some caustics.

3.1. Turn Caustics on from the Caustics rollout.

3.2. Set the Max. density to 0.2 - we want to limit the caustics photon density, since this allows us to shoot more caustics photons for a smoother caustics effect.

3.3. Set the Search distance to 2.0. Typically values of 5 to 10 times the Max. density parameter work well.

3.4. Set the Max. photons parameter to 0 - this will cause V-Ray to consider all photons within the search distance from the shaded point.

3.5. Render:

Rendering now takes a little more time, since V-Ray needs to compute the caustics as well.
We have caustics now, but they appear quite noisy. We can reduce the noise by increasing the Caustics subdivs for the light.

3.6. Select the VRayLight object.

3.7. Right-click in the viewport and select "V-Ray properties..." to bring up the V-Ray Light settings dialog.

3.8. Set the Caustics subdivs to 4000.

3.9. Render:

Caustics look better now and these are the settings that we will use for the final rendering. If you want even smoother caustics, further increase the Caustics subdivs of the light and/or increase the Search distance parameter.

3.10. In order to avoid recomputing the caustics every time for the next renderings, save the caustics photon map to file, set the Caustics mode to From file, and select the saved caustics map with the Browse button.

Now we need to improve the antialiasing and to reduce the noise from the area light.

3.11. In the Image sampler rollout, set the Image sampler type to Adaptive DMC.

3.12. In the DMC Sampler rollout, set the Noise threshold to 0.002.

3.13. Set the Global subdivs multiplier to 8.0 - this will reduce the noise from the area light.

3.14. Render:

This is our final image.

V-Ray 3.5 for 3ds Max

V-Ray 3.5 for 3ds Max Now Available

V-Ray 3.5 for 3ds Max is a complete lighting and shading solution that can be flawlessly integrated in every 3D artist and designer's workflow. The flagship rendering software has set the industry standard for speed, reliability, ease of use and render quality.

Learn V-Ray

Learn V-Ray

Learn V-Ray

Learn V-Ray

V-Ray Newsletter

V-Ray Newsletter
Renderings by Dennis Brunn

Subscribe to our V-Ray Newsletter

Subscribe to our V-Ray Newsletter and receive new V-Ray product announcements, special sales, tutorial updates and more!

Brought to you by Visual Dynamics LLC.

  Your email address is never shared and is always kept strictly confidential. Each newsletter that we send always has a single click unsubscribe link so that you can unsubscribe at any time if you decide that you wish to do so.

*  Your email address:
*  Enter the security code shown:

Your cart Your cart
View cart
Wish list
Orders history

News News

Monday, August 28, 2017

Corona Renderer Now Available

Corona Renderer is now part of the V-Ray family

Corona Renderer

Click here for more information

Your e-mail:

Type the characters you see in the picture. (If you do not see any picture here, please enable images in your web browser options and refresh this page):

Get a different code


MultiScatter V-Ray Training

Learn V-Ray

Create photo-realistic renders and learn V-Ray like a real DSLR camera.

From the basics to advanced, the 5-Step Render Workflow (5SRW) V-Ray course provides 50 V-Ray lessons that include easy to follow videos, concepts and exercises.

V-Ray Online Training - Rendering by Heba Aboelenen
Rendering by Heba Aboelenen

V-Ray Online Training - Rendering by Monica Pelser
Rendering by Monica Pelser

V-Ray Online Training - Rendering by Ruben Barrera
Rendering by Ruben Barrera

The online course walks you through the following steps:

1: Framing
2: Light Balance
3: Materials
4: Final Render
5: Post Production

Click here for more information

Corona Renderer Now Available

VRay.com is a service of Visual Dynamics LLC Copyright 2016 VRay.com - Your source for all things V-Ray