render delegate: support displayColor
pmolodo opened this issue · comments
For the default shader, would be nice to support primvars:displayColor, like GL stream renderer, and make the shader a lambert
for usdview support, this would require handling the usdview default light in some manner
Once #31 is done, all we have to do is to add a user data reader with a sensible default value to the fallback shader.
There are some quirks of this feature, first of all, when we set displayColor
on any prims, it'll be passed through as color
(with a purpose of color
) to hydra from USD, and will always have the type of VtArray, and displayColor
will be passed through as well, with the right type and value (like GfVec3f, and VtVarray). This happens, because UsdImagingDelegate generates color
from multiple possible sources, it looks for a material assignment, for a displayColor primvar on the prim etc... So we should aim for supporting the color
primvar coming from the SceneDelegate, and use that lookup in our user_data_reader node instance.