# transformation a vertex to a different coordinate system

This topic is 5059 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Ok, I have posted this elsewhere but I still have not recieved a good enough response to fix the problem. I have my mesh vertices in world space, I need them in there parent's bone space. How do I do this? I tried just find the position of the bone/joint and then finding distance from the vertex, yet because the bones are not just translated but rotated that means the coordinate system for the bone has also been rotated and I don't know the math to fix this. Please help. Thanks in advance -THACO

##### Share on other sites
It's actually simple: to transform from world to bone space you need to use inverse of matrix you use to transform from bone to world (i guess you already have this matrix).

##### Share on other sites
Ok, I sorta tried this before, maybeI wasn't doing it correctly. Is this how it should be done?
Just multiply each vertex by the inverse of its parent? Now vertex = bone space?
Now when I want to render I just multiply the vertex by actual matrix of its parent at Time T?
I am using a vertex array in OpenGL so in the end I have to change it back to world space so that is why when I render I should multiple it back by the actual matrix of the bone?
Actually I think I am really dumb because this was the first thing I tried, yet later on while trying other things I relized my matrix * vertex(vector) function was screwed up (because in school i was taught the matrix translations were on the right side, not the bottom side) I don't think I went back and tried the inverse again.
I will post again when I try it again
Thank you so much hopefully this will work, I have been stuck on this for so long.

-THACO

##### Share on other sites
Well its official I am an idiot!
That worked, I knew it was a stupid thing.
Thank you so much for reminding me about the inverse and telling me about it.
It took me all of 30 seconds to fix. You are awsome! if you keep a tally of all the people you have helped you can put another notch up there.

-THACO

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633287
• Total Posts
3011217
• ### Who's Online (See full list)

There are no registered users currently online

×