Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To really answer this, we still need a bit more information about the format of your data and how you're applying transformations. But here's a guess: Your objects are most likely represented as collection of polygons which are themselves represented as a collection of points relative to some 'root point' such as the center of the object or a bottom corner. When you place the object somewhere, like a room, you can do so by applying a sequence of matrix multiplications to the points that represent the object. A single matrix multiply can usually do the whole transformation, but it makes more sense to us if we compose a sequence of transformations that do intuitive things. For example, you would usually </p> <ol> <li><strong>Scale</strong> the object to be the size you want.</li> <li><strong>Rotate</strong> the object to be oriented the way you want.</li> <li><strong>Translate</strong> the object to be where you want.</li> </ol> <p>All of these transformations happen relative to the 'root point' of the object and their order makes a big difference. If you translate and then scale or rotate, the scale and rotate will happen relative to the newly translated center. </p> <p>So, if you have placed objects in a room, and <strong>[0,0,0]</strong> of your coordinate system happens to be in the center of the room, if you scale all of the transformed points of those objects, they will all grow/shrink and push outward/inward from <strong>[0,0,0]</strong>. Since that's not what you want, you must first change the origin by translating the object, then scale, then change the origin back to where it was.</p> <p>If I have two points: <strong>[3,0,0]</strong> and <strong>[4,0,0]</strong> and I want to scale them so that the distance between them is <strong>2</strong> instead of <strong>1</strong>, if I just multiply (scale) by <strong>2</strong>, I get <strong>[6,0,0]</strong> and <strong>[8,0,0]</strong>. There's a distance of <strong>2</strong> between them now, but they both moved. If I want the first point to stay put, then I first translate by <strong>[-3,0,0]</strong>, then I scale by <strong>2</strong>, then I translate by <strong>[3,0,0]</strong> and I have what I wanted. If, instead, I want the center of those two points to remain the same, then I translate by <strong>[(+/-)3.5,0,0]</strong>. </p> <p>It falls on you to decide which points of the objects should not move. Then you move that point to the origin before scaling. Then you move it back afterward. Since you don't want your objects to push through the floor, you'll probably pick a point on the ground (or whatever surface they're attached to). If you have one object resting on another (books on a desk) then those objects should probably use the same reference point. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload