Cannot get maya_colorset_name[] to work
5075 11 1- creepmaster
- Member
- 13 posts
- Joined: 4月 2011
- Offline
Hi, I was following the doc https://www.sidefx.com/docs/maya/_maya__mesh.html#Maya_Mesh_MultiplePieces_Output. [www.sidefx.com]
I can make color set name to works when it is a single entry, but I have a problem with the array. The color set data in Maya was correct, but the name reverted back to Cd, Cd2 instead.
Is there anything I missed?
I'm using Houdini 16.5.473, 10 Maya 2017, and engine 16.5.473 on win 10.
I can make color set name to works when it is a single entry, but I have a problem with the array. The color set data in Maya was correct, but the name reverted back to Cd, Cd2 instead.
Is there anything I missed?
I'm using Houdini 16.5.473, 10 Maya 2017, and engine 16.5.473 on win 10.
Edited by creepmaster - 2018年10月22日 03:06:53
- juliap
- Member
- 146 posts
- Joined: 10月 2017
- Offline
The problem is the the color attributes that the plugin uses are string tuples and not string arrays. It was done that way because HAPI supported string tuples and not arrays. And we don't support string tuples in attributeCreate because string tuples are not commonly used by many other Houdini nodes. So if you want to set up the color set name mapping for geo that originates in Houdini and not from a a Maya input, the easiest way is probably to add those detail attrs in a python node.
- creepmaster
- Member
- 13 posts
- Joined: 4月 2011
- Offline
juliap
The problem is the the color attributes that the plugin uses are string tuples and not string arrays. It was done that way because HAPI supported string tuples and not arrays. And we don't support string tuples in attributeCreate because string tuples are not commonly used by many other Houdini nodes. So if you want to set up the color set name mapping for geo that originates in Houdini and not from a a Maya input, the easiest way is probably to add those detail attrs in a python node.
Thanks Juliap, I went back and make it Tuple in Python SOP. But still, Maya wont read it.
Edited by creepmaster - 2018年10月26日 04:09:45
- juliap
- Member
- 146 posts
- Joined: 10月 2017
- Offline
- creepmaster
- Member
- 13 posts
- Joined: 4月 2011
- Offline
- xtvjxk123456
- Member
- 3 posts
- Joined: 5月 2018
- Offline
creepmasterjuliap
The problem is the the color attributes that the plugin uses are string tuples and not string arrays. It was done that way because HAPI supported string tuples and not arrays. And we don't support string tuples in attributeCreate because string tuples are not commonly used by many other Houdini nodes. So if you want to set up the color set name mapping for geo that originates in Houdini and not from a a Maya input, the easiest way is probably to add those detail attrs in a python node.
Thanks Juliap, I went back and make it Tuple in Python SOP. But still, Maya wont read it.
sorry, I can't make that work, can you show me some detail?
- juliap
- Member
- 146 posts
- Joined: 10月 2017
- Offline
My Sop for adding the color set name mapping attrs to geometry that originated in houdini looked something like this:
cs_mapped_Cd = geo.addAttrib( hou.attribType.Global, “maya_colorset_mapped_Cd”, “Cd”)
cs_name = geo.addAttrib( hou.attribType.Global, “maya_colorset_name”, “NewCol”)
cs_mapped_Alpha = geo.addAttrib( hou.attribType.Global, “maya_colorset_mapped_Alpha”, “Alpha”)
cs_mapped_Cd.setSize(2)
cs_name.setSize(2)
cs_mapped_Alpha.setSize(2)
geo.setGlobalAttribValue(“maya_colorset_mapped_Cd”, (“Cd”, “Cd2”) )
geo.setGlobalAttribValue( “maya_colorset_name”, (“NewCol”,“NewCol11”))
geo.setGlobalAttribValue( “maya_colorset_mapped_Alpha”, (“Alpha”, “Alpha1”))
cs_mapped_Cd = geo.addAttrib( hou.attribType.Global, “maya_colorset_mapped_Cd”, “Cd”)
cs_name = geo.addAttrib( hou.attribType.Global, “maya_colorset_name”, “NewCol”)
cs_mapped_Alpha = geo.addAttrib( hou.attribType.Global, “maya_colorset_mapped_Alpha”, “Alpha”)
cs_mapped_Cd.setSize(2)
cs_name.setSize(2)
cs_mapped_Alpha.setSize(2)
geo.setGlobalAttribValue(“maya_colorset_mapped_Cd”, (“Cd”, “Cd2”) )
geo.setGlobalAttribValue( “maya_colorset_name”, (“NewCol”,“NewCol11”))
geo.setGlobalAttribValue( “maya_colorset_mapped_Alpha”, (“Alpha”, “Alpha1”))
- xtvjxk123456
- Member
- 3 posts
- Joined: 5月 2018
- Offline
- juliap
- Member
- 146 posts
- Joined: 10月 2017
- Offline
OK, my graph was slightly different, I used a python geometry asset rather than a python node, my color attrs had alpha, and I didn't bother setting the current color set. Can you repost the image of your spreadsheet with the entire names showing? If there's nothing obviousI can look at migrating my graph towards yours and see when it breaks. There's at least one outstanding bug related to alpha that I ought to take a look at anyway
Edited by juliap - 2019年4月1日 15:17:25
- juliap
- Member
- 146 posts
- Joined: 10月 2017
- Offline
Yeah, looks like it loses the mapping if the Alpha isn't also specified. The default color set type that it creates in maya is RGBA, but it should respect the presence/absence of Alpha and/or size of the color attr (since it seems likely that it's bailing early somewhere due to the lack of alpha, and missing out on the name remapping - I will take a look) - I guess I've gotten into the alpha setting habit cause that's what Maya expects.
J.
J.
Edited by juliap - 2019年4月2日 11:14:56
- xtvjxk123456
- Member
- 3 posts
- Joined: 5月 2018
- Offline
juliapYou're right, it works fine now.
Yeah, looks like it loses the mapping if the Alpha isn't also specified. The default color set type that it creates in maya is RGBA, but it should respect the presence/absence of Alpha and/or size of the color attr (since it seems likely that it's bailing early somewhere due to the lack of alpha, and missing out on the name remapping - I will take a look) - I guess I've gotten into the alpha setting habit cause that's what Maya expects.
J.
color set name can be renamed correctly
Thanks!!
Edited by xtvjxk123456 - 2019年4月9日 00:13:19
- juliap
- Member
- 146 posts
- Joined: 10月 2017
- Offline
Fixed in 17.5.222 - you need to set up the mapping for the channels you actually have - if you just have RGB or just Alpha. Also, it will now respect the color representation of the maya color set coming in, or you can set the maya_colorRep attribute (to RGBA, RGB, or A) to specify your own color representation for Maya.
-
- Quick Links