Go to: Related nodes. Attributes.

This node contains attributes and routines for creating toon style outlines around objects.

Node name Parents Classification MFn type Compatible function sets
pfxToon pfxGeometry pfxToon kPfxToon kBase
kNamedObject
kDependencyNode
kDagNode
kShape
kPfxGeometry
kPfxToon

Related nodes

strokeGlobals, brush, pfxGeometry, stroke, pfxHair

Attributes (84)

Attribute quick index omitted (too many attributes to show them all).

Long name (short name) Type Default Flags
inputSurface (ins) compound n/a arrayoutputinputconnectable
This is the input multi-attribute for the surfaces getting toon outlines. Both the geometry and world matrix are connected.
surface (srf) mesh NULL outputinputconnectable
Input mesh
inputWorldMatrix (iwm) matrix identity outputinputconnectable
Input matrix from mesh or surface
displayInViewport (div) bool true outputinputconnectablestorablekeyable
If on, then lines are displayed in the modelling viewports.
profileLines (pln) enum 1 outputinputconnectablestorablekeyable
If not off then lines are generated along the silhoutte of objects. If Paint Effects lines are used then curves following the outline are constructed. These lines are view relative and thus must are rebuilt when the view changes. If Offset Mesh is used, then a duplicate of the input mesh is constructed that is offset along the surface normal by the line width. By making this mesh both single sided and reversed a shell is formed that creates a silhoutte when rendered with the input mesh. This has the advantage of built in thick thin line properties that are stable when animated. It also has the advantage of not needing to be updated when the view changes. It will also appear in raytraced reflections and refractions.
creaseLines (cln) bool true outputinputconnectablestorablekeyable
If on, then lines are generated along internal hard edges.
borderLines (bln) enum 1 outputinputconnectablestorablekeyable
This allows one to generated lines along boundaries. Open Edges are considered to be edges that are shared by only one face. This can be used to provide lines around the border of a simple plane, for example. Profile lines do not handle this sort of edge, which only occurs when the surface is not fully closed. Shader boundary edges are where the faces attached to the edge do not share the same shader.
intersectionLines (iln) bool false outputinputconnectablestorablekeyable
If on, then lines are generated where surfaces intersect.
selfIntersect (sei) bool false outputinputconnectablestorablekeyable
If on, then lines are generated where surfaces intersect themselves.
lineWidth (lwd) double 0.1 outputinputconnectablestorablekeyable
This controls the global width of the profile, crease and boundary lines.
lineWidthMap (lwm) double 0.5 outputinputconnectablestorablekeyable
This attribute can be used to vary line width with a 2D texture map. This attributes scales the currently defined line width, but by 2 times the lineWidthMap value, so that a value of 0.5 has no effect. Where the texture value was 0.25 the line width would be half of the lineWidth attribute value and where the value is 1.0 the value would be double. Values outside the zero to one range can also be used( for file textures this generally requires increasing the alpha gain on the texture ). The texture is mapped into uv space of the surface the lines are on. In addition to thick and thin effects, one can also block line formation entirely in places by using a zero texture value. Note that 3D, projective 2D, and environment textures are not currently supported.
lineOpacity (lop) double 1.0 outputinputconnectablestorablekeyable
This controls the opacity of the profile, crease and boundary lines. An opacity of 0 is fully transparent and an opacity of 1 is fully opaque.
lineOpacityMap (lpm) double 1.0 outputinputconnectablestorablekeyable
This attribute can be used to vary the line opacity with a 2D texture map. This attributes scales the currently defined line opacity, so where the texture value was 0.5 the line opacity would be half of the lineOpacity attribute value. The texture is mapped into uv space of the surface the lines are on. Note that 3D, projective 2D, and environment textures are not currently supported.
localOcclusion (lcl) enum 0 outputinputconnectablestorablekeyable
If Line Surface is used then lines will be clipped where they are hidden by the surface they are created from. If All Toon Surfaces is used then lines will be clipped where they are hidden by any of the surfaces that are currently assigned these toon lines. This occlusion is generally meant to augment the line occlusion by the normal paint effect render, or orther renders if convert toon to poly is used. With paint effects renders, the depthBias attribute may be useful when combined with local occlusion.
occlusionTolerance (otl) double 0.01 outputinputconnectablestorablekeyable
This is an amount in worldspace that lines are moved towards the camera when testing depth for local occlusion. A small value is required to avoid artifacts where the surface self occludes lines.
depthBias (dbs) double 0.0 outputinputconnectablestorablekeyable
This is an amount in worldspace that lines are moved towards the camera when rendering. This is useful in avoiding artifacts with depth occlusion by the surface the lines are on.
profileLineWidth (plw) double 1.0 outputinputconnectablestorablekeyable
This is a relative scale of the width of the profile, or silhoutte lines.
creaseLineWidth (clw) double 1.0 outputinputconnectablestorablekeyable
This is a relative scale of the width of the crease, or hard edge lines.
borderLineWidth (blw) double 1.0 outputinputconnectablestorablekeyable
This is a relative scale of the width of the border, or boundary lines.
intersectionLineWidth (ilw) double 1.0 outputinputconnectablestorablekeyable
This is a relative scale of the width of the intersection lines.
lineOffset (lof) double 0.0 outputinputconnectablestorablekeyable
This offsets lines along the surface normal. The amount of offset is relative to the line width, a value of 1.0 having the line just touch the surface. With a value of 0 the line is half intersecting the surface.
lineOffsetMap (lom) double 0.0 outputinputconnectablestorablekeyable
This attribute can be used to vary line offset with a 2D texture map. If a noisy texture is used this can create a wiggly line. This attributes scales the currently defined line offset, so where the texture value was 0.5 the line offset would be half of the lineOffset attribute value. The texture is mapped into uv space of the surface the lines are on. Note that 3D, projective 2D, and environment textures are not currently supported.
lightingBasedWidth (lbw) double 0.0 outputinputconnectablestorablekeyable
The width is scaled by the diffuse light intensity. Brighter regions will be thinner. Shadowed and dark regions will have full width tubes. Using negative values can have the reverse effect. The lighting used is a diffuse illumination that is relative to the local surface normal.
occlusionWidthScale (ows) bool true outputinputconnectablestorablekeyable
OcclusionWidthScale is useful for avoiding aliasing artifacts along the inside edge of lines. The paint effects brush stamp radius is scaled down based on the average occlusion within the stamp region, rather than occluding each pixel of the stamp draw. This allows lines to have their center on the object's profile boundary. Otherwise the line on the inside edge gets occluded by the object, and thus only the outer half of the line is visible. Paint Effects relies on the the depth buffer from the scanline phase of the render for occlusion, however there is only one depth value per pixel, which creates a challenge for good antialiasing. Using Occlusion Width Scale gets around some of these aliasing problems, although very thick lines may in places bite into objects more than desired. Also in some unusual situations it may cause a blobby quality where there are sudden changes in occlusion. Note that if a brush is assigned the toon line, then the setting for occlusion width scale on the brush node will override the setting on the toon node.
depthOffset (dff) double 0.0 outputinputconnectablestorablekeyable
This offsets profile lines along the view direction. This can help give lines a more graduated width where the profile is internal to the object.
creaseAngleMin (amn) double 20.0 outputinputconnectablestorablekeyable
This is the start angle in degrees between faces beyond which creasing forms. Line thickness can be graduated between zero width at the min angle and going to full thickness at the max. At an angle of zero all edges will be drawn, if hardCreasesOnly is OFF.
creaseAngleMax (amx) double 90.0 outputinputconnectablestorablekeyable
This is the angle in degrees between faces beyond which crease line thickness is the maximum. At an angle of zero all edges will be drawn, if hardCreasesOnly is OFF.
hardCreasesOnly (hco) bool true outputinputconnectablestorablekeyable
If on, then creases are only generated along hardened edges.
backfacingCreases (bfc) bool true outputinputconnectablestorablekeyable
If on, then creases are generated on surfaces that face away from the view.
intersectionAngleMin (imn) double 1.0 outputinputconnectablestorablekeyable
This is the start angle in degrees between faces beyond which intersection lines form. Line thickness can be graduated between zero width at the min angle and going to full thickness at the max. At an angle of zero all intersecting edges will be drawn. By varying the min max intersection angle one can avoid lines along flush intersections, yet still have lines where the intersection angle is steeper.
intersectionAngleMax (imx) double 1.0 outputinputconnectablestorablekeyable
This is the angle in degrees between faces beyond which intersection line thickness is the maximum. At an angle of zero all intersection lines will be drawn at full thickness.
smoothProfile (spf) bool true outputinputconnectablestorablekeyable
If on then the profile is computed based on the interpolated normals. If off the profile curve will exist only on polygon edges. The off state guarantees that the profile will be always at the exact visible boundary, although it will jump in discreet steps as the view changes or the object deforms. With smooth profiles ON the profile changes in a smooth continuous fashion, but may creep in from edges in places where the surface is crudely triangulated.
tighterProfile (tpf) bool false outputinputconnectablestorablekeyable
If on then smooth profiles will be a bit closer to the mesh profile edge, particularily in cases where the vertex normals do not match an edge orientation well. A primitive cone is a good example of this situation. Deriving the profile from the vertex normals does not work well in this case, because the normals define more of a hump than a pointed cone. For a cone the tighter profile method will push the profile about halfway closer to the the point of the cone. To fit closer than this, increase the subdivisions on the cone, or turn off smooth profile.
curvatureModulation (cmo) bool false outputinputconnectablestorablekeyable
This varies the width of lines relative to the 3d curvature of the line. When enabled the curvatureWidth graph controls how curvature affects line width. The input position sampled from the curvatureWidth graph is the the curvature, where the left of the graph is zero curvature( straight ) and the right is fully bent at a 180 degree angle. The output value of the graph (vertical position) is then used to determine a scale factor for the current width. Thus if the graph is a horizontal line with a value of 1.0 the line width is unchanged. Where the graph is zero the line width will be zero.
curvatureWidth (cwd) compound n/a arrayoutputinputconnectablestorablekeyable
When curvatureModulation is enabled the curvatureWidth graph controls how curvature affects line width. The input position sampled from the curvatureWidth graph is the the curvature, where the left of the graph is zero curvature( straight ) and the right is fully bent at a 180 degree angle. The output value of the graph (vertical position) is then used to determine a scale factor for the current width. Thus if the graph is a horizontal line with a value of 1.0 the line width is unchanged. Where the graph is zero the line width will be zero.
curvatureWidth_Position (cwdp) float 0.0 outputinputconnectablestorablekeyable
Position of ramp value on normalized 0-1 scale
curvatureWidth_FloatValue (cwdfv) float 0.0 outputinputconnectablestorablekeyable
Ramp value at the sibling position
curvatureWidth_Interp (cwdi) enum 0 outputinputconnectablestorablekeyable
Ramp Interpolation controls the way the intermediate values are calculated. The values are:
None: No interpolation is done; the different colors just show up as different bands in the final texture. Linear: The values are interpolated linearly in RGB color space. Smooth: The values are interpolated along a bell curve, so that each color on the ramp dominates the region around it, then blends quickly to the next color. Spline: The values are interpolated with a spline curve, taking neighboring indices into account for greater smoothness.
profileWidthModulation (pwm) double 0.0 outputinputconnectablestorablekeyable
This varies the width of lines relative to the view angle.
creaseWidthModulation (cwm) double 0.0 outputinputconnectablestorablekeyable
This varies the width of lines relative to the view angle.
borderWidthModulation (bwm) double 0.5 outputinputconnectablestorablekeyable
This varies the width of lines relative to the view angle.
intersectionWidthModulation (imd) double 0.0 outputinputconnectablestorablekeyable
This varies the width of lines relative to the view angle.
profileBreakAngle (pba) double 180.0 outputinputconnectablestorablekeyable
This is the angle in degrees beyond which profile lines are broken. Line segments that are less than this angle with respect to each other are joined into lines. At a value of 0 all lines will be only one segment long. At a value of 180 all adjacent segments will be joined together into lines.
creaseBreakAngle (cba) double 80 outputinputconnectablestorablekeyable
This is the angle in degrees beyond which crease lines are broken. Line segments that are less than this angle with respect to each other are joined into lines. At a value of 0 all lines will be only one segment long. At a value of 180 all adjacent segments will be joined together into lines.
borderBreakAngle (bba) double 80.0 outputinputconnectablestorablekeyable
This is the angle in degrees beyond which border lines are broken. Line segments that are less than this angle with respect to each other are joined into lines. At a value of 0 all lines will be only one segment long. At a value of 180 all adjacent segments will be joined together into lines.
intersectionBreakAngle (iba) double 180.0 outputinputconnectablestorablekeyable
This is the angle in degrees beyond which intersection lines are broken. Line segments that are less than this angle with respect to each other are joined into lines. At a value of 0 all lines will be only one segment long. At a value of 180 all adjacent segments will be joined together into lines.
removeFlushBorders (rfb) bool false outputinputconnectablestorablekeyable
This will removes borders where meshes touch and have matching normals.
flushTolerance (tfl) double 0.01 outputinputconnectablestorablekeyable
This is the max distance boundary cvs can be from each other when suppressing flush or common border lines.
flushAngleMax (fmx) double 4.0 outputinputconnectablestorablekeyable
This is the max angle in degrees that boundary vertex normals can be from each other when suppressing flush or common border lines.
lineEndThinning (let) double 0.0 outputinputconnectablestorablekeyable
This controls the distance from line ends beyond which they become fully thick. Depending on the object one may need to lower the Break Angle values in order to see open line ends. For most surfaces the profile lines form closed lines with no open ends. The continuation of the profile is sometimes hidden where it goes behind the object. It may thus look like it has open ends event though it is closed and will thus not show the effect of line end thinning. Crease lines are more likely to show open ends than profiles or borders. One can use the break angles to create open ends where the line curves strongly.
lineExtend (lex) double 0.0 outputinputconnectablestorablekeyable
This extends the ends of lines so they cross at corners rather than simply intersecting. Line Extend simulates a pencil drafting style of line. Depending on the object one may need to lower the Break Angle values in order to see open line ends. For most surfaces the profile lines form closed lines with no open ends. The continuation of the profile is sometimes hidden where it goes behind the object. It may thus look like it has open ends event though it is closed and will thus not show the effect of Line Extend. Crease lines are more likely to show open ends than profiles or borders. One can use the break angles to create open ends where the line curves strongly.
resampleProfile (rpf) bool false outputinputconnectablestorablekeyable
The points along the profile are typically spaced at irregular distances, depending on the surface geometry. This is especially noticable if one assigns a brush with tubes ON to the toon line, where the tubes will jump around as the scene is animated. Enabling this causes the profile lines to be resampled at a uniform cv spacing, resulting in smoother strokes that jump less. The resample spacing needs to be small enough to avoid rounding corner edges.
resampleCrease (rcr) bool false outputinputconnectablestorablekeyable
The points along the crease are normally spaced according to the size of poly edges. For simple objects this may not provide enough cvs for effects like line end thinning. Resample crease provides the ability to sample the crease lines with fewer or more cvs, as well as to fix the worldspace distance between curve cvs. Note that this may make crease lines twitch when animated if screenspace resampling is not zero. The resample spacing needs to be small enough to avoid rounding corner edges.
resampleBorder (rbd) bool false outputinputconnectablestorablekeyable
The points along the border are normally spaced according to the size of poly edges. For simple objects this may not provide enough cvs for effects like line end thinning. Resample border provides the ability to sample the border lines with fewer or more cvs, as well as to fix the worldspace distance between curve cvs. Note that this may make border lines twitch when animated if screenspace resampling is not zero. The resample spacing needs to be small enough to avoid rounding corner edges.
resampleIntersection (rin) bool false outputinputconnectablestorablekeyable
The points along the intersection are typically spaced at irregular distances. This is do to the way that triangles overlap along the edge. This is especially noticable if one assigns a brush with tubes ON to the toon line, where the tubes will jump around as the scene is animated. Enabling Resample Intersection causes the profile lines to be resampled at a uniform cv spacing, resulting in smoother strokes that jump less. The resample spacing needs to be small enough to avoid rounding corner edges.
maxSegmentLength (msl) double 0.5 outputinputconnectablestorablekeyable
This is a maximum distance that is allowed between cvs on profiles when resample profile is ON. If this is small there may be many cvs on a profile curve. If this value is very large the profile curve will have its original number of cvs, but uniformly distributed across the original curve. One may have rounded corners if the max segment length is not low enough.
minSegmentLength (mns) double 0.0 outputinputconnectablestorablekeyable
This is the smallest distance that is allowed between cvs on profiles when resample profile is ON. If this is large the profile curve may be very crudely sampled. It is useful if one wants an output, for example to polymesh, where the number of segments is kept to a minimum. Also when combined with screenspace resampling it can be used to simplify distant profiles.
screenSpaceResampling (ssr) double 0.0 outputinputconnectablestorablekeyable
This controls the degree to which outline curve resampling is done in screenspace. When this is 1.0 the segments will be a fixed distance apart in screenspace. When it is 0.0 the distances are fixed in worldspace. Between 1.0 and 0.0 these two sampling methods are interpolated. This can be used to have profile curves become simpler with distance. Also if one has a brush with tubes = on assigned to the toon line the number of tubes will reduce with distance when this is greater than zero.
pfxRandomize (prz) bool false outputinputconnectablestorablekeyable
If this is ON then each curve is given a new random seed for paint effects. This requires that one have a pfx brush with tubes=ON assigned to the toon line. Profiles line tubes may jump around if this is ON when animated.
screenspaceWidth (spw) bool false outputinputconnectablestorablekeyable
whether or not to make the line width constant for different depths from the view
distanceScaling (dsl) double 0.0 outputinputconnectablestorablekeyable
This controls the amount that the distance from the eye affects the tube width when screenSpace width is enabled. At a value of 0.0 the width is constant while at a value of 1.0 it behaves as if screenspace width is OFF.
minPixelWidth (mpw) double 0.0 outputinputconnectablestorablekeyable
When screenspace width is enabled this controls the smallest width a stroke can be in pixels. It is useful for toon lines when one wishes to avoid very thin lines.
maxPixelWidth (mxp) double 1000.0 outputinputconnectablestorablekeyable
When screenspace width is enabled this controls the largest width a stroke can be in pixels. It is useful for toon lines when one wishes to avoid very fat lines.
profileColor (pcl) float3 outputinputconnectablestorable
input color for profiles This may be textured with 2D textures. The line color is then derived based on the color of the texture mapped to the surface. Note that 3D, projective 2D, and environment textures are not currently supported, however one could convert the toon lines to a poly mesh then apply a shader with 3D textures to the result.
profileColorR (pcr) float 0.0 outputinputconnectablestorablekeyable
profile color red value
profileColorG (pcg) float 0.0 outputinputconnectablestorablekeyable
profile color green value
profileColorB (pcb) float 0.0 outputinputconnectablestorablekeyable
profile color blue value
creaseColor (ccl) float3 outputinputconnectablestorable
input color for creases This may be textured with 2D textures. The line color is then derived based on the color of the texture mapped to the surface. Note that 3D, projective 2D, and environment textures are not currently supported, however one could convert the toon lines to a poly mesh then apply a shader with 3D textures to the result.
creaseColorR (ccr) float 0.0 outputinputconnectablestorablekeyable
crease color red value
creaseColorG (ccg) float 0.0 outputinputconnectablestorablekeyable
crease color green value
creaseColorB (ccb) float 0.0 outputinputconnectablestorablekeyable
crease color blue value
borderColor (bcl) float3 outputinputconnectablestorable
input color for borders This may be textured with 2D textures. The line color is then derived based on the color of the texture mapped to the surface. Note that 3D, projective 2D, and environment textures are not currently supported, however one could convert the toon lines to a poly mesh then apply a shader with 3D textures to the result.
borderColorR (bcr) float 0.0 outputinputconnectablestorablekeyable
border color red value
borderColorG (bcg) float 0.0 outputinputconnectablestorablekeyable
border color green value
borderColorB (bcb) float 0.0 outputinputconnectablestorablekeyable
border color blue value
intersectionColor (icl) float3 outputinputconnectablestorable
input color for intersections This may be textured with 2D textures. The line color is then derived based on the color of the texture mapped to the surface. Note that 3D, projective 2D, and environment textures are not currently supported, however one could convert the toon lines to a poly mesh then apply a shader with 3D textures to the result.
intersectionColorR (icr) float 0.0 outputinputconnectablestorablekeyable
intersection color red value
intersectionColorG (icg) float 0.0 outputinputconnectablestorablekeyable
intersection color green value
intersectionColorB (icb) float 0.0 outputinputconnectablestorablekeyable
intersection color blue value
outColor (ocl) float3 0.0, 0.0, 0.0 outputconnectable
The output profile color. This is currently a simple pass-through from the profile color.
outColorR (ocr) float 0.0 outputconnectable
The red component of the profile output color.
outColorG (ocg) float 0.0 outputconnectable
The green component of the profile output color.
outColorB (ocb) float 0.0 outputconnectable
The blue component of the profile output color.
outProfileMesh (opm) mesh NULL arrayoutputconnectable
This is an output array of meshes matching the input meshes, but offset along the normal by the line width. By enabling opposite siding and backface removal these meshes create a profile outline about the original input meshes. Unlike pfx profile lines these lines are formed by the render of the two meshes, and do not need to be updated when the view changes. If offsetMeshProfile lines are not enabled then these output connections will evaluated to empty meshes.