Houdini to Maya part1: Multiple Vertex Color Data

This will be a series about Houdini and Maya, and how to transfer data between the two using mainly the Houdini Engine.

There is a simple way to export multiple vertex colour data from Houdini to Maya.
You need only two nodes to do that:

Attribute Wrangler node:

  • Create a new vector attribute to store the original point color data (this is the case for converted Height Fields as well). The original data can be float data as well of course. Houdini converts it automatically.
    Maya vertex color attribute names like: Cd (Houdini’s default), Cd2, Cd3, Cd4 etc. (Yes there is no Cd1 or Cd0). Use those names! This is necessary.
  • Remap those values if necessary (use a fit or an efit function).
  • Use the setattribtypeinfo function to change the simple vector attribute (3flt) to color attribute (3flt (Clr)). This is also necessary.
  • For example:
v@Cd2 = efit((@height), 0,15,0,1);
setattribtypeinfo(0, "point", "Cd2", "color");

v@Cd3 = efit((@flow), 0,1,0,1);
setattribtypeinfo(0, "point", "Cd3", "color");

v@Cd4 = efit((@debris), 0,15,0,1);
setattribtypeinfo(0, "point", "Cd4", "color");

v@Cd5 = efit((@water), 0,1,0,1);
setattribtypeinfo(0, "point", "Cd5", "color");

v@Cd6 = efit((@bedrock), 0,1,0,1);
setattribtypeinfo(0, "point", "Cd6", "color");

v@Cd7 = efit((@mask), 0,1,0,1);
setattribtypeinfo(0, "point", "Cd7", "color");

Attribute Promote node:

  • Use this to promote the point color data to vertex color data.
    Original Class: Point
    New Class: Vertex
    Of course add the attribute’s names
  • For example:
In this case, we have Cd, Cd2, Cd3, Cd4, Cd5, Cd6, Cd7

That’s it.

You can use this method with the default Rop Alembic Output node, or within an hda inside Maya/Houdini Engine. Works either way.

Example:

My Island Generator Tool (wip) inside Maya’s viewport, the different Vertex Color data:

Notes:

You should be really careful regarding the polygon number when generating multiple vertex colour data. That can be problematic. 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.