Trinity3D.com
Buy online or call 1-800-548-1578
Home Contact Us Downloads Free Tutorials Animation Production  

 
   

Bookmark and Share  



  VRay Categories   Categories

VRay for 3ds Max
VRay for Max EDU
VRay for Maya
VRay RealTime
VRay for Rhino
VRay for SketchUp
VRay for Cinema4D
Standalone
Bundles
Learn VRay Interiors
Learn VRay Exteriors


Animation Production
Ultra Render Farm
Photosimulation


  VRay Resources   VRay Resources

1. Free VRay Demo
2. Free VRay Tools
3. Free VRay Tutorials
4. VRay Documentation
5. VRay Tips and Tricks
6. VRay Gallery


  VRay Bestsellers   Bestsellers

1. VRay Renderer
2. VRay Bundle
3. VRay Super Bundle
4. VRay Educational
5. Learn VRay Bundle
6. VRay RT


     Special
Gift certificates


     Help

Contact us

800-548-1578 - (US)
816-525-0103 - (International)

email: sales@trinity3d.com


Privacy statement
Terms & Conditions


  What's New   What's New

Archinteriors Bundle

Save Big with Evermotion Bundles

ArchModels, ArchInteriors, and/or ArchExteriors

1. ArchBundles 2-Pack
2. ArchBundles 3-Pack
3. ArchBundles 4-Pack
4. ArchBundles 6-Pack
5. Archinteriors Vol 1 - Vol 5 Bundle
6. Archinteriors Ultra Bundle


     Ballistic

Inspiration Unleashed

Massive Black

Ballistic Publishing Books - Massive Black

d'artiste Digital Painting

Ballistic Publishing Books - Digital Painting

d'artiste Character Modeling

Ballistic Publishing - Character Modeling

d'artiste Character Modeling Vol. 2

Ballistic Publishing - Character Modeling 2

d'artiste Character Modeling Vol. 3

Ballistic Publishing - Character Modeling 3

Expose 7

Ballistic Publishing - Essence the Face


     Newsletter

Subscribe to our Newsletter!

Trinity3D.com Newsletter

Subscribe to our newsletter and receive new product announcements, special sales, coupons and more! Your email address is never shared, is always kept strictly confidential and you can unsubscribe at any time.

Trinity3D.com Newsletter
 

* Your Email Address

 

 


  VRay Home  ::  VRay Documentation Home  ::  VRay Tutorials Home

VRay Tutorials - VRay Rendering Surface Interfaces

Search Keywords: glass, liquid, surface interface

General

In this tutorial we will discuss the rendering of refractive surface interfaces with VRay. 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, VRay 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, VRay 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 VRay.

Initial rendering

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

1.2. Assign VRay 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.

VRay Tutorials - VRay Rendering Surface Interfaces

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.

VRay Tutorials - VRay Rendering Surface Interfaces

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.

VRay Tutorials - VRay Rendering Surface Interfaces

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

VRay Tutorials - VRay Rendering Surface Interfaces

1.11. Render:

VRay Tutorials - VRay Rendering Surface Interfaces

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:

VRay Tutorials - VRay Rendering Surface Interfaces

2.2. Render:

VRay Tutorials - VRay Rendering Surface Interfaces

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:

VRay Tutorials - VRay Rendering Surface Interfaces

2.4. Render:

VRay Tutorials - VRay Rendering Surface Interfaces

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 VRay to consider all photons within the search distance from the shaded point.

VRay Tutorials - VRay Rendering Surface Interfaces

3.5. Render:

VRay Tutorials - VRay Rendering Surface Interfaces

Rendering now takes a little more time, since VRay 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 "VRay properties..." to bring up the VRay Light settings dialog.

3.8. Set the Caustics subdivs to 4000.

VRay Tutorials - VRay Rendering Surface Interfaces

3.9. Render:

VRay Tutorials - VRay Rendering Surface Interfaces

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 QMC.

VRay Tutorials - VRay Rendering Surface Interfaces

3.12. In the QMC 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.

VRay Tutorials - VRay Rendering Surface Interfaces

3.14. Render:

VRay Tutorials - VRay Rendering Surface Interfaces

This is our final image.


  Buy VRay
VRay
Buy VRay - $899
 

Buy VRay (Educational Version) $240


Buy VRay - Bundle $999


Buy VRay - Super Bundle $1135


  

Follow our newsfeed for all latest product updates and discounts

     Your cart
Cart is empty

View cart
Checkout


     Authentication
Username

Password

Log in
Register
Recover password

If you have disabled Javascript in your browser click here


     VRay News

Populate your scenes quickly and professionally with Evermotion's 3D Archmodels!

Evermotion Archmodels Vol. 70

Add top quality props to your scene within minutes. Archmodels provides professional high quality 3D models for your visuals.

Click for more details


     Popular Products

Facebook 

Follow us on Facebook!

Get the latest info on new products and special offers.

Or check out our ebay store - Discounted items


 
 
Trinity Animation Inc.

Pre-Sale and Post Sale Support

Trinity Animation, Inc.

We have years of real world production experience and our knowledgeable staff can provide you the support you need for your pre-sale or post sale questions.


Flat Shipping Available Flat Shipping Available

Only *$9 for national shipping via FedEx Ground
Only **$25 for International shipping via FedEx to most countries

Both shipping options include the following benefits:

  • Tracking Number
  • 3-5 Day Average Arrival Time
  • Guaranteed Arrival

*$9 national shipping includes most packages. Please note however that heavier items such as books require additional shipping charges.

**
$25 covers most countries. You will be contacted prior to shipment if your country is not included within the FedEx International shipping price. Please note that heavier items such as books require additional shipping charges.

International Customers: please be aware that you are responsible for any/all customs, duties, taxes and fees that your country might charge.

Downloadable products do not require shipping and do not incur a shipping charge. 


Learn 3ds Max and VRay From The Pros
ArchInteriors provides finished, top-notch architectural interiors set up for use with VRay to get photo real results. You just load and render! You can dissect the scene file to learn how it was done.
 
Archinteriors Vol. 13 Archinteriors Vol. 14 Archinteriors Vol. 15
Learning VRay - Archinteriors Vol. 13 Learning VRay - Archinteriors Vol. 14 Learning VRay - Archinteriors Vol. 15

Trinity3D.com Newsletter Subscribe to our Newsletter!

Subscribe to our newsletter and receive new product announcements, special sales, coupons and more! Your email address is never shared, is always kept strictly confidential and you can unsubscribe at any time.

 Trinity3D.com Newsletter

* Your Email Address: