by Clark Cheng
In Houdini, color masks (typically stored in the Cd
attribute) can be a powerful tool for controlling localized remeshing. By assigning specific colors to regions of a mesh, you can direct the remesher to vary triangle density—refining detail where needed while keeping other areas coarse for performance.
Cd
attribute:
Use the Attribute Paint SOP or import a texture to define color zones
(e.g., red = high detail, blue = low detail).
Cd
attribute
(for example, using a Point VOP or Wrangle to remap Cd
to an edge length float).
This approach gives you fine-grained control over where the geometry is optimized—ideal for workflows like game asset preparation, simulations, or stylized mesh effects.
@targetmeshsize=@Cd.r;
@targetmeshsize=fit(@targetmeshsize,0,1,chf('min'),chf('max'));
The code snippet sets the @targetmeshsize
attribute based on the red channel value of the @Cd
(color) attribute.
Then, it remaps this value from the original range 0 to 1
to a new range defined by user-controlled parameters min
and max
via the chf()
function.
In summary, this scales the mesh size attribute proportionally according to the red color component, allowing dynamic control over the mesh size range through interface parameters.
This video demonstrates the full remeshing process in Houdini, guided by a custom-painted color mask. The mask acts as a spatial controller, allowing denser triangulation in high-detail areas and coarser geometry where less precision is needed. This targeted approach is particularly useful in workflows that balance visual fidelity and performance—such as game assets, simulations, or stylized effects. By converting the color data into adaptive edge length values, Houdini intelligently redistributes geometry, resulting in a cleaner, more efficient mesh that aligns with both artistic intent and technical constraints.