ResidualVM logo Forum Index - ResidualVM website - Contact us - Rules Login    Register     Search curved edge
It is currently Sun Jun 25, 2017 5:21 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Dec 24, 2013 12:18 am 
Offline
User avatar

Joined: Thu Jun 21, 2012 3:00 pm
Posts: 129
So, I thought about taking another look at those pesky initial rotations which some models have, gatekeeper.3do for instance.

I took another look at cplhenshaw's converter, and I understood how the hierarchy works, quite similar to how a skeleton would work, e.g.: first you position the neck, and then you position the head on top of it, and so on. Only weird thing is sibling handling, I guess that works OK if you imagine sibling nodes being on the same level of e.g. a binary tree, making them have the same parent (while the parent is not referencing all the children).

But when it comes to rotations, I can't quite grasp them. For example, standard rotation around a pivot would include:

- translating to pivot point
- rotating

As cplhenshaw's converter already adds the pivot's offset to the mesh position, I guess the only thing left to do is rotate.

Now for the questions:

As I understand, Grim's rotation is:
- Pitch around X
- Roll around Y
- Yaw around Z

- Is this how it works originally, or is it this way to compensate for left handed / right handed systems in ResidualVM? (Direct3D / OpenGL)

- Are the values in the files (which seem to be degrees) already added to the models (so they would need to be subtracted, or rotated in the opposite directions), or are those values that we need to rotate the mesh with, in order to get to a coherent mesh positioning?

- Are the values cumulative by parent, or individual by mesh?
e.g.: neck rotation is: 90, 0, 0. head rotation is : 90, 0, 0.
Would we need to rotate the head by: 180, 0, 0?

Frankly, I've already got some code that executes rotation transformation on vertices, but I'm unable to get them right. Any insight would be appreciated.

P.S.: I tried looking at how it's handled in ResidualVM, but the inverted up-axis for Grim (or was it EMI?) and all the math which follows because of it is giving me a headache. :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 05, 2014 2:58 pm 
Offline
User avatar

Joined: Tue Jul 19, 2011 2:51 am
Posts: 324
Location: aka ThunderPeel2001
Happy New Year! I hope you get an answer to this. (I'm sure Guicam or Somaen should know?)

I wish I could be of more help in this matter :-/


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 06, 2014 12:48 pm 
Offline
User avatar

Joined: Thu Jun 21, 2012 3:00 pm
Posts: 129
Happy New Year, and Happy Holidays to all of you :)

Actually, I took my own advice after writing this, and saw that there is a documented order and some other stuff I can borrow from in rotation3d.h, but I haven't had any time to check or apply it yet. I will post again when I have news, though I don't know when this will be.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 12, 2014 6:23 pm 
Offline
User avatar

Joined: Tue Jul 19, 2011 2:51 am
Posts: 324
Location: aka ThunderPeel2001
Great. Looking forward to it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Forum design by ScummVM team, icons by raina, adopted for ResidualVM
curved edge   curved edge