Cookie
surface node
Combines two polygonal objects with boolean operators, or computes the contour line along the intersection between two polygonal objects.
See also: Clip, Surfsect, Break, Shatter
This operator has two main functions:
-
Boolean: add, subtract, intersect, etc. the volumes of two polygonal objects.
-
Crease: extract a polyline contour of the intersection between two polygonal objects.
For example, you can compute the intersection contour of a boat hull with a polygonal lake surface, and emit foam and spray particles from the intersection.
You can also connect this output to the second input of the Subdivide SOP to define crease lines for a subdivision surface .
Both objects can be open or closed. The node determines “inside” and “outside” by the polygon normals: it considers the normals to point out. Change the Check for full enclosure setting (under Boolean) based on whether you are using open or closed surfaces.
You can connect the two polygonal objects to the node’s two inputs, or use two groups from within the first input using the Group A and Group B parameters.
This operator requires planar convex polygons for accurate results. The Pre-Convex Geometry option does this for you, and is on by default.
This operator interpolates point or vertex attributes for tris and quads.
Using Boolean
-
Click the
Boolean tool on the Model tab. -
Select polygons for set A and press Enter to confirm your selection.
-
Select polygons for set B and press Enter to confirm your selection.
Set A becomes the host to set B.
You can change the Operation in the drop-down menu on the operation controls toolbar.
Parameters
|
Group A |
Use a subset of the first input as the “A” object. |
|
Group B |
Use a subset of the first input as the “B” object. Alternatively, you can hook up the geometry you want to use as “B” to the node’s second input. |
|
3D Tolerance |
Sometimes when you generate polylines (with the Crease option), the polylines will have zero-length segments, or small gaps between segments, or twig-like lines branching off the main line. This node deletes segments smaller than this 3D tolerance (degenerate segments) and joins segment ends within this tolerance, and uses it to suppress twigs. The default value is ideal for unit-sized geometry. You may need to adjust this value for very large or very small models. You can also play with this value for odd cases that don’t generate correct polylines. So, if your polylines have twigs and gaps, try increasing this value. Or, if the polylines are connected where there should be gaps or has segments missing, try decreasing this value. |
|
Pre-Convex Geometry |
When enabled, all non-planar polygons are converted into triangles. For planar polygons, they are converted into quads if point or vertex attributes exist. |
Boolean
Type
|
Operation |
The type of boolean operation to use to combine the volumes of the A and B objects.
|
||||||||||
|
Keep Inside A |
Keep the parts of A that are inside B’s volume. This option is only available when Operation is User Defined. |
||||||||||
|
Keep Inside B |
Keep the parts of B that are inside A’s volume. This option is only available when Operation is User Defined. |
||||||||||
|
Keep Outside A |
Keep the parts of A that are outside B’s volume. This option is only available when Operation is User Defined. |
||||||||||
|
Keep Outside B |
Keep the parts of B that are outside A’s volume. This option is only available when Operation is User Defined. |
||||||||||
|
Keep Overlap A |
Keep parts of A that overlap B’s surface. This option is only available when Operation is User Defined. |
||||||||||
|
Keep Overlap B |
Keep parts of B that overlap A’s surface. This option is only available when Operation is User Defined. |
||||||||||
|
Check for Full Enclosure |
This option enables a specific test for the case of disconnected polygons, which uses a ray cast to determine whether the polygon is inside or outside. Turn this option off when using open surfaces, and on when using closed surfaces. |
||||||||||
|
Assume Input A is Closed |
This option causes the full enclosure test to also test along the inside/outside boundaries in order to verify their accuracy. Turn this option on if A is composed of closed surfaces, and if there are some polygons from B which are being grouped incorrectly in the output. This option is only available when Check for Full Enclosure is on. |
||||||||||
|
Assume Input B is Closed |
This option causes the full enclosure test to also test along the inside/outside boundaries in order to verify their accuracy. Turn this option on if B is composed of closed surfaces, and if there are some polygons from A which are being grouped incorrectly in the output. This option is only available when Check for Full Enclosure is on. |
Groups
Contains controls for creating primitive groups for the output geometry.
|
Create Groups |
Create new groups to contain the output geometry. |
|
Inside/Outside/Overlap A/B |
(When Create groups is on) Create a group with this name to contain the geometry inside/outside/overlap A or B. Leave a field blank to avoid creating a group. If multiple fields have the same name, the group contains the union of the fields. If a named group already exists, the output geometry is appended to it. |
|
Consolidate Edges |
Consolidate redundant points along boundary edges created between the two volumes. |
|
Consolidate Tol |
Points within this distance will be consolidated. |
Crease
|
Keep Source |
Includes the input geometry in the output. |
|
Autojoin Creases |
Connect the crease segments into long continuous polygons. |
|
Do jitter |
Move the second input by a small, random distance before intersection, and move it back afterward. Turn this on if you have coincident faces which prevent the node from cutting properly. |
|
Jitter seed |
Random number seed for the jitter distance. |
|
Amount of jitter |
Scale of the jitter movement. |
Inputs
|
Geometry A |
The first polygonal object, referred to as “A” in the parameter editor. |
|
Geometry B |
The second polygonal object, referred to as “B” in the parameter editor. |
Example files
CookieBasic
CookieGear
$HFS/houdini/help/examples/nodes/sop/cookie/CookieGear.cmd
This example demonstrates how to perform boolean operations using the Cookie SOP.
In this instance, the points are consolidated using a Facet SOP and a Divide SOP is used to create a smooth surface for the Cookie SOP to operate on.
Usages in other examples
| Example name | Example for | |
|---|---|---|
| cutup |
ForEach surface node |
|
| cheese |
ForEach surface node |
|
| PointBasedRBD |
Dop Import surface node |
|
| AutoFracturing |
Copy Objects dynamics node |
|
| DrainExample |
Particle Fluid Emitter dynamics node |
|
| VolumeSource |
Particle Fluid Emitter dynamics node |
|
| WorkflowExample |
Particle Fluid Solver dynamics node |
|
| ViscousFlow |
Particle Fluid Solver dynamics node |
|
| Buoyancy |
Particle Fluid Solver dynamics node |
|
| PressureExample |
Particle Fluid Solver dynamics node |
|
| TankDrain |
Particle Fluid Sink dynamics node |
|
| DrainExample |
Particle Fluid Sink dynamics node |
|
| WorkflowExample |
Particle Fluid Object dynamics node |
|
| ViscousFlow |
Particle Fluid Object dynamics node |
|
| Buoyancy |
Particle Fluid Object dynamics node |
|
| PressureExample |
Particle Fluid Object dynamics node |
|
| BreakingRock |
RBD Glue Object dynamics node |
|
| BlendSolverWithRBDGlue |
RBD Glue Object dynamics node |