Using VEX Shaders in Houdini - Creating an Underwater Scene

Page 6

 

 

 

 

Adding the Caustic light

So far you have set up the scene in underwater.hip, created a ground plane and assigned VEX shaders to it.

This part describes installing and applying the caustic light shader that will reproduce dapple light effects on the ground plane.






Install the existing caustic light shader

1. Copy jw_causticlight.ds to $HOME/shop/light.

2. Copy jw_causticlight.vex to $HOME/vex/light.

*If these directories don't exist then create them.

Edit the SHOPlight file

1. Open the SHOPlight file in $HOME/houdini/shop with a text editor.
If you don't have a SHOPlight file in $HOME/houidni/shop then create one using a text editor and name it SHOPlight.

2. If the file is empty or new then add: include $HFS/houdini/shop/SHOPlight

3. Add: v_causticlight shop/light/jw_causticlight.ds -label "VEX JW Caustic Light"

4. Save and close the SHOPlight file.
If your text editor saves the file with an extension then remove the extension. ie. SHOPlight.txt should be SHOPlight.

Adding the light

1. Launch underwater.hip file with the ground plane that you created previously.

2. Go to the SHOPs network editor.

3. Add a VEX JW Caustic Light.

4. Set the following:

Attenuation = 8
X Frequency = 20
Y Frequency = 20
X Offset = $T*0.5
Z Offset = $T*0.5

5. Change the Network editor from SHOPs to Objects.

6. Add a light object and name it light_caustic.

7. Set the following:

ty = 3
tz = 10

8. Select the Shading tab in the parameters window.

9. Click the SHOP light flyout arrow and select v_causticlight1.

10. Render a test image.

*Installing and applying the caustic light shader is similar to installing and applying the gloop shaders, just the locations of where the files go is different.

In the next section you will create the water surface and apply a shader that already exists in Houdini to create the waves.

PAGE 6

Go to Page 1 2 3 4 5 7 8 9


Post a message in the Digital Post Production World Wide User Group!