# Load meshes into Sim?

**URL:** <https://forums.developer.nvidia.com/t/load-meshes-into-sim/257938>\
**Category:** Isaac Sim\
**Tags:** isaacsim\
**Created:** [June 26, 2023, 10:19pm UTC](https://forums.developer.nvidia.com/t/load-meshes-into-sim/257938 "2023-06-26T22:19:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user10385](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/user10385/32/129300_2.png) [@user10385](https://forums.developer.nvidia.com/u/user10385)\
**Post date:** [June 26, 2023, 10:19pm UTC](https://forums.developer.nvidia.com/t/load-meshes-into-sim/257938/1 "2023-06-26T22:19:12Z")

</div>

I can’t figure out out to load .obj files into sim. A [previous question](https://forums.developer.nvidia.com/t/how-to-conveniently-import-obj-files-via-python-scripts/204692) has references to converting the asset to usd. However, I can’t find out how to even load a usd through the api, much less do anything like adding collision or physics properties to it.

Neither the standalone example, nor the referenced [script editor conversion script](https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/reference_python_snippets.html#convert-asset-to-usd) seem to show how to load either a .usd or .obj file into simulation – even though you can drag and drop one into sim through the GUI and right click to add physics properties.

The Shapenet situation seems similar – with a lot of information about how to use the GUI and the only thing referenced in the [documentation](https://docs.omniverse.nvidia.com/py/isaacsim/source/extensions/omni.isaac.shapenet/docs/index.html) is asset conversion. This would also be really useful if I could get those in and make them collision or physics objects.

How can I load a .obj file? Or, if that isn’t possible through the api, how can I load a converted .usd asset, and add physics or collision to it? Additionally, where is this referenced in the API documentation?

---

<div class="post-metadata">

**Author:** ![msakthivel1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@msakthivel1](https://forums.developer.nvidia.com/u/msakthivel1)\
**Post date:** [June 27, 2023, 8:43pm UTC](https://forums.developer.nvidia.com/t/load-meshes-into-sim/257938/2 "2023-06-27T20:43:00Z")

</div>

I referred the steps mentioned in [this thread](https://forums.developer.nvidia.com/t/isaac-sim-how-to-import-usd-assets-into-a-scene/201253).

- First you have to convert OBJ files into USD files using the example script
- Then you can use the `omni.isaac.core.utils.stage.add_reference_to_stage` function
- For adding physics to the mesh refer the Frequently Used Python Snippets section in the Isaac Sim API docs

---

<div class="post-metadata">

**Author:** ![user10385](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/user10385/32/129300_2.png) [@user10385](https://forums.developer.nvidia.com/u/user10385)\
**Post date:** [July 5, 2023, 6:26pm UTC](https://forums.developer.nvidia.com/t/load-meshes-into-sim/257938/3 "2023-07-05T18:26:05Z")

</div>

So that would look like:

```auto
import omni
from omni.physx.scripts import utils
from omni.isaac.core.utils.stage import add_reference_to_stage()

# Create a mesh in the stage
add_reference_to_stage(usd_path="omniverse://path/to/mesh.usd", prim_path="/World/mesh")
# Get the prim
mesh_prim = stage.GetPrimAtPath("/World/mesh")
# Enable physics on prim
utils.setRigidBody(mesh_prim, "convexDecomposition", False)

```

Also where is the documentation for omni.physx.scripts?
