Andrew.Seymour

Andrew.Seymour

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

LOD Asset using retainattrib Dec. 6, 2018, 8:35 a.m.

The mapping between Maya colorsets and attributes in Houdini seems to be broken. It looks like it was broken on an earlier version of Houdini from reading posts too.

I've attached the simple source files I'm trying to use

In the Python node (Which I have to keep outside of the Asset, otherwise I get errors in Maya and no geometry created??), I set the mapping from the Maya colorSets to the Houdini Attributes like so:

    'maya_colorset_name': ['colorSet1', 'colorSetLod'],
    'maya_colorset_mapped_Cd': ['Cd', 'Cd2'],

However if I reverse the order of the maya_colorset_name,

'maya_colorset_name': ['colorSetLod', 'colorSet1'],

there is no reversal of effect in Maya. It's like it makes no difference what's in ‘maya_colorset_name’.

Can anybody test this for me? There seems to be very little information on this online.

LOD Asset using retainattrib Dec. 5, 2018, 6:31 a.m.

Ok, I think I'm making some progress.
I had to use a attribpromote from Point to Vertex (Cd) outside the Asset in order to preview in Houdini, and then an attribpromote Vertex to Point (Cd) inside the Asset to get the polyReduce node to use the vertex colour info in Maya.

I really think this needs explaining in the Houdini Maya workflow docs and tutorials. The fact that Houdini generally seems to use Points for data whereas Maya Maps to vertex or vertex face.

Now I've added a Python node to set the variable names as below, with my polyReduce node set to use Cd2 param. Unfortunately the order of the ‘maya_colorset_name’ tuple seems to make no difference as to which is being used for Cd2. Am I misunderstanding how maya_colorset_name maps to maya_colorset_mapped_Cd? In the example below I expected the ‘colorSet1’ to be used for my polyReduce node, but it doesn't

node = hou.pwd()
geo = node.geometry()
 
attributes = {
    'maya_uv_name': ['uvSet1', 'uvSet2'],
    'maya_uv_mapped_uv': ['uv', 'uv2'],
    'maya_uv_current': 'uvSet',
 
    'maya_colorset_name': ['colorSet_Lod', 'colorSet1'],
    'maya_colorset_mapped_Cd': ['Cd', 'Cd2'],
    'maya_colorset_mapped_Alpha': ['Alpha', 'Alpha2'],
    'maya_colorset_current': 'colorSet1',
}
 
for attr_name, attr_count in attributes.items():
    geo.addAttrib(hou.attribType.Global, attr_name, attr_count, transform_as_normal=False, create_local_variable=False)
    geo.setGlobalAttribValue(attr_name, attr_count)

LOD Asset using retainattrib Dec. 5, 2018, 3:54 a.m.

I still can't get it to read the vertex colour even after reducing the asset to only have the percentage to keep as an exposed parameter. I've checked the tickbox in Houdini for “Retain Density By Attribute”, and set the Attribute to “Cd”

It works in Houdini, but not in Maya:





On another note, I've noticed that if the mesh in Maya has Vertex Alpha of a constant of 1.0 on all vertices, then when the asset is applied to the mesh that Houdini sees the Mesh as having 0.0 in the Alpha instead. If I paint a few vertices with a value other than 1.0 as in the attached example then the alpha values come through correctly.