Autodesk / arnold-usd

Arnold components for USD
https://www.arnoldrenderer.com/
Other
244 stars 57 forks source link

Improve point instancer in the render delegate #1079

Open sebastienblor opened 2 years ago

sebastienblor commented 2 years ago

Currently, when a PointInstancer has a group of nodes as prototypes (e.g. if it's a xform, or even a reference to an external file), it will end up flattening all the instances, and render one ginstance node per leaf object.

For example: if a point instancer has 1000 instances of a a xform that contains 1000 meshes under it, we'll end up rendering 1000 x 1000 ginstances nodes in the arnold universe, each one pointing to the corresponding mesh.

On the other hand, in the procedural, in this case we create a nested usd procedural that only loads the prototype (with the attribute object_path ) and then the 1000 instances of the nested usd procedural. So this ends up with way less AtNodes in the arnold universe. We should match the behaviour in both the procedural and the render delegate

sebastienblor commented 2 years ago

Creating a nested usd procedural doesn't sound doable at the moment, since in Hydra we don't have a filename to create a nested usd procedural. We only have a bunch of Hydra nodes in the render index, so I don't think we can apply the same strategy as in the procedural.

autodesk-oss-arnold-bot[bot] commented 1 year ago

Issue synced internally to ARNOLD-13300