Vray Tutorials |
|
|
| |
Please don't translate or copy these tutorials elsewhere. I don't like the tutorials to float around in 10 different versions and places on the net. Feel free to link to this page of course! (see also Terms of Use)
|
|
|
| Back to Vray tutorials page |
Rendering a glass filled with liquid |
| Page 1 - Page 2 |
| |
Before you start
If you discovered this Vray tutorial page through a direct link or search engine, please note that you're on page 2 of the tutorial! Please complete page 1 first if you haven't done so. |
|
12. Red wine
Copy the water material and name it 'red wine'. Change the fog colour to a saturated red, and turn down the multiplier to 0.05. This will tint refractions red. Apply the wine material to the water. Render to see the effect.
Experiment with different colors and multipliers to create other liquids too.
Of course you can do the same thing with the glass material, to create a colored glass. |

 |
13. Expand the scene
To give the scene a more interesting look, we will copy the glass and put it on the floor like as if it was tipped over.
So select the glass model and copy it, rotate it and position it like I did.
Change the output render size to 430*480px. |
 |
14. Roll the camera
With the rotate tool, roll the camera -8 degrees. Also move it to create a better composition. Render the scene, it should look like this. |
 |
15. Smaller Vraylight
The shadows are very dim because our area light is so big. We will adjust the Vraylight, make it smaller and reposition it. You can see in the screenshot how I placed it. It's not only smaller but also placed further away.
U-size= 250mm and V-size=300
Light multiplier is set to 22. It's much higher because the area of the light is smaller.
Also change the sky multiplier (Vray environment settings) to 0.15 instead of 0.4. This way, the environment lighting will not brighten up the shadow regions as much as before. |
 |
16. Nice caustics
This smaller light will also result in more noticable caustics.
Remember my rambling about GI caustics on page 2 of the materials settings tutorial? Well, here we will use them again.
First render the scene with the new light settings. It should look like my example. Notice the shadows that are much more visible now. The smaller the lightsource, the sharper the shadows.
|
 |
17. No GI caustics
In the GI settings, turn of refractive GI caustics. You will clearly see that shadows get darker. No light is able to pass trough the transparent materials.
This is just a reminder to show you the effect of GI caustics.
Turn the refractive GI caustics back on.
I usually don't use reflective GI caustics, because they do more bad than good in most cases. Refractive ones are way more important as you can see from this example. |
 |
18. Sharper caustics
Because the shadow and caustics quality is controlled completely by the IR map settings, we will fine tune them.
Note that shadows are created by the IR map because we have 'store with IR map' in the Vraylight turned on. So our Vraylight doesn't cast direct light but GI light for the moment.
Open the Irradiance map rollout and make the following changes:
Min/max=-4/-1
Hsph subdivs= 35
There will be less undersampling, and sample quality is increased because of more hsph subdivs.
Turn on 'show calc fase' so you can watch the progress of the IR map calculation. This will speed up the rendering psychologically :-)
As you can see, the caustics are already sharper. |
 |
19. High quality GI settings
If you want a better GI solutions to increase caustics and shadow quality even more, you have a few options.
First is to increase min/max settings, to for example -2/1. For low resolutions like this, -2/1 is really high quality, don't go higher or you will loose the benefit of the undersampling.
You can also increase the hsph subdivs. This will calculate each taken sample better.
The clr threshold is also important, going from 0.4 to 0.3 will have a huge effect, but also on rendertimes... The dist threshold can be usefull here too (more samples where objects are close to each other, important for region under the foot of the glass)
So what settings are the best? A bit of everything :-)
The min max settings have the biggest impact. For this rendering I used the following IR map settings:
- min/max=-3/1
- Hsph subdivs= 40
- clr=0.35
- nrm=0.4
- dist=0.25
The caustics (especially these under the glass that lies down, look at the foot area) are much better now. But rendertime increased a lot... Usually you don't need this high settings, because no client will ever see the difference...
Note that the max setting of +1 is only used as long as the resolution stays at 430*480.
For resolutions from 640 to 800px, use -3/0 as the highest settings (-4/-1 for 1280 to 1600 etc...). I will explain the irradiance map behavior in another tutorial. |
 |
20. Store with IR map option
As you can see, we need very high IR map settings to make sure shadows and caustics will be calculated accuratly.
As I said before, the shadow quality depends on IR map settings because of the 'store with IR map' option in the Vray light, treating the light as GI light instead of direct light.
By turning this option off, shadows will be raytraced, which results in very high quality. Rendertimes will be higher, but since quality now almost completely depend on the subdivs of the light, we can use lower IR map settings! So IR map calculation will speed up, and the actual rendering pass will slow down, resulting in +- the same overall rendertime, but better shadow detail.
When you use raytraced area shadows, note that the GI caustics will still be calculated by the IR map settings (the Vraylight is the only light being able to produce direct light AND GI caustics at the same time, making it an ideal light for product renderings). So we can't go too low on these settings or else the caustics will loose too much of their quality.
Turn off the 'store with IR map' option in the Vraylight, and set the subdivs to 30.
Go to the IR map settings and change min/max to -4/-1, and hsph subdivs to 35.
Render the image, look at the process. Note that during IR map calculation, everything looks darker, because the Vraylight doesn't cast GI light anymore. This IR map pass will go pretty fast, but the actual rendering pass will go slow because the direct light (and area shadows) need to be computed now also...
The result is very pleasing. Caustics are a bit less detailed, but this is compensated by the raytraced area shadows. |
 |
21. Final image
We will now render the image at a higher resolution.
Set the render output to 717*800px.
We want the same GI quality as in the previous image, but since the IR map settings are resolution dependant, we will need to make a small change. We kinda doubled the render resolution, so in order to have the same GI quality, you only need to lower both the min and max setting by 1. So set these at -5/-2. The tresholds and hsph subdivs are not resolution dependant so leave them at their current values.
To get rid of the last noise in the shadows and anti aliasing, go to the QMC sampler rollout and change the noise threshold to 0.002.
Render the image!
Click the image on the right to see the high resolution version. |
 |
| |
| Page 1 - Page 2 |
| Back to Vray tutorials page |