Learning Houdini the Jeff Wagner Way
These notes were taken while studying and working along with Jeff Wagner's SIGGRAPH seminar in 2016. This seminar can be seen on Vimeo at: https://vimeo.com/175836624
Jeff Wagner likes to set his workspace to the technical Desktop
- Windows > Desktop > Technical
Technical Desktop:
- A deeper way to look at the scenes we're working with
- This gives us a couple more UI pins already created for us
- Hover over the viewport> [TAB] > Type: Grid
- Click on the name in the Node Panel and change the name to: Trail_grid
- Double click on the center of the Trail_Grid node you just created.
Middle Mouse clicking on the name of a parameter allows you to middle mouse drag in increments of units to the power of 10.
- Change the grid to a Size of 0.2
Create a sphere:
Side Note: SOPS is a Surface Operator (Geometry Manipulator)
- Node Panel > [Tab] >Type: Sphere > (click anywhere in the Node Panel)
- In the Sphere's attribute editor change the Primitive Type > Polygon
Create a Copy Node:
- Node Panel > [Tab] >Type: copy> (click anywhere in the Node Panel)
- Connect the grid1 to the Upper left twisty on the copy 1 node.
- Connect the sphere1 to the upper right twisty on the copy1 node
Click the second triangle on the right side of the copy1 node to change it blue and to see the operation.
The Copy SOP is a stand in for instancing. In fact it is instancing. Why a sphere? The Sphere has intrinsic orientation normals associated with it. The copy SOP is trying to use those.
Houdini always aims things down the Z axis
[Space] + A zooms to fit all objects
[Space] + G zooms to fit selected objects
[Space] + H zooms to fit home grid
Right now the grid is oriented to the ZX axis by default. We want it to orientate to the XY axis.
- Display the copy1 node in the viewport
- So in the attribute editor for the grid switch Orientation > ZX Plane
- Notice the shift of the grid1 instanced to the sphere. Now the grids orient properly.
- Select the copy1 node and add a second copy Number of Copies > 2
- Then Translate the copy in the Z-Axis .
- Select the grid1 and set the:
- Rows: 2
- Columns: 2
So we now have two copies of the "grid instanced architecture"
Almost every operator in Houdini will use attributes intrinsic to the geometry or will use attributes we add to that geometry. The way we just used the intrinsic normals of the sphere to instance the grid to it. Then we used the intrinsic orientation of the grid, to lay it flat the way we wanted on the sphere geo.
The copy operator calculates all transforms before it copies the objects to the sphere.
The copy operator is working like a for loop, taking all the points of the sphere and running an operation on each point, parenting an instance of the grid to each vert or point.
To the computer, for every point on my sphere1 do the grid1 and the copy1 operation.
- In the copy1 operation set the Z translate to 0.3
- Set the X,Y,Z scale to 0.4
- Drop a Skin Operation into the Node Panel
- Node panel > [TAB] > Skin
- Connect the bottom twisty of the copy1 node to the Upper Left twisty of the Skin1 node
By default the skin operator wants to skin all of the primitives in turn
- Select the copy1 node
- Toggle on the Display Primitive Numbers on the right side of the Display Panel
You'll see here each an every operation numbers as talked about before with the for loop. You can find the sphere point numbered 1 and the consequential operation 2 that is performed by the copy1 SOP. So on and so forth as the operation for loops through each point adding a "Copy" of the grid per point as it goes.
- Select the skin1 node and in the attribute editor change:
- Skin > Groups of N Primitives
This is telling Houdini to recognize and use the pattern established by the copy node, in which, one point is selected, an operation performed, and an object is inserted in the number chain.
- Notice the N value is set to 2 - this tells the skin1 SOP our copy1 SOP followed a 1->2 pattern.
- Select copy1 SOP.
- Right-click in the Number of Copies parameter select Copy Parameter
- Select skin1 SOP.
- Right-click on the N parameter select Paste Copied Relative References
Notice the link we copied in is a UNIX path. ch("../copy1/ncy") So if we look at the node tree. From skin1 we go up one directory [..] While in that directory (one up from skin1) we are looking for copy1 and then we are looking for the attribute called "ncy"
If you hover over the Number of Copies parameter we see the parameter name "ncy" appear.
In the skin1 SOP you can click on the N parameter to toggle between the code for the link and the value it's pulling.
Side Note: Seeing the associations between copied parameters
- In the Node Panel click on the little Eye Icon (Open display options) Hotkey: D
- Network View > Dependency > Show Local Dependency Links
- Now we can see a red line connecting the copy1 node and the skin1 node.