# Understanding different spaces

### #1KPBeast

Member

• Members
• 30 posts

Posted 28 September 2008 - 08:15 PM

Well I have knowledge of spaces, but I have noticed recently, as I try to go deeper, that I am just blindly following books and tutorials. So I figured I would ask around to get a better explanation that I couldn't find online.

I have three pictures, the first two are in the same space:

I assume this to be world space, which is pretty easy to understand.

This is world space as well, if I am correct above, but how do you translate from world space, in this image, to model space?

Here is a picture of model space I think. Now how would you go from model space to world space. And is this also known as local space?

Now those are my three pictures, as I don't think there are any other spaces in 2D. But my other question is what would the value be in eye-space for those images above? And are there any other spaces that I am forgetting about?

### #2Goz

Senior Member

• Members
• 575 posts

Posted 28 September 2008 - 08:45 PM

In the second image are you saying that the square is set up such that the lower left corner is at 10,10? Ie exactly the same as the previous image but translated 10 in the x and y direction?

If so then its pretty easy. If your matrix holds a translation of 10 in x and y ie

1 0 0
0 1 0
10 10 1

Then you need the inverse of this transformation to move that lower left to the origin. However if the model is defined in this "world space" then "model space is a fallacy". Its perfectly plausible to have a model whose space's origin is not contained within the object.

Anyway the translation of the object to this hypothetical "model space" that I mentioned earlier would, simply, be the inverse of the translation transformation matrix.

ie

1 0 0
0 1 0
-10 -10 1

Sorted :D

In the third image I assume you have the rotation stored in the matrix. Therefore AGAIN the translation back to the original (ie first) image would, simply be the inverse of the transformation that converts it to that. The caveats form the previous explanation apply.

"Local space" is an odd one. It doesn't really exist (Mind nor does world, view or projection). These spaces are just names for arbitrary spaces. Local space as such is very context specific. Local space is usually used to refer to the default model's coordinate space. By applying the world transformation you are then translating it into world space. Indeed when getting into things like skeletal hierarchies you will often find people talking about "bone [local] space".

I'm not entirely sure from your final questions that you have a proper handle on what a space is. It is just an arbitrary coordinate space that you use to define whatever you want. Eye-space in 2D is usually screen space (A view transformation is just needlessly complicating matters). As for spaces you are forgetting. Make one up ... and thats a valid coordinate space. What you have in your images above are merely transformations. Each transformation transforms from one arbitrary space to another. If you do mean what transformations have you missed then you have, obviously, missed the scale transformation defined as follows.

sX 0 0
0 sY 0
0 0 1

Hope thats some help. Mathematical terminology is damned hard work at time and its quite possible I've made mistakes in my explanation but thats the gist of it. TBH, I learnt how to do all these transformations and it was only after long chats with a hardcore mathematician friend of mine that I began to understand what all the terminology meant. I knew how to use it but was buggered if i knew what it was ;)

#### 1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users