Skip to content

Extract Property#

The Extract Property texture allows to evaluate an arbitrary property associated to a geometry.

Note

Depending on the software used Clarisse properties are sometimes called attributes or PrimVars.

Figure 1

Figure 1 Figure 2

Figure 2

Figure 1 shows an example of a firework made with boxes scattered on a point cloud. The orientation and color of boxes are controlled by properties exposed by the point cloud. In this example, Extract Property texture can be plugged directly into the rotation attribute of the Scatterer. However, in order to assign the color to the boxes, we also need to use an Instance Color texture to access to the properties of the point cloud as shown on figure 2.

Attribute Description
Color Set a color that is multiplied to input property
Property Name Set the name of the property to extract. Properties listed in the Attribute Editor is a list of all properties defined by all the geometries in the current session. It is then possible to specify a property that doesn't exist for an evaluation context. In that case, the property is considered null and the texture returns pure black (0,0,0,0). You can use the Property Editor to check which properties are defined by a geometry.
Input Remap Remap the input property data according to the specified remapping pattern.
Output Mode Set how the property should be interpreted as.
Rotation Order Set the output rotation order when the Output Mode is set to extract a rotation
Enable Motion Blur Enable time sampling evaluation during for motion blur computation. This attribute should be activated if the input property defines time samples. This is specially useful when using the texture to drive the transformation of instances in a scatterer.

Figure 3

Figure 3

Figure 4

Figure 4

Figure 3 shows another example of a volume. Here, the temperature prpperty contained in the volume VDB is used to drive the emission of the fire through a Black Body texture (cf. figure 4).

Input Remap#

In Clarisse, transformation matrices are following the row major order and Quaternions are expected to be formatted with the following order (w, x, y, z). Unfortunately there's no guaranty that input properties are formatted the way they are expected by Clarisse.

For example, depending of the software that generated the asset, transformation matrices can be ordered in column major and quaternions may be ordered in (x, y, z, w). Thankfully, you can use the Input Remap attribute to reorder the input property data in order to conform it to what Clarisse expects before performing its computations.

Reordering Input Property Data#

Clarisse supports up to 16 float wide properties to properly support transformation matrices. Each of these 16 floats are then identified by a unique letter from a to p. The first float is then identified by a, the second one by b, the third by c and so one until p which identifies the 16th float. This is why Input Remap attribute default's value is abcdefghijklmnop so that all floats are in the same order as they are defined in the input property.

Converting Quaternions from SideFX Houdini to Clarisse#

Unfortunately, Houdini doesn't follow the same convention as Clarisse when it comes to store quaternions. Houdini relies on the (x, y, z, w) convention whereas Clarisse relies on (w, x, y, z).

Fortunately, using the Input Remap attribute, it is very easy to reorder the input quaternion property coming from Houdini by setting Input Remap to dabc.

That way, the 4th float value representing the w component of the quaternion which is identified by d is swapped to the 1st rank. That way we reformatted the data to match the (w, x, y, z) convention Clarisse expects.

Special Tags#

The Extract Property texture offers two special tags 0 and 1 to replace the float value at a specific rank by either 0.0 or 1.0. For example, abc0 replaces the float value located at the 4th rank by 0.0.

Output Mode#

The Output Mode attribute controls how the input property should be interpreted by the Extract Property texture. Please note that input property data remapping using Input Remap is always performed prior computations and final output.

Mode Description
Raw Output the input property without performing any operations besides the specified remapping using Input Remap
Vector to Euler Extract an Euler angle from an input vector
Quaternion to Euler Extract an Euler angle from the input Quaternion. Clarisse's quaternion representation follows (w, x, y, z) convention.
Matrix 4x4 to Euler Extract an Euler angle from an input 4x4 Matrix. Clarisse's matrices are row major.
Matrix 4x4 to Position Extract a position from an input 4x4 Matrix. Clarisse's matrices are row major.
Matrix 4x4 to Scale Extract a scale from an input 4x4 Matrix. Clarisse's matrices are row major.

Rotation Order#

The Rotation Order allows you to specify the rotation order of the Euler angle. This attribute is only useful when outputting Euler angles.