SOLVED: Alembic vertex colors export for Maya

   25883   9   5
User Avatar
Member
76 posts
Joined: March 2007
Offline
Did anyone got this to work?
The colors did import as colorSet1 from Maya.
Exporting this colorSet1 and importing back into Maya didn't work.
A bit unexpected as I was more afraid that material bindings wouldn't work but that did work.

Using the abcecho line command the alembic file does look different to the one exported from Maya.

Maya export:
CompoundProperty name=.arbGeomParams;schema=
CompoundProperty name=colorSet1;schema=
ArrayProperty name=.vals;interpretation=rgba;datatype=float32_t;arraysize=1560;numsamps=1
ArrayProperty name=.indices;interpretation=;datatype=uint32_t;arraysize=1560;numsamps=1

Houdini Export:
CompoundProperty name=.arbGeomParams;schema=
ArrayProperty name=colorSet1;interpretation=rgba;datatype=float32_t;arraysize=1560;numsamps=1

Normals and uv's are imported simular though and do work.
Using red, green, blue, alpha didn't work either.

Neither did Cd or Cd


So anyone got any good news for me?

cheers,
benS
Edited by - June 2, 2015 12:08:11
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Maybe this Topic can help you :

http://www.toadstorm.com/blog/?p=240 [toadstorm.com]

:?
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
76 posts
Joined: March 2007
Offline
Oke thanks yes I read about this SOuP thing in another post but odforce is offline.

Someone here pointed me to the -rcs flag for the AbcImport MEL command in Maya:

AbcImport -mode import -rcs “houdini_sphere.abc”;

This actually worked when the incoming colorSet1 attribute is exported again!!!

Seems the name is not critical. Any attribute that is type “float” with size 4 and has the type qualifier set to “color” will work.

cheers,
benS
User Avatar
Member
15 posts
Joined: May 2014
Offline
***EDIT*** I was writing this while you were replying…glad you got it.
This is one of the secret gems of Alembic that is woefully under documented.
Any vertex vector attribute on your geometry thats listed by Houdini as name.r,name.b,name.g on Alembic export can import and connect directly in Maya by simply adding -rcs to your import string.
The color set will be named the same as the attribute name in Houdini.
Unfortunately the Maya Alembic Import GUI doesn't have this option, but the script is super easy.
AbcImport -rcs “/path/to/myColorFile.abc”
Vector attributes listed as name.x,name.y,name.z OR name.0,name.1,name.2 will not work, so you need to double check the type on creation and editing.

The workflow suggested by Joker386 is the way to go for other arbitrary attributes, but fortunately multiple color attributes can be used to store most data that you may need.
Hopefully that helps.
User Avatar
Member
76 posts
Joined: March 2007
Offline
thanks anyway
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
ben5ch
Seems the name is not critical. Any attribute that is type “float” with size 4 and has the type qualifier set to “color” will work.


and of course it should be vertex attribute :!: :?:
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
258 posts
Joined:
Offline
Just wanted to pass along my thanks for sharing this…
User Avatar
Member
15 posts
Joined: May 2014
Offline
Yeah, I don't know why this is so poorly documented on the Maya side. Its an amazing feature for Alembic. Spread the word!
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
the weird thing is Autodesk added this feature (Write Color Sets) to Export Alembic window in the Maya2016 (maybe 2015 too) , we don't have this parameter in Maya 2014 anywhere (Just with script) , I don't know they didn't add this cool stuff in Import Alembic window too :?
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
This is an old post, but just a quick update on this. We've made a minor change in our Alembic export so that Maya should recognize the Houdini colors by default. This means users shouldn't need to manually add the “-rcs/-recreateAllColorSets” flag in the AbcImport command.

The attribute still needs to have the color qualifier (i.e. 3fc or 4fc). And, as before, the attribute needs to be a vertex attributes.

The change should be in the next daily build (14.0.394).
Andrew / アンドリュー
  • Quick Links