How to
create an ocean using only SOPs
-
Create a grid.
-
Rename the
grid_object1node from tosop_ocean. -
Dive inside the
sop_oceanobject. -
Modify the following parameters on the grid geometry node.
-
Change the Primitive Type to NURBS.
-
Increase the Rows and Columns to 40.
-
-
Append a Mountain SOP to the grid and set the following parameters.
-
Set all three Frequency fields to 0.7.
-
Change the X value of the Offset parameter to
$Tand the Y value to$T/4.
-
-
Add a Point SOP as a sibling node to the Mountain SOP and a child node to the grid.
-
Change Y value of the the Position parameter to
$TY+sin($PT/5+($F+3)). -
Add another Point SOP and connect the Mountain SOP to its first input and the other Point SOP to its second input.
-
At the object level, create a SHOP Network using the tab menu.
-
Dive inside the SHOP network and switch to the Material Palette tab in the network editor.
-
Drag the Basic Liquid shader onto your geometry in the viewport. When you switch back to the SHOP network you should see the
basic_liquidshader. -
Dive into the Basic Liquid shader and add a VEX Fractal Dent using the tab menu. Connect it to the
nextinput on thesuboutput1node.
-
Return to the SHOP network and rename the Basic Liquid node to
ocean_shader. -
Click
the ocean_shaderand select Promote Material Parameters. This will allow you to control all of the attributes at the top level, including the displacement. -
Adjust the shader to look more like ocean water, rather than clear water.
-
On the Specular tab, change the Specular Intensity to 2.
-
On the Ray Trace tab, change the Reflection Intensity to 2, and the Refraction Tint Color to 0.34, 0.34, 0.2.
-
Set the Environment Map to
$HFS/houdini/pic/RainySky.rat. -
On the Displacement tab, animate the Z value of the Nose Offset parameter with the expression
$F/10.
-
-
On the Properties tab, click the
gear menu and select Edit Parameter Interface. -
On the For Rendering tab, expand the latest version of the Mantra folder, and then expand the Shader folder.
-
Select the following parameters by holding Ctrl , then click the transfer arrow.
-
Displacement Bound
-
Displacement Space
-
Re-Dice Displacements
-
True Displacements
A new folder named Shading will be created. To better organize your tabs, select the Shading folder and press Del . Then drag the four parameters you just added into the Properties folder and click Apply and Accept.
-
-
Set the Displacement Bound to
ch("v_riverbed1/amp"). -
Make sure the True Displacement checkbox is turned on.
-
Navigate back to the SHOP network and drag the shader node onto the grid in the viewport.
-
At the object level, create a camera which frames the grid inside the entire frame.
-
Create a point light toward one of the edges, and add a spotlight further away for extra highlights.
TipChange the color of the lights to a light yellow to simulate the sun. This will give you a better result than the default white light.