Creating materials for a swimming pool scene
From LuxRender Wiki
Creating materials for a swimming pool scene
Here we are going to look at creating some good looking water, but also check out the very cool bricks texture that LuxRender has and some wood as well. Directions will be given using Blender + LuxBlend, but the same settings should apply to any exporter for LuxRender. Colors will be given in RGB format, so the following image would be represented as '0.205 0.338 0.213'.
The water material will be created using measured data from actual water. Yes, LuxRender can use that. Isn't that cool?
First of all, grab the starter file from here. This contains the .blend file and also the .dae file(for you non-Blender users). Both contains the same geometry. The only difference is that the .blend file does not have the modifiers applied. Extract the zip and open the one that seems most familiar to you. Secondly grab the water data file from here and save it in same folder as the .blend and .dae files.
Let's begin with the good stuff. Select the water surface object. If you are new to LuxRender, Lux only needs to know when a light ray enters and exits a volume. In this case it can only enter and exit the volume(the water) at the surface. The swimming pool walls keep the light ray inside the water, bouncing around, until it exits at the surface. There is no need to model the rest of the water geometry.
On the Material tab, add a new material, name it 'pool water surface', and choose Glass2 as material type. Head over to the textures tab. Here we are going to add the texture that uses the measured data from real water. Add a texture and name it 'water absorption data'. Choose LuxRender type: Emission And Spectrum Textures -> Tabulated Data. Then choose the file 'pope97.dat' which you downloaded earlier. If we open this file in a text editor we see a bunch of numbers. Most important is this part : absorption (1/cm). The data in this file is presented in centimeters. LuxRender uses meters, so we need to scale the texture later by 100 to get correct result. 1cm = 0.01m.
Head over to the World tab and add a new volume. Name it 'Water' and choose type 'Clear'. Pick 'Water (20 C)' preset as IOR.
Go back to the Material tab. Now we are going to choose the volume for the water. In this case it's easy, but let's go through it anyway since it's good practice. In edit mode and 'show normals' enabled, we can see that the normals are pointing outwards, away from the volume, which is correct. So, back in the Material tab, select 'water' as the interior. This 'water' volume is the one we created earlier in the World tab. Exterior can be blank in this case, since LuxRender will create a default World volume if we don't define it ourselves.
The volumes have shown up below, so click the 'T' (texture) next to 'absorption' and select 'water absorption data'. The data was in centimeter format so we need to change the absorption scale to 100 as mentioned earlier. Leave 'M' unselected.
Select the pool object and add a new glossy material for it in the Material tab. On the Textures tab add five new textures: 'pool brick mod noise', 'pool brick mod diffuse', 'pool diffuse', 'pool bump' and 'pool roughness'. Enter settings as shown below.
The 'pool diffuse' texture uses '0.73 0.73 0.73' as 'Brick texture' color and '0.48 0.48 0.48' as 'Mortar texture' color.
Back at the Material tab and in the Glossy Material section, enable 'T' (Texture) next to Diffuse color and pick 'pool diffuse'. Next enable 'T' for the roughness and pick the 'pool roughness' texture. Also enable 'T' next to bump map and pick the 'pool bump' texture and change bump amount to like 5mm (0.005).
Select the ladder and in the Material tab add a new material, select Material Type 'Metal 2', and further down Metal Type 'Custom Color'. Pick the reflection color '0.5 0.5 0.5'. Roughness 0.01. Rename the material to 'ladder'.
Here we will pick something simple because it's far away in the scene and it's mostly there to provide shadows. Select the umbrella and add a new material in the the Material tab, call it 'umbrella part 1'. Material type 'Glossy', pick a diffuse color something like '0.20 0.16 0.12'. Roughness 0.2. Enter edit mode and select only the faces on the base cement thing. Add a new material 'umbrella part 2', material type 'Matte', diffuse color '0.2 0.2 0.2', sigma 20. Assign that material to the cement. Exit edit mode. Add the same material to the second umbrella.
The wood for the sun chairs will be of type alder. Select one of the chairs and add a new material 'sun chair wood alder' and Material Type: Glossy. Move over to the Textures tab and add six new textures named 'wood alder part 1', 'wood alder diffuse 1', 'wood alder part 2', 'wood alder mix', 'wood alder part 3' and 'wood alder diffuse 2'. Enter settings for each texture as shown below.
Back at the Material tab, select the 'wood alder diffuse 2' texture for the diffuse texture. Select a light orange color '0.64 0.53 0.44' and enable 'M'. This will multiply the texture with the orange color making it a little darker and more orange. If 'M' is unselected LuxRender will only use the texture and ignore the color picker. Choose roughness: 0.05. Add the same material to the other chairs.
Select the wall and add a new material, Material type: Glossy. On the Textures tab, add three new textures: 'wall brick mod noise', 'wall brick mod diffuse' and 'wall diffuse'. Enter settings as shown below.
The 'wall diffuse' texture uses '0.64 0.64 0.64' as 'Brick texture' color and '0.1 0.1 0.1' as 'Mortar texture' color.
The 'Wall brick mod diffuse' texture will make the colors of the bricks different from each other. How much will depend on the color and pattern of the modulation texture. Back on the Material tab pick 'wall diffuse' in the diffuse color slot, and change roughness to 0.2 .
Select the ground object and add a new glossy material for it. On the textures tab, add seven textures: 'ground brick mod noise', ground brick mod diffuse', 'ground diffuse', 'ground bump 1', 'ground bump 2', 'ground bump' and 'ground roughness'. Enter settings as shown below.
Return to the Material tab and select 'ground diffuse' in the diffuse color slot. Select 'ground bump' as bump map and amount 5mm (0.005). For roughness enable 'T' (Texture) and pick 'ground roughness'. Roughness amount does not matter as long as 'M' is not enabled, keep it disabled.
The pool edge object will share some textures with the ground object, to get the same color variation for the bricks. Select pool edge object and add a new glossy material. On the textures tab, add 'ground brick mod noise' and 'ground brick mod diffuse' which were created earlier for the ground object. Then add five new textures: 'pool edge diffuse', 'pool edge bump 1', 'pool edge bump 2', 'pool edge bump' and 'pool edge roughness'. Enter settings as shown below.
Some textures needed to be moved in X and Y to line up with the geometry.
Back at the Material tab, pick 'pool edge bump' as bump map and amount 4mm (0.004). Pick 'pool edge diffuse' in diffuse color texture slot and 'pool edge roughness' in the roughness texture slot.
That was it. Render this now and you should get something like the image on top of this page.
The water material was mostly based on Lord CRC's post on Partialgeek.net and the water data was obtained from http://omlc.ogi.edu/spectra/water/abs/