Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Quad, 1 invisible), 721 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
read bone rotation #408184
09/26/12 23:24
09/26/12 23:24
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Hi!

I am currently going for procedural animation and ik stuff and i miss a way of reading the current bone rotation (euler angles/quaternions (?)) of a specific bone.

Because at the moment I have to store the rotation of the bone separately which is kinda messy.

Is there a way to directly read the bonerotation?

(For the future something like ent_getbonerotation & ent_getbonerotationworld might be usefull)

Thanks in advance
Jannes / Puppeteer


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: read bone rotation [Re: Puppeteer] #408191
09/27/12 04:44
09/27/12 04:44
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
ang_for_bone or vec_to_angle with bone position

Re: read bone rotation [Re: Ch40zzC0d3r] #408272
09/28/12 13:16
09/28/12 13:16
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Nop.
You can not get the relative bone orientation with that.
It seems to me that the only way to get the relative bone orientation atm is to set the entities pan/tilt/roll to 0 and than use ang_for_bone and then set the entities orientation back.

But this causes somehow the entity to be rendered with an orientation of 0,0,0 instead of its true orientation, which seems to be bug.

And since there does not seem to be an accurate way to calculate the relative bone orientation from ang_for_bone and the entities orientation
[ the result from ang_for_bone is ang_add(relative_bone_orient,ent.pan) ]
--> the problem still exists.

Sample project

Last edited by Puppeteer; 09/28/12 13:18.

Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: read bone rotation [Re: Puppeteer] #408274
09/28/12 13:40
09/28/12 13:40
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
Hi,

Perhaps I don't understand what you want to do, but perhaps you could:

  • Get the global bone orientation using ang_for_bone
  • Transform that to a matrix with ang_to_matrix
  • Get the entity's orientation
  • Transform the orientation to a matrix
  • Compute the relative orientation using this
  • Transform back the result into an angle


Hope that helps.

Last edited by 3dgs_snake; 09/28/12 13:41.
Re: read bone rotation [Re: 3dgs_snake] #408276
09/28/12 15:05
09/28/12 15:05
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Damn, you are right! Thanks!
I thought that wouldn't work because of the ambiguity of the euler-angles...


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: read bone rotation [Re: Puppeteer] #408376
09/30/12 13:36
09/30/12 13:36
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
/think "...we should not need to do this manually...we should not need to do this manually...we should not need to do this manually..."

Re: read bone rotation [Re: FBL] #408450
10/01/12 15:00
10/01/12 15:00
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I take this as a suggestion to implement a function for reading the relative instead of the absolute bone rotation.


Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1