Solved

Translation in object space

Posted on 2004-03-26
10
207 Views
Last Modified: 2013-12-26
I have a mesh, divided into subsets, where each subset contains a part of a human body.
Now I want this human to move. For example put the arm in the air.
The rotation axis will be the axis of the entire model and not go through the point around which
the the arm must rotate.

So I wanted to translate the model in object space, so the point around which the arm turns would
be in the origin of the object space.

Is there a way to do this?

EGSOC
0
Comment
Question by:egsoc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
10 Comments
 

Author Comment

by:egsoc
ID: 10686532
What I generaly mean is:
Can I rotate the arm around the shoulder without affecting the other subsets?
0
 
LVL 2

Expert Comment

by:Jas001
ID: 10781196
Well, I thought subsets were usually used to organize geometry by material.  Atleast thats how I use them.

Do your subsets have its own transformation matrix?  If not, you should rethink your subsets and create a hierarchy for rendering your character.  Look in the SDK under "Matrix Stack."

OR...
You can generate all of your animation outside of your application.  Load them up in your buffer and swap them every frame to simulate realtime movement.
0
 

Author Comment

by:egsoc
ID: 10781876
For now I just splitted the mesh into different files and use offsets to put them together.
That works, but it gives a lot of files.
With subsets I could approuch the bodyparts seperatly.

A matrix is calculated for each part, but when those are in subsets, I can't get the rotations right.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:Jas001
ID: 10784846
So, it sounds to me like you do have a transformation matrix for each piece of the body.  If you apply each subsets matrix before rendering that should allow you to keep everything together.

It would look like this:

//APPLY TORSO MATRIX...
  //RENDER TORSO.
    //APPLY UPPERARM MATRIX..
      //RENDER UPPERARM.
        //APPLY LOWERARM MATRIX...
          //RENDER LOWERARM.
         

//so, if you updated the matrix for the upperarm, the lower arm would still be attached appropriately.

Is that what happens with your test?
0
 

Author Comment

by:egsoc
ID: 10785756
There's what causes my problem: the matrix treates the subset as if it was still the entire mesh. For the translations that's not a problem if I use my offsets, but the rotations are wrong. You see, the axis of the rotation is the axis of the mesh which spreads the differents subsets around.
0
 
LVL 2

Expert Comment

by:Jas001
ID: 10786146
0
 

Author Comment

by:egsoc
ID: 10789477
My main question here would be:
is each bodypart a separate object (mesh/vertexbuffer) or can this be done with subsets?
0
 
LVL 2

Expert Comment

by:Jas001
ID: 10979272
Sorry, I didn't realize no one commented on this...

subsets are used for organizing things by material.  That wouldn't give you the freedom of moving an arm with a matrix.  You need to use a new mesh for each body part.  A few of the DirectX books by Andre LaMothe explain this kind of animation.

Your other option is to output all of your animations from a 3d editor and just swap them.  In which case it would be one mesh.

Happy Programming!
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 11020137
PAQed, with points refunded (125)

GhostMod
Community Support Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DirectXFramework 5 117
Java Canvas - Setting a Background Image 3 1,498
any RTS game state byte array size advice? 6 247
copyEndy  challenge 15 106
What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question