pablode / guc

glTF to USD converter with MaterialX support
Apache License 2.0
112 stars 6 forks source link

Generate displayColors from materials #6

Closed pablode closed 1 year ago

pablode commented 2 years ago

We can create a displayColor primvar with 'constant' interpolation by taking the base_color factor or average texture color. It might even be possible to extract vertex colors by unwrapping the UV coordinates.

The generated values are not vertex colors and they should not be referenced by the MaterialX shading graph.

pablode commented 1 year ago

Implemented in v0.2. We purposely avoid relying on textures, due to wrong estimations from packed atlases and increased conversion times (~3x longer).