alicevision / MeshroomMaya

Photomodeling plugin for Maya
http://alicevision.org
Mozilla Public License 2.0
140 stars 36 forks source link

Add color on PC #165

Open eprana opened 8 years ago

eprana commented 8 years ago

Color is not correctly set in ABC. Should be V3dArray named rgbPP

fabiencastan commented 8 years ago

Ok, so we need to change the attribute type but we will keep the name as "color" sounds more standard than "rgbPP" and nuke recognize it.

So we need to copy the values from color to rgbPP during the load in mayaMVG.

fabiencastan commented 8 years ago

They use OC3fArrayProperty in the PointsTest: https://github.com/alembic/alembic/blob/master/lib/Alembic/AbcGeom/Tests/PointsTest.cpp#L254 https://github.com/alembic/alembic/blob/c8b92e656a5fcd4373c7a613b8f4e1069446f492/lib/Alembic/AbcGeom/Tests/SubDTest.cpp#L124

As we do in openMVG: https://github.com/poparteu/openMVG/blob/popart_develop/src/openMVG/sfm/AlembicExporter.cpp#L62

fabiencastan commented 8 years ago

Or maybe "rgb": https://github.com/alembic/alembic/blob/c8b92e656a5fcd4373c7a613b8f4e1069446f492/maya/AbcImport/NodeIteratorVisitorHelper.cpp#L577

eprana commented 8 years ago

Alembic importer in Maya set all colors to (0, 0, 0) (with attribute of type V3dArray named rgbPP, rgb or color)

eprana commented 8 years ago

Per particle attributes are reinitialized on alembic import in Maya.