Curveclay SOP

From TouchDesigner 088 Wiki

Summary

The Curveclay SOP is similar to the Clay SOP in that you deform a spline surface not by modifying the CVs but by directly manipulating the surface. However, instead of using a point on the surface, you use one or more faces to deform that surface. Also, CurveClay does not yet support polygonal meshes.

The combination of inputs will determine the modes of transformation. For any combination of inputs, the following parameters modify the following behaviors of the SOP.

PythonIcon.png curveclaySOP_Class

Inputs

The combination of inputs determines the way the SOP deforms the surface. There are three valid combination types: 1 input, 2 inputs, and 3 inputs.

ONE INPUT

When only the surface is specified, it must contain at least one profile in order for Curveclay to work. In this case, you must specify how the surface should be deformed in the region near the profile (whether to deform the profile along a vector [X, Y, Z or User Defined], or along the surface normal). You must also specify how far out the surface should be pulled, using the Distance parameter.

When one or more profiles form a closed loop, you have the option to displace the inside of the loop, by enabling the option Deform Inside of Loop. Another option allows you to form a closed loop by using several open profiles. The algorithm is the same as the one used in the Trim SOP when not treating curves individually. This might be useful for putting a regular dent into a surface (e.g. A circle, or a font).

TWO INPUTS

When the surface and a set of deforming faces is specified (the deformed faces are the third input) the profiles on the surface will be snapped to the deforming faces. This option has no additional inputs. This might be useful when you want to snap any profile to any free floating curve.

THREE INPUTS

When all three inputs are specified, the Rest faces will first be projected to the surface. The projection is done in two ways: along a specific vector (X, Y, Z, or User Defined) or along the Minimum Distance to the surface. Each point on the curve will first be projected to the surface. Then this curve will not be snapped to the deforming face. Rather, the curve will be deformed by the difference between the rest face and the deforming face. This option provides flexibility on all inputs. For example, this would be ideal for creating random mountain ranges.

Parameters

Face Group /facegroup - Subset of faces (NURBS, Bézier, Polygons) to project, or subset of profiles to deform, depending on how many inputs are connected.
Examples include: 0.5 1.2-3.9 5.*

This group can even take surfaces (possibly intermixed with profile curves) when the 2nd input is not present, indicating that all the surface’s profiles must be used.
Then, the example above becomes: 0.5 1.2-3.9 5

Surface Group /surfacegroup - Subset of spline surfaces to be deformed when all three SOP inputs are connected.

Divisions on Face /divs - The number of points to evaluate on the profiles or the faces. This SOP works by using a straight line approximation of the given curve to deform the surface. Thus, more segments are slower, but the result looks better. Fewer divisions need to be specified when deforming profiles and when the rest and deforming faces have an equal number of breakpoints.

Sharpness /sharp - Specifies the area around the face to deform. The larger the sharpness is, the smaller the deformation area around them (thus having a sharper pull on the surface.)

Refinement /refine - Usually, CurveClay automatically refines the surface. However, you may specify some degree of refinement control. In general, the more refined the surface is, the smoother the result. Better refinement results in a denser surface. You should experiment with values between -1 and 1. When the value is negative, the SOP will first refine the surface to the same detail level as when refinement is 0, and then it unrefines it. The lower the value, the more unrefined it becomes.


Parameters - Projection Page

Controls curve projection. Enabled if all 3 inputs exist.

Projection Axis /projdir - Choice of several projection axes:

  • X, Y, Z - Cartesian Axis - X, Y, or Z.
  • Minimum Distance - Project curve points to their closest places on surface.
  • User Defined - Enter Vector into the field below.

Parameters - Displacement Page

How to deform surface. Enabled if only 1 input exists.

Projection Axis /deformdir - Choice of several projection axes:

  • Surface Normal - The profiles will be deformed along the surface normal.
  • X, Y, Z - Cartesian axis - X, Y, or Z.
  • User Defined - Enter the vector into the field below.

Distance /deformlen - Distance deformed along the vector.

Deform Inside / - Check if the inside of closed loops should be deformed.

Individual / - Check if multiple curves form a closed loop.

Notes

When using CurveClay on a wrapped surface, here are some points to remember:

  • You may want to use a higher number of divisions, since when going across the seam of the wrapped surface, straight line approximation would be turned off and more sample points may be needed.
  • If you’re not going across the seam, then the refinement of the surface is only local. However, when the deformation area of the surface gets near the seam, the refinement is done over the whole surface. Do not be alarmed if the whole surface has been refined.

See Also