Is there any recommend / best practice workflows for extracting a subset of points out of a point instancer into xform prims?
We need to take the point instanced geo and simulate a sub-section of that, but preserve the material bindings / materials that were assigned to the prototype (this must be a common senario?).
Our pipeline is complicated by not using an asset resolver since our stages are build dynamically using abstract prims to respresent our assets. The instancer’s prototype sources are setup in LOPS using the abstract prims as prototype sources.
We’ve made a few HDA’s to help with populating the invisibleIds on the point instancer and taking that array of points and creating new xform prims for each
Question 1:
What is the best way to convert the orientation quat to a rotation for an xform? This is what I am doing:
Gf.Rotation(quat_array).GetAxis()
Question 2:
- Is it possible to batch create 1000’s of xformOps within an Sdf.ChangeBlock?
In order to preserve the material bindings we inherit the abstract class onto the new xform prim and then deactivate the meshes, mateirals etc and flatten the layer to preserve the material bindings on the geometry under each xform prim. This flatten comes at a cost which ideally I would like to avoid. The problem is leaving a live inherits on the prim will be stronger when composed (since the layer that contains the new mesh / inherits is referenced in).
We slurp the xforms / meshes into SOPs, manipulate then feed that unique geo back into a SOP import LOPs.
This new SOP’s geo is combined with a layer which is pre-flattened to preseve the geo’s material bindingsand the material inherits is layered ontop of the new geo and the whole thing is dumped out to a layer. This preserves the per-xform material bindings.
I suspect being able to use sublayers more directly would reduce this complexity, but that isn’t an option for us right now.
I hope that makes sense - any tricks and tips would be super helpful as I see us hitting a wall pretty quickly if we need to de-instances 10’s of thousands of points for some reason.