Extrude SOP

From TouchDesigner Documentation
Jump to: navigation, search

Summary
[edit]

The Extrude SOP can be used for:

  • Extruding and bevelling Text and other geometry
  • Cusping the bevelled edges to get sharp edges
  • Making primitives thicker or thinner

In order to do so, it uses the normal of the surface to determine the direction of extrusion. In the case of planar or open polygons, the normal is difficult to determine, and may not always provide the result that you expect. Turn on the Primitive Normals display in the Viewer display options to see the normals.

PythonIcon.pngextrudeSOP_Class


Parameters - Page

Source Group sourcegrp - If there are input groups, specifying a group name in this field will cause this SOP to act only upon the group specified for the source. Accepts patterns, as described in Pattern Matching.  

X-Section Group xsectiongrp - If there are input groups, specifying a group name in this field will cause this SOP to act only upon the group specified for the cross-section. Accepts patterns, as described in Pattern Matching.  


Parameters - Values Page

Fuse Points dofuse - - This should almost always be turned on when cross-sections are used. It consolidates points of polygons that would otherwise cross or overlap when the bevel takes place.

  • No fusion off -
  • Clamp all points all -
  • Clamp minimal set min -
  • Clamp individual face on -
  • Clamp straight straight -

Front Face fronttype - - Control how the front face of the extrusion should be built. You may wish to have a "No Output" because some faces are never actually seen when doing animation and, therefore, would only take up additional overhead if left on.

  • No Output off - No face is created.
  • Output Face face - Faces are created.
  • Convex Face convex - Create faces built with Convex Polygons (use this option if faces are to be deformed, i.e. Twist SOP, Lattice SOP).

Back Face backtype - - This value controls whether or not the back of the extruded object will have a face or not. The options are the same as the Front Face options above.

  • No Output off -
  • Output Face face -
  • Convex Face convex -

Side Mesh sidetype - - Controls how the cross-section(s) will be extruded. If the input cross-section is a Bzier or NURBS curve, the surface will be constructed with a patch of the same geometry type.

  • No Output off - No mesh is created.
  • Rows rows - Creates horizontal lines.
  • Columns cols - Creates vertical lines.
  • Rows and Columns rowcol - Both Rows and Columns. Looks like Quads in wire frame display, but all polygons are open (if the primitive type is polygon). Compare them in the Model Editor.
  • Triangles triangles - Build the grid with Triangles.
  • Quadrilaterals quads - Generates sides composed of quadrilaterals (default).
  • Alternating triangles alttriangles - Generates triangles that are opposed; similar to the Triangles option.

Initialize Extrusion initextrude - If the cross-section face that you created doesn't match up nicely to the size of the geometry you are extruding, this command will scale and translate it so that it fits nicely.

The reason it might not be nice to begin with is that the curve wasn't drawn exactly on the world-axis in Model-mode and/or was drawn at a grossly different scale than the object it is extruding.  

Thickness Translate thickxlate - The first value controls the scale of the cross-section profile. There is no effect if a straight (default) cross-section is used. The second value controls the height of the extrusion. Negative scaling values are valid.

Why Two Parameters? Internally, the two Thickness parameters control the individual scale and offsets for the X and Y values of the cross-section. So if the X points = 0 (vertical) then the /thickscale parameter doesn't have any affect.  

Thickness Scale thickscale - The first value controls the scale of the cross-section profile. There is no effect if a straight (default) cross-section is used. The second value controls the height of the extrusion. Negative scaling values are valid.

Why Two Parameters? Internally, the two Thickness parameters control the individual scale and offsets for the X and Y values of the cross-section. So if the X points = 0 (vertical) then the /thickscale parameter doesn't have any affect.  

Depth Translate depthxlate - The first value moves the entire extrusion forward or backwards in the direction of the extrusion. The second value controls the distance between the cross-section and the source input curves.  

Depth Scale depthscale - The first value moves the entire extrusion forward or backwards in the direction of the extrusion. The second value controls the distance between the cross-section and the source input curves.  

Vertex vertex - Translates the cross-section such that the vertex specified is at the cross-section origin.  

Cusp Polygonal Sides docusp - Determines whether or not sides are to be smooth-shaded or faceted using the angle value in Side Cusp Angle field.

Cusping lets you specify at which angle between adjacent polygons, a sharp edge (faceted edge where vertices are un-shared) should be displayed instead.  

Side Cusp Angle cuspangle - When checked, this value will control the angle at which faceting of the sides will occur. A value of 20 is default.  

Consolidate Faces to Mesh sharefaces - If selected the extrusion will share points between the front face and the first row of the side mesh and between the last face and the last row of the side mesh.  

Remove Shared Sides removesharedsides - Prevents the creation of duplicate sides.  


Parameters - Groups Page

Create Output Groups newg - When this option is checked, it causes the Extrude SOP to generate three new groups representing the primitives belonging to the front faces, back faces, and the side bevel/extrusion. The name of the groups are determined by the three option fields below.  

Front Group frontgrp - Output group name to create for front face geometry.  

Back Group backgrp - Output group name to create for back face geometry.  

Side Group sidegrp - Output group name to create for side bevel/extrude geometry.  


Production Tips

This SOP is mainly used for generating bevels and extrusions of text where the input cross-sections are fed from a Font SOP. Any curve or group of curves can also be used as input.

Offsets - This SOP can be used for generating two offsetting curves where the distance between the two curves remains constant. To do this, make sure that you set Side Mesh to No Output, the first thickness to zero and adjust the second to increase or decrease the distance of the offset.

Fixing Stray Normals - If your geometry contains normals that are pointed in many directions (say after reading geometry from a File In SOP, or if you have a lot of open or non-planar polygons), you can fix it so that they are suitable for extrusion.

Do this by appending a Group SOP to the SOP that contains your geometry, enable Normal, and reduce the Spread Angle to something less than 180. Then append a Primitive SOP, which should work on the group made in the Group SOP. In the Face/Hull page, set the Vertex menu to Reverse.

Now the normals in your geometry will all be oriented in the roughly the same direction, and ready for extrusion. To narrow the tolerance, decrease the Spread Angle further.


Operator Inputs

  • Input 0 -
  • Input 1 -

TouchDesigner Build:

SOPs
Add • Experimental:Add • Alembic • Align • Arm • Attribute Create • Attribute • Experimental:Attribute • Basis • Blend • Experimental:Blend • Bone Group • Boolean • Box • Bridge • Cache • Cap • Capture Region • Capture • Carve • CHOP to • Circle • Clay • Clip • Convert • Copy • Experimental:Copy • CPlusPlus • Creep • Curveclay • Curvesect • DAT to • Deform • Delete • Divide • Extrude • Facet • File In • Fillet • Fit • Font • Force • Fractal • Grid • Group • Hole • Import Select • In • Introduction To SOPs id • Inverse Curve • Iso Surface • Join • Joint • Kinect • Lattice • Limit • Experimental:Limit • Line • Line Thick • LOD • LSystem • Magnet • Material • Merge • Metaball • Model • Noise • Null • Object Merge • Experimental:Object Merge • Oculus Rift • OpenVR • Out • Particle • Point • Experimental:Point • Polyloft • Experimental:Polyloft • Polypatch • Polyreduce • Polyspline • Polystitch • Primitive • Experimental:Primitive • Profile • Project • Rails • Experimental:Raster • Ray • Rectangle • Refine • Resample • Revolve • Script • Select • Sequence Blend • Skin • Sort • Sphere • Spring • Sprite • Stitch • Subdivide • Superquad • Surfsect • Sweep • Switch • Text • Texture • Torus • Trace • Trail • Transform • Trim • Tristrip • Tube • Twist • Vertex • Experimental:Vertex • Wireframe • ZED

An Operator Family that reads, creates and modifies 3D polygons, curves, NURBS surfaces, spheres, meatballs and other 3D surface data.

A surface type in SOPs including polygon, curve (NURBS and Bezier), patch (NURBS and Bezier) and other shapes like sphere, tube, and metaball. Points and Primitives are part of the Geometry Detail, which is a part of a SOP.