Attrib Create surface node

Adds or edits user defined attributes.

All Parameters Local variables Example files

See also: Attribute, Attrib Copy, Attrib Mirror, Attrib Promote 4 more , Attrib Transfer, Point, Primitive, Vertex

The attribute can be a float, integer, vector, or string type. If the local variable name is not specified, the attribute name (all uppercased) will be used. After adding a user attribute, the local variable can be used anywhere in operations where local variables are allowed.

Note that strings are added as “Index” attributes, not as actual “String” attributes. This is only important if you are using these with the HDK.

Parameters

Name

Name of the attribute

Local Variable

Name of the local variable that corresponds to the new attribute. If you leave this field blank, the local variable is the name of the attribute in all UPPERCASE.

To access individual components of an multi-component attribute, the user can append to this name:

  • X, Y, or Z for vector attributes.

  • 1, 2, 3, etc. for float attributes. Note that the numbering starts at 1, not 0.

For example:

Attribute Type Local variables created

abc

Float, size = 1

$ABC = $ABC1

abc

Float, size = 2

$ABC1, $ABC2

abc

Vector

$ABCX, $ABCY, $ABCZ

Class

Where to add the attribute to the geometry. Can be a point, detail, primitive, or vertex attribute.

Type

Float, Integer, Vector, or String.

Size

Number of elements in the attribute

Default

Default attribute value

Write Values

Disabling the writing of values prevents the AttribCreate SOP from changing the attributes. This is useful if you merely want to ensure the attribute exists but want to preserve any existing values.

Value

Value to set attribute to

String

Value to set the string to

Note

Vector attributes are modified by transforms. Float attributes are not.

Local variables

Note

Variable names ending with 2 refer to the geometry from the second input, if applicable. For example, PT2 is the current point number from the second input.

TX, TY, TZ

Point position.

TW

See WEIGHT.

CEX, CEY, CEZ

The centroid of the geometry.

XMIN, XMAX

The X extents of the bounding box of the geometry.

YMIN, YMAX

The Y extents of the bounding box of the geometry.

ZMIN, ZMAX

The Z extents of the bounding box of the geometry

SIZEX, SIZEY, SIZEZ

The size of the bounding box.

BBX, BBY, BBZ

The point’s relative position in the bounding box.

WEIGHT

Point spline weight.

PT

The point number of the currently processed point.

PR, NPR

Primitive number & total number of primitives.

VTX, NVTX

Vertex number & total number of vertices.

NPT

The total number of points in the template geometry.

LIFE

Percent of total life used (from 0 to 1).

NX, NY, NZ

Normal vector.

MAPU, MAPV, MAPW

Point or vertex texture coordinates.

VX, VY, VZ

Velocity direction.

MAT

Material name specification.

CR, CG, CB

Diffuse point or vertex color.

CA

Point or vertex alpha value.

COMX, COMY, COMZ

Center of mass.

LOD

Level of detail.

RESTX, RESTY, RESTZ

The rest position.

DIST

Distance from particle to last collision.

MASS

Point mass.

DRAG

Point drag.

TENSION

Spring tension of an edge.

SPRINGK

Elasticity of a point.

PSCALE

Particle Scale.

AGE

The seconds a particle in the template has been alive.

CREASE

Point or vertex crease weight value.

AREA

The surface area of the primitive (created by the Measure SOP).

PERIMETER

The perimeter of the primitive (created by the Measure SOP).

ID

The ID of the particle in the input.

UPX, UPY, UPZ

The vector pointed in the up direction.

WIDTH

The width of the curve. Used by mantra for rendering curves & polywire for generating trees.

SEGS

Number of segments to divide a curve up into in Polywire (created by L-systems).

DIV

Number of divisions to build the circle swept with Polywire (created by L-systems).

LAGE

The age of the point in the L-system computation.

ARC

Arc length distance from root in the L-systems.

GEN

Generation in the L-systems.

CURLAYER

Stores the currently processed layer for texture/materials (set by the Layer SOP).

MAXLAYER

The number of layers that are considered active for display.

Example files

CurveTexturing

$HFS/houdini/help/examples/nodes/sop/attribcreate/CurveTexturing.cmd

Load | Launch

The AttribCreate SOP can be used to provide various object-specific attributes by allowing both a label and a value to be given to the newly created attribute.

In this example, the AttribCreate SOP is used to control the width of a curve at rendertime. There are two versions, chosen by a Switch SOP.

  • One AttribCreate SOP gives a constant width attribute in the X axis.

  • The other uses an expression to control the thickness of the curve to create a tapering effect.

The attribute is used by Mantra at render time. To see the results, right-click on the render icon in the viewport, and choose “render_example”.

Usages in other examples

Example name Example for

Dynamics channel node

Load | Launch

Lookup channel node

Load | Launch

Material shader

Load | Launch

Material shader

Load | Launch

Attrib Reorient surface node

Load | Launch

Attrib Promote surface node

Load | Launch

Fur surface node

Load | Launch

Fur surface node

Load | Launch

Fur surface node

Load | Launch

Fur surface node

Load | Launch

Fur surface node

Load | Launch

Fur surface node

Load | Launch

Cloth Create Seam surface node

Load | Launch

Dop Import surface node

Load | Launch

Dop Import surface node

Load | Launch

Primitive surface node

Load | Launch

Curveclay surface node

Load | Launch

Sphere surface node

Load | Launch

Particle surface node

Load | Launch

Channel surface node

Load | Launch

Skin surface node

Load | Launch

Skin surface node

Load | Launch

Crease surface node

Load | Launch

Ray Trace VEX node

Load | Launch

Mantra render node

Load | Launch

Multiple Solver dynamics node

Load | Launch

Field Force dynamics node

Load | Launch

Field Force dynamics node

Load | Launch

RBD Point Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Blend Solver dynamics node

Load | Launch

Wire Solver dynamics node

Load | Launch

Wire Solver dynamics node

Load | Launch

Wire Solver dynamics node

Load | Launch

RBD Fractured Object dynamics node

Load | Launch

Drag Force dynamics node

Load | Launch

Copy Objects dynamics node

Load | Launch

Copy Objects dynamics node

Load | Launch

Affector dynamics node

Load | Launch

RBD Angular Spring Constraint dynamics node

Load | Launch

RBD Angular Spring Constraint dynamics node

Load | Launch

Wind Force dynamics node

Load | Launch

RBD Visualization dynamics node

Load | Launch

Particle Fluid Emitter dynamics node

Load | Launch

Particle Fluid Emitter dynamics node

Load | Launch

RBD Keyframe Active dynamics node

Load | Launch

Switch Solver dynamics node

Load | Launch

Wire Glue Constraint dynamics node

Load | Launch

Wire Object dynamics node

Load | Launch

RBD Auto Freeze dynamics node

Load | Launch

RBD Solver dynamics node

Load | Launch

RBD Solver dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

RBD Hinge Constraint dynamics node

Load | Launch

SOP Solver dynamics node

Load | Launch

SOP Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Particle Fluid Solver dynamics node

Load | Launch

Buoyancy Force dynamics node

Load | Launch

POP Solver dynamics node

Load | Launch

Load | Launch

Particle Fluid Sink dynamics node

Load | Launch

Particle Fluid Sink dynamics node

Load | Launch

Cloth Solver dynamics node

Load | Launch

Cloth Solver dynamics node

Load | Launch

Cloth Solver dynamics node

Load | Launch

Cloth Solver dynamics node

Load | Launch

Cloth Solver dynamics node

Load | Launch

Cloth Solver dynamics node

Load | Launch

RBD Object dynamics node

Load | Launch

RBD Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

Particle Fluid Object dynamics node

Load | Launch

RBD Spring Constraint dynamics node

Load | Launch

RBD Glue Object dynamics node

Load | Launch

RBD Glue Object dynamics node

Load | Launch

RBD Glue Object dynamics node

Load | Launch

RBD Glue Object dynamics node

Load | Launch

File dynamics node

Load | Launch

Active Value dynamics node

Load | Launch

Active Value dynamics node

Load | Launch

RBD Pin Constraint dynamics node

Load | Launch

RBD Pin Constraint dynamics node

Load | Launch

Anchor: Align Axis dynamics node

Load | Launch

Reference Frame Force dynamics node

Load | Launch

Mask Field dynamics node

Load | Launch

Fan Force dynamics node

Load | Launch

Vortex Force dynamics node

Load | Launch

Script Solver dynamics node

Load | Launch

Script Solver dynamics node

Load | Launch

Path object

Load | Launch

Rivet object

Load | Launch