Trace SOP

From TouchDesigner 088 Wiki


The Trace SOP reads an image file and automatically traces it, generating a set of faces around areas exceeding a certain brightness threshold. You can control this threshold and the resolution of the resulting faces.

PythonIcon.png traceSOP_Class

Parameters - Trace Page

TOP name /top - Specify the TOP image to trace.

Threshold /thresh - Brightness level value adjusts where trace outline in image occurs.

Add Point Texture /addtexture - This option allows the generation of point texture coordinates (UVs). This may occasionally be necessary when the Convert to Poly option is enabled.

Remove Borders /delborder - When enabled, this option eliminates extraneous data along the edges of the original image so it isn't traced. This is useful for when "dirty" edges exist in the original image that you don't want traced.

Compute Normals /normals - Creates normals on the geometry.

Parameters - Filters Page

Border Width /bordwidth - The number of pixels the removal border should be.

Resample Shapes /doresample - Determines level of refinement (number of points) for generating trace outlines.

Step Size /step - Value controlling trace outline refinement when Resample Shapes is checked.

Smooth Shapes /dosmooth - When this option is checked, the geometry is filtered to remove sharp corners.

Corner Delta /corner - Value controlling corner smoothing when Smooth Shapes is checked.

Fit to Curves /fitcurve - If selected, the geometry at this point is converted to two-dimensional Bzier curves. Flat edges are preserved in polygons.

Fitting Error /error - Value controlling accuracy of the above curve fitting process. For best results, the input should retain as many points as possible, i.e. do not select Smooth Shapes or Resample Shapes.

Convert to Poly /convpoly - This option will convert the above curves back into polygons.

Level of Detail /lod - This value controls the accuracy of the conversion back into polygons.

Hole Faces /hole - This will bridge all holes in the output so that they may be rendered properly. Bzier curves and polygons can be holed, but polygonal holing sometimes produces better results. You may want to use the Convert to Poly option before holing.

Uses / Works in Relation With

Commonly followed by a Extrude SOP to generate bevelled objects from logos, scans of geographical maps, etc. It can be animated by reading in a series of images.

See Also