Isaac Sim Version
4.0.0
Operating System
Windows 11
GPU Information
- Model: RTX 4090 Laptop
- Driver Version: 566.36
Steps to Reproduce
- scatter 20,000 instances of a small mesh using a scatter node
Screenshots or Videos
Topic Description
When i start my simulation, I scatter small patches of grass. Until now, I scattered 2000 instances.
If I increase the number of instances to 20000, the editor frizes.
this is how I initialize my scatter graph:
def init_graph(self, surface_prims_path, rand_usd_paths):
self.graph = og.Controller.create_graph(
graph_id = {
"graph_path" : f"/Graphs/ScatterGraphs/grass_Graph",
"fc_backing_type" : og.GraphBackingType.GRAPH_BACKING_TYPE_FABRIC_WITHOUT_HISTORY,
"pipeline_stage" : og.GraphPipelineStage.GRAPH_PIPELINE_STAGE_ONDEMAND
}
)
keys = og.Controller.Keys
_, _, _, nodes = og.Controller.edit(
self.graph,
{
keys.CREATE_NODES: [
("OgnScatter2D", "omni.replicator.core.OgnScatter2D"),
("OgnSamplePopulation", "omni.replicator.core.OgnSamplePopulation"),
("OgnCount1", "omni.replicator.core.OgnCount"),
("OgnCount2", "omni.replicator.core.OgnCount"),
("OgnSampleUniform", "omni.replicator.core.OgnSampleUniform"),
("PerAxisPose", "omni.replicator.core.OgnPerAxisPose"),
("OgnWritePrimAttribute", "omni.replicator.core.OgnWritePrimAttribute"),
],
keys.CONNECT: [
("OgnSamplePopulation.outputs:prims", "OgnCount1.inputs:prims"),
("OgnCount1.outputs:count", "OgnSampleUniform.inputs:numSamples"),
("OgnSampleUniform.outputs:samples", "PerAxisPose.inputs:fullValues"),
("OgnSamplePopulation.outputs:prims", "OgnCount2.inputs:prims"),
("OgnCount2.outputs:count", "PerAxisPose.inputs:numSamples"),
("OgnSamplePopulation.outputs:prims", "PerAxisPose.inputs:prims"),
("PerAxisPose.outputs:samples", "OgnWritePrimAttribute.inputs:values"),
("OgnSamplePopulation.outputs:prims", "OgnWritePrimAttribute.inputs:prims"),
("OgnSamplePopulation.outputs:exec", "OgnScatter2D.inputs:execIn"),
("OgnSamplePopulation.outputs:exec", "PerAxisPose.inputs:exec"),
("PerAxisPose.outputs:exec", "OgnWritePrimAttribute.inputs:execIn"),
("OgnSamplePopulation.outputs:prims", "OgnScatter2D.inputs:prims"),
],
keys.SET_VALUES: [
("OgnSamplePopulation.inputs:paths", rand_usd_paths),
("OgnSamplePopulation.inputs:mode", 'scene_instance'),
("OgnSamplePopulation.inputs:useCache", False),
("OgnSamplePopulation.inputs:withReplacements", False),
("OgnSamplePopulation.inputs:populationName", f"{self.assets_name}_ScatterPopulation"),
("OgnCount1.inputs:mode", 'prims'),
("OgnSampleUniform.inputs:lower", [0,0,0]),
("OgnSampleUniform.inputs:upper", [0,0,180]),
("OgnSampleUniform.inputs:outputType", "float3[]"),
("OgnCount2.inputs:mode", 'prims'),
("PerAxisPose.inputs:mode", "rotation"),
("OgnWritePrimAttribute.inputs:attribute", "xformOp:rotateXYZ"),
("OgnWritePrimAttribute.inputs:attributeType", "double3"),
#("OgnScatter2D.inputs:surfacePrims", plane_path),
("OgnScatter2D.inputs:checkForCollisions", False),
("OgnScatter2D.inputs:seed", self.seed),
]
},
)
what am i doing wrong? how is it possible to scatter many meshes in Isaac Sim?