Example for | |
Example |
The Box SOP is used for more than just creating boxes. It can also envelop existing geometry for specific purposes.
The Box SOP can either create a simple six-sided polygon box, calculate the bounding box size for geometry, or be used in conjunction with the Lattice SOP.
There are two objects within the box.hip file that are examples of this:
-
animated_bounding_box
The animated_bounding_box object shows how you can envelope an object and surround it with a simple box, even if it is animated. This can be useful when displaying complicated geometry, in which case you would put the display flag on the box object and the render flag on the complicated geometry.
-
box_spring_lattice
This is an example, a Lattice SOP used in conjunction with the Box SOP. The Box SOP is used to envelope some geometry, in this case a sphere. Divisions is checked to create the proper geometry by referencing the number of divisions in the Lattice SOP.
The top points of the box are grouped by a Group SOP. The Spring SOP uses these points as the Fixed Points from which to create the deformation.
Using the Box SOP in this way allows you to change the incoming geometry (the basic_sphere in this case) and have the box and lattice automatically re-size for you.