2. Simple Objects

In the next two tutorials, we will showcase the basic editing functions and concepts by building an mock mobile robot, or a rectangular body with two cylindrical wheels. In this tutorial, we will add the shapes needed and edit their physical properties. We will add the joints and articulations that are needed to move this mock robot in the next tutorial.

2.1. Learning Objectives

This tutorial details how to add simple primary shapes to the scene and edits their properties. We will cover how to

  • Add and manipulate simple shapes

  • Enable physics properties in objects

  • Examine collision properties

  • Editing physics properties such as friction

  • Editing material properties such as color and reflectivity

2.2. Getting Started

Prerequisites

2.3. Adding Objects to the Scene

1.. We will start by adding a Cube to the stage as the mobile robot’s body. Go to the Menu Bar and click Create > Mesh > Cube. 2. Move it above the ground and change its shape by using the gizmos. Keep the property tab open for the cube, and you will see that movements by the gizmo are reflected in the object’s transform. 3. You can also directly type into the property window to make your changes. Let’s fix the height of the cuboid at 100, and the x-scale at 2 and z-scale at 0.5.


  1. In the same manner as above, add a cylinder to the stage, and place it at y = 150 and z = 100 and rotate it around x-axis by 90 degrees.

  2. Duplicate the cylinder we just made by right click it on the stage tree and Duplicate, and move it to y = 150 while keeping all other parameters the same.

2.4. Adding Physics Properties

When the objects are first added, they are only visual objects, with no physics or collision properties attached to them. If you start the simulation by pressing Play and gravity is applied, these objects do not move because they are unaffected by physics. Let’s turn them into rigid bodies with collision properties, as a robot should be.

  1. Select the Cube and both Cylinders on the stage tree by click while holding down Ctrl + Shift key to select each object, or just Shift if they are consecutively listed on the tree.

  2. In the Property tab, click on the + Add button, and select Physics > Rigid Body with Colliders Preset.

  3. Press Play, and all three objects should now fall to the ground.

“Rigid Body with Colliders Preset” automatically add both Rigid Body API and Collision API to the objects. Although these two APIs can be applied separately. You can have objects that have mass and are affected by gravity but have no collision properties so you can pass right through them, as well as objects you can run into, but hang in air and are not affected by gravity. To check which APIs the selected object has, go to its Property tab, and scroll down to find sections labeled Rigid Body and Collider.

To add the APIs separately, find them under the same + Add button. To remove APIs, simply click on the X to delete the section.

2.4.1. Examine Collision Meshes

Sometimes you may need to visually examine the collision meshes for the objects. To see the outlines of the collision meshes, find the eye icon on top of the viewport, and click Show By Type > Physics > Colliders > All. Purple outlines should show up surrounding any objects that has collision APIs applied. In this case, it should be the cuboid, the cylinders, as well as the ground plane.

../_images/isaac_tutorial_gui_collision.png

2.4.2. Adding Contact and Friction Parameters

For modifying frictional properties, we need to first create a different physics material and then assign it to the desired object. Go to the Menu Bar and click Create > Physics > Physics Material, select Rigid Body Material in the popup box. A new PhysicsMaterial will appear on the stage tree. Parameters such as friction coefficients and restitution can be tuned in its property tab.

To apply the assigned physics material to an object, select the object in the stage tree, find the menu item Physics Materials on Selected Model in the Proerpty tab, and select the desired material in the drop down menu. Note that this is only available for objects with collision API applied.

../_images/isaac_tutorial_gui_physics_material.png

2.5. Material Properties

The objects may reflect the color of the spotlight we’ve added earlier, but it doesn’t actually have any colors assigned. You can confirm it by turning off the spotlight.

../_images/isaac_tutorial_gui_toggle_spotlight.gif

To change the color of the object, we need to first create a different material and then assign it to the objects, just like with the physics materials. Let’s create two, one for the body of the car, and one of the wheels.

  1. Click Create -> Materials -> OmniPBR twice.

  2. Right click on the newly added materials on the stage tree and rename them to body and wheel.

  3. Assign the corresponding rigid bodies to the newly created materials by going to the Materials on selected models item in its Property tab, and select the matching material from the dropdown box.

  4. Change the property of the new materials. Select one of them on the stage tree, change its base color in Material and Shader/Albedo and play with its reflectivity roughness, and whatever else you find interesting. You should see the color of the corresponding parts on the car change in accordingly.

2.6. Summary

This tutorial taught how to add and manipulate object properties in the GUI. The following topics were covered:

  1. Adding primitive shapes onto the Stage.

  2. Editing material properties, physics properties, and collision properties.

2.6.1. Next Steps

Continue on to Simple Robot to learn how to turn these geometries into a moving car.

2.6.2. Further Reading

More on Materials as part of Omniverse Create