Painted Attribute Maps

Painted attribute maps (short: “paint maps”) is one of the most commonly used features of Carbon and a fundamental piece utilized for all advanced techniques.

This tutorial only requires very little knowledge about Carbon and Houdini, which can easily be acquired by reading the Avatar Cloth Setup Tutorial.

Using paint maps can be a bit overwhelming at first glance, but they are not as hard as it might seem and allow for effects and simulation customization like no other feature.

What Is A Painted Attribute Map

Typical surface geometry in Houdini contains primitives and points, which store information in attributes. Points have at least a position attribute P. Other common attributes are point color, which is saved in the attribute Cd or the texture coordinates uv.

With the help of a Paint node, Houdini allows painting of the attribute values on a per point basis using its brush tool.

Painted Attribute Maps In Carbon

The main purpose for painted attribute maps in Carbon is to enable users to paint variations to the dynamic properties of a single object directly on the base geometry, as one would do for the color attribute.

Looking at real world garments, besides a simple scarf or a sock, no garment really is a uniform piece of fabric. There are sewings, stitchings, zippers, double-layered areas, stiffened areas, etc., which all contribute to the garment behavior. In order to incorporate such non-uniformity without having to insert additional geometry and constraints, Carbon reads attribute maps as a way to customize Carbon Cloth, Carbon Morph and Carbon Tetra objects on a per point basis.

Carbon’s soft body objects, namely Carbon Cloth, Carbon Morph and Carbon Tetra, offer a large variety of parameters to customize a soft body simulation. Most of these parameters allow to specify a Base Value and a Painted Attribute Range. Using only the Base Value guarantees a uniform behavior for the entire object, while a non-zero Painted Attribute Range acts as a multiplier for the values stored in the painted attribute map.


Painted Attribute Maps for Carbon Cloth and Carbon Morph are only available in Advanced setup mode.

Creating And Using Painted Attribute Maps

Setting up painted attribute maps is a three stage process. First, create the attribute and paint the SOP geometry, at last set up the simulation in a DOP Network and edit the Painted Attribute Range for the parameter of the respective Carbon Cloth, Carbon Morph or Carbon Tetra.

In this example, think of the geometry below as tassels, curtains or scarfs that are fixed on the upper edge, laid out almost horizontally and then let go to drape under gravity. Additionally, a cylindrical Carbon Collider is placed in the scene to provide some resistance/obstacle.


Draping tassels over a cylindrical obstacle.

Without any Viscous Damping or aerodynamics parameters, the stripes drape quite fast. This is realistic and an expected outcome but, especially in the movie industry or for fashion advertisements, sometimes a hint of magic is wanted. A simple way to achieve this for many situations is to add Viscous Damping to parts of a Carbon Cloth. Viscous Damping removes energy from the cloth, therefore slows down motion and removes jitters or other high frequency deformations. In case of the draping stripes, adding Viscous Damping slows down the motion and makes the fabric appear very light, almost floating in space. In the following, all stripes are painted with different values to show the difference in behavior.

This technique can be applied to manipulate parts of a coat, scarf, cape, and many others.

Creating The Correct Attribute

All Carbon attributes are of type single float value. The name and class of the paintable attribute for each Carbon parameter can be seen when hovering the mouse over the related parameter name in the UI of the Carbon DOP node.


Painted attribute name (viscousDamping) and class (point).

Before an attribute can be painted, it needs to be created on the SOP geometry. The standard way to do this in Houdini is to use an Attribute Create node. This node allows to create various class of attributes on a SOP geometry, e.g. point attribute, primitive attribute, vertex attribute or detail attribute. In the case above, the attribute viscousDamping must be a point attribute.


Attribute spelling is case-sensitive. Make sure to double-check the spelling as for example viscousdamping (with a lower case d) will be ignored by Carbon.

However for ease of use, there is also a Carbon node available, namely Carbon Attribute Copy, which creates and initializes attributes. Not only does it already provide all supported Carbon parameters, but it also allows to create multiple attributes at a time, and copy values from one to multiple Carbon attributes.

In order to create new attributes, leave Source Attribute empty and toggle the desired attributes in Destination Attributes. Switching to the Default Values tab, one can change the initialization values on a per attribute basis.


Carbon Attribute Copy node set to create a viscousDamping attribute with default value of 0.

For more information about this node, please refer to the documentation on Carbon Attribute Copy.

Attribute Painting

Once the point attribute is created, attach a Paint node, tick Override Color and insert the painted attribute name. Again, make sure to use the correct attribute spelling and case.

Then, make sure to activate the Show Handle option in the sidebar on the left end of the window as this activates the brush for painting. Then paint the geometry using white for maximum variations and black for minimum variations.

There are multiple options for how to visualize the painting. We recommend using White to Red, where a point attribute value of 0 (painted with a black brush) is visualized as white color, and a point attribute value of 1 (painted with a white brush) is visualized as red color. Greyscale would be another viable mode but the black color camouflages the wireframe lines which makes further painting much harder.

Per default, the painted map is only visible when the Paint node is highlighted and Show Handle is toggled on. If one wants to visualize the attribute permanently, toggle Visualize Attribute. This copies the painted attribute into the Houdini color attribute Cd for OpenGL visualization, but is not necessary for the simulation as Carbon does not use the Cd attribute.


Painting a point attribute on a SOP geometry.

This concludes the setup on a SOP (geometry) level.


It is recommended to perform at least a single smoothing operation in the Paint node when dealing with painted attribute maps where large areas without obvious sharp geometric borders are painted (i.e. not illustrated in this example). The resulting gradient will usually result in a more stable simulation and more fluent behavior.

Setting The Painted Attribute Range

Moving to the DOP (dynamics), create a DOP Network and set up the basic simulation using Carbon Cloth, Carbon Collider, Carbon Binding and Carbon Simulation. For more information on how to set up a scene like this, please refer to Avatar Cloth Setup Tutorial.

At last, set the Painted Attribute Range accordingly. Together with the Base Value and the paint map, the Carbon Simulation will then interpret these values using the following formula:

\text{\it{Final Value }} = \text{\it{ Base Value }} + \text{\it{ Painted Attribute Range }} * \text{\it{ Paint Map Attribute}}

For more extensive information and examples on how a final nodal value is calculated, please refer to Painted Attribute Maps.

A value of 240 for Viscous Damping corresponds to a high damping effect. Therefore, set the range value to 240 while leaving the base value to 0 to cover the full spectrum of viscous damping behavior.


Setting the Painted Attribute Range on a Carbon DOP node.

The final setup is shown below.


Final Carbon Simulation setup.

When running the simulation, it becomes clear just how much of an effect a simple painted attribute map can have on the result.


What’s Next

Read Tailored Cloth Tutorial and Goal Pose Tutorial to get a glimpse at what else is possible when using paint maps.