5 Transforming an OpenUSD Xform

 

This chapter covers

  • Manipulating Xforms
  • Understanding the math
  • Playing with scene layouts

Let’s kick off part two by focusing on the essential skills needed to dynamically control the elements within your scene. Up until now we’ve been using a simple approach to transforming objects, in order to introduce the basic concepts. However, there are more complex ways of working with Xforms that can prove both useful and efficient in many types of applications for OpenUSD.

For example; a self-driving car will need to understand its position in the world relative to other objects; an design engineer may want to move parts of a model very precisely according to their own size, so that they sit exactly next to other parts; a digital twin of a robot is being trained to pick up a cup, but how will it know when it has grasped the cup?

The solutions to these situations lie in a deeper understanding of how Xforms operate individually, but crucially, how they can interact and inform each other's position and movement on a stage.

We'll start by learning about the importance of the order in which transformations are applied and how it can affect the intended result. Then we’ll take a deep dive into the necessary math and geometry basics, ensuring you have a solid foundation before moving on to more complex tasks.

5.1 Revisiting Xforms

5.1.1 Understanding Transform Order

5.1.2 Applying Transform Order

5.2 Mastering Rotation

5.2.1 Euler Angles

5.2.2 Quaternions

5.2.3 Transform and Rotation Matrices

5.2.4 Summary of Rotation Methods

5.3 Playing with Scene Layouts

5.3.1 Obtaining World & Local Transforms

5.3.2 Compute the Bounding Box

5.3.3 An Example Stage

5.3.4 Enhancing the Look of Your Stage

5.4 Summary