Setting up volumes for a glass of water - LuxRender Wiki
Luxrender GPL Physically Based Renderer

Setting up volumes for a glass of water

Personal tools

From LuxRender Wiki

Jump to: navigation, search

Glass of water tutorial.jpg


Setting up volumes for a glass of water

When setting up volumes we specify an interior and exterior volume for the material. In order to find out which is interior and exterior we take a quick look at the normal. Where the normal points, that is the exterior.
Select any mesh object and enter edit mode. Open up the properties panel(N) and toggle on Show Normals. The normal points to the exterior regardless of the shape of the object.

Luxblend sphere normals.jpg


We will be using a glass of water as example. This simple object is all we need to get a hang of volumes. Grab the starter file from here: http://www.luxrender.net/forum/download/file.php?id=25266

The required materials have already been added on the materials tab but they are not yet assigned to their correct faces. Let's do that first. Select the glass material and enter edit mode. Select all faces of the glass and click assign. Select the water material and deselect all faces (A) and select the faces of the water and click assign.
Notice that the faces of the water are overlapping the inside edge of the glass. More on that later.

Glass of water tutorial 01.jpg


In the node editor you should have the material node view already open. On the Material output node we can select the interior and exterior volumes for this water material. But first let's check the normals.

Glass of water tutorial 02.jpg


In the 3D View, open up the properties panel(N) and toggle on Show Normals. The normals are pointing outwards from the water object, and where the normals point that is the exterior. Opposite side of that is the interior so we will select the water volume as interior for these faces. In the node editor pick the water volume as interior on the Material Output node. The exterior for the water is simply air and it can be left blank so LuxRender can use the default world volume for it.

On the material tab select the glass material. The normals for the glass are pointing outwards so that makes its interior the glass volume.

Glass of water tutorial 03.jpg


We can also select a priority for a volume. This is used when volumes are overlapping which is happening right here. This priority tells LuxRender which interior volume it should use when they are overlapping. In this case we want to have glass were the two are overlapping so the glass should have a higher priority than the water. On the World tab select the glass volume.

Glass of water tutorial 04.jpg


In the node editor switch to the volume node view and select 1 as priority for the glass volume.

Glass of water tutorial 05.jpg


And that is it. For the three remaining glasses you could assign the right faces to the right material and then render.


Glass of water tutorial.jpg