14.11.2014 Views

Procedural modelling in Houdini based on Function Representation

Procedural modelling in Houdini based on Function Representation

Procedural modelling in Houdini based on Function Representation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.2 Houd<str<strong>on</strong>g>in</str<strong>on</strong>g>i Development Kit (HDK)<br />

Figure 3.6: Basic class diagram for custom Houd<str<strong>on</strong>g>in</str<strong>on</strong>g>i nodes (adapted from SideFX (2011a))<br />

3.2.3 The SOP Node<br />

SOP nodes are dist<str<strong>on</strong>g>in</str<strong>on</strong>g>guished between generators and filters. Generators do not require any<br />

<str<strong>on</strong>g>in</str<strong>on</strong>g>put, <str<strong>on</strong>g>in</str<strong>on</strong>g>stead they generate geometry purely <str<strong>on</strong>g>based</str<strong>on</strong>g> <strong>on</strong> their parameters. Filters <strong>on</strong> the<br />

other hand alter geometry and apply a set of operati<strong>on</strong>s to it. In the case of this project,<br />

nodes always except at least <strong>on</strong>e <str<strong>on</strong>g>in</str<strong>on</strong>g>put. Even the FRep node itself that outputs the mesh<br />

after polyg<strong>on</strong>isati<strong>on</strong> is retriev<str<strong>on</strong>g>in</str<strong>on</strong>g>g his attributes from c<strong>on</strong>nected nodes dur<str<strong>on</strong>g>in</str<strong>on</strong>g>g traversal (see<br />

Secti<strong>on</strong> 4.4.2).<br />

As shown <str<strong>on</strong>g>in</str<strong>on</strong>g> the previous secti<strong>on</strong>, the first step <str<strong>on</strong>g>in</str<strong>on</strong>g> creat<str<strong>on</strong>g>in</str<strong>on</strong>g>g a custom SOP is to sub-class<br />

SOP_Node, register the operator and start def<str<strong>on</strong>g>in</str<strong>on</strong>g><str<strong>on</strong>g>in</str<strong>on</strong>g>g attributes. The method which c<strong>on</strong>ta<str<strong>on</strong>g>in</str<strong>on</strong>g>s<br />

the actual code to manipulate the geometry is called cookMySop and is called automatically<br />

as so<strong>on</strong> as the node is evaluated or refreshed.<br />

Another useful c<strong>on</strong>cept which helps users understand what the SOP is work<str<strong>on</strong>g>in</str<strong>on</strong>g>g with, is the<br />

opti<strong>on</strong> of add<str<strong>on</strong>g>in</str<strong>on</strong>g>g guide geometry. This geometry is not part of the operator and is <strong>on</strong>ly<br />

displayed as guid<str<strong>on</strong>g>in</str<strong>on</strong>g>g <str<strong>on</strong>g>in</str<strong>on</strong>g>formati<strong>on</strong>, as used to display the bound<str<strong>on</strong>g>in</str<strong>on</strong>g>g box of the polyg<strong>on</strong>isati<strong>on</strong><br />

(see Figure 3.7).<br />

11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!