Inheriting point Cd when using USD point instancing

Hi,
Is there some way to inherit point color when using USD point instancer (originating from Houdini/Solaris). I need to differentiate color (let’s say color tint) based on Cd parameter. Any clues on how to work with that?

Hello j.grobelny,

Thank you for posting, I will bring your inquiry to the proper channels for review.
Thank you for your patience.

Hello j.grobelny!

USD point instancers can have primvars that are per-instance. See the section “Primvars on PointInstancer” on this page for some details about how they apply to each point:

https://graphics.pixar.com/usd/docs/api/class_usd_geom_point_instancer.html

If your Cd parameter can be exported as a primvar, for instance primvars:displayColor then it should be available on the USD stage. I think that some Houdini LOPs do that conversion automatically, I’m not sure about point instancers though.

One note about our support for primvars in Omniverse tools. We’re currently working on rolling out support for general primvars, but it isn’t in our public tools yet. Create will use the first color it finds in primvars:displayColor, so if you only need one color per point in your point instancer that should work today. More robust primvar support is coming soon!

Please see the attached USD - I have displayColor on the PointInstancer and I have a PreviewSurface assigned to each Protoype, but primvar:displayColor is not applied.

Is there some other step I’m missing here?


OV_displayColor.usd (3.1 KB)

Hello Daryl! I think we’re missing a file named displayColor.usd that the attached OV_displayColor.usd file references. The missing file has the geometry and the point instancer in it, so I can’t say necessarily what it is that isn’t working.

I re-read my original reply above, and I think I misspoke. Because we don’t have support for displayColor beyond the first value, I don’t think you can use a primvar to assign a color to each point instance in Create. You can create different colored prototype prims though, and use that prototype list to have a bunch of different colored instances.

I went ahead and edited your file to work that way. In this file I filled out a point instancer and protoypes, and I made 3 new materials that derive from the perInstance material. I made each new material set a new diffuse color, but you could change other parameters the same way. Then, I made a prototype for each color, and used those prototypes to populate my instances. It isn’t as flexible as using primvars, but until we have support for them this would be one way to get multicolored point instances.

OV_displayColor_edited_multi_material.usda (7.6 KB)

Once we do support primvars, I think you’d need to create a USDPrimvarReader_float3 shader node, which could take your displayColor and assign it to a PreviewSurface input value, like inputs:diffuseColor.

1 Like