Sketchup-Ur-Space

Modeling a pool in SketchUp

Glare Technologies

In this tutorial I will show how to model a simple swimming pool in SketchUp and Indigo, with nice caustics at the bottom of the pool. This is what we will be making:

Modelling a pool in SketchUp

Model the pool ground and walls

Create a quad like so:

Modelling a pool in SketchUp

Create a rectangle in the middle of the quad:

Modelling a pool in SketchUp

Using the Push/Pull tool, push the middle down to create the pool recess:

Modelling a pool in SketchUp

Create the water volume

Create a cuboidal volume for the pool water. It needs to be somewhat larger than the pool recess along all axes.

Modelling a pool in SketchUp

Modelling a pool in SketchUp

Create the water material

Create a new SketchUp material called 'water' or similar.

Set the opacity to something around 50% to make sure the water material is transparent.

Modelling a pool in SketchUp

Apply the material to all faces of the water volume.

Modelling a pool in SketchUp

Move the water volume into place

Move the water volume into place with the move tool. The sides of the water volume should extend past the pool recess like so:

Modelling a pool in SketchUp

Finishing the water material

We need to set a couple of settings in the water material - some absorption to give the water a blue/green tint, and some displacement, to create the water ripples.

Open the SkIndigo material editor, and make sure the 'water' material is selected.

Change the material type to 'specular':

Modelling a pool in SketchUp

Change the Absorption type to 'none'.

Modelling a pool in SketchUp

Click the dotted button to the right of 'Absorption'.

Set the RGB absorption to R: 0.2, G: 0.12, B: 0.1:

Modelling a pool in SketchUp

Now we need to create the displacement shader.

Check the 'Displace' checkbox in the SkIndigo material editor,and set the type to 'Shader'.

Now click on the dotted button to the right of 'Displace'.

Paste the following shader code in to the shader editor:

def eval() real :

fbm(posOS() * 2.0, 2) * 0.02

Like so:

Modelling a pool in SketchUp

What this shader does is displace the water surface by up to 2 cm (0.02 m), based on some pseudo-random noise (fbm) based on the object-space position (posOS).

If you want to make the ripples higher, you an increase the 0.02 number.

If you want to make the ripples more closely spaced, you can increase the 2.0 number.

Setting subdivision on the water volume

We want to make sure that only the water volume mesh gets subdivided.

To do this, first make sure the entire water volume object is fully selected by triple-clicking on it:

Modelling a pool in SketchUp

Now right click on it, and choose 'Make Group'.

Now double-click on the group to select it. This should grey everything else out:

Modelling a pool in SketchUp

Now right click on the pool volume and choose 'Edit Active Mesh' from near the bottom of the menu. It should say something like 'Group#1 (6 faces)' at the top of the SkIndigo Mesh Settings dialog.

Set 'Max Subdivisions' to 8. This will turn each original quad face into 4^8 = 65536 subdivided faces.

Also un-check the 'View Dependent' checkbox, and set 'Curvature Threshold' to zero:

Modelling a pool in SketchUp

Make the final render

First off, we have to change the render mode to Bidirectional with MLT:

This is very important as it's the most efficient mode for rendering these kind of caustics.

Modelling a pool in SketchUp

Position the camera above the pool, then press the 'Render in Indigo' button.

After a while, you should get an image like this:

Modelling a pool in SketchUp

You may have to be a little patient waiting for the render - even with bidirectional MLT, it can still take a while.

You can download the SketchUp scene (.skp) file here.

Glare Technologies - www.indigorenderer.com