Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Positioning Limbs

Author
Message
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 29th Oct 2009 19:31
When I try to position a limb of a model ( with bones ), I get strange results!
Here is how I position the limb (should work):



Even if I set the TargetX..Z values to 0, the limb is not positioned at this position!
It looks like the limb is kind of rotated by default, even if I play no animation on it, and the offset is then applied according to the limbs axis.
I think something like dbFixLimbPivot would help, but unfortunatly there is no such command!
Does anybody know how to position the limb correctly, even when it's rotated?

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 30th Oct 2009 11:01
Isn't limb position refered to the center of the parent object?
If the main object position in the world is

dbObjectPositionX(object), dbObjectPositionY(object), dbObjectPositionZ(object)

I think that would be 0,0,0 for the limb, are you taking that into account?
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 30th Oct 2009 14:32
Yes that's what I thought would solve the problem, and that's the reason why I did TargetPos - ObjectPos to get the world coordinates.
But the strange thing is that this doesn't result in the correct coordinates!
So I thought that the offset may be relative to the limbs own axis.
Do you know if that's the case?
Another thing I can imagine, is that each limbs offset is relative to the added offsets of all parent limbs. ( e.g. limb "arm" offset is 6,6,6 and limb "hand" offset is 4,4,4 so the "hand" offset from the objects world position would be 10,10,10 ?! )
Maybe someone has some experience with these kind of things?
Basically I just want to position the limb at the correct world coordinates...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 30th Oct 2009 17:20
Anybody have an idea on this?

I'm freaking out about it
My project is stuck since I can't get over this issue...

It can't be so hard to position a limb at a world coordinate, right?

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 30th Oct 2009 17:53
Quote: "the offset may be relative to the limbs own axis.
Do you know if that's the case?"

Sorry not sure, but perhaps you can try to perform any limb rotation after it has been placed at the right position.

Quote: "...each limbs offset is relative to the added offsets of all parent limbs."

Haven't tried that either, but it sounds reasonable to happen in that way... Maybe you can dig in the DBPro forum and find it out, or isolate a simple model and test how limb positioning works, ajem
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 31st Oct 2009 18:59
Quote: "perhaps you can try to perform any limb rotation after it has been placed"

I am not doing any rotation right now. But the limb has a direction by default after loading, so I think it has its own pivot somehow!

Quote: "isolate a simple model and test how limb positioning works"

I made a new basic model for debugging, but still no success

What I need is a function like dbGlueLimbToObject

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 31st Oct 2009 23:15
Quote: "What I need is a function like dbGlueLimbToObject "


you do have something like that, its dbGlueObjectToLimb( Object Number, Second Object, Limb Number)
then you use dbOffsetLimb with the offset value which is from the center of the object.

Dark Physics makes any hot drink go cold.
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 1st Nov 2009 19:40
Quote: "dbGlueObjectToLimb"


I know that command, but I thought it would be useful to have a command that does this the other way around. Like you "glue" a certain limb to some world coordinates!

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 1st Nov 2009 22:24 Edited at: 2nd Nov 2009 00:20
I still can't figure this out!
I made a small test app to get it done, but I just can't get it work! And I don't really see why!
Here is the code: (also attached + media)



What I'm doing is I subtract the limbs position from the target position, because I assumed that this should give me the correct offset! Unfortunatly it doesn't...
Please somebody enlighten me!!!


EDIT:
Even when I do dbOffsetLimb ( object, hand, 1, 1, 1 ) the new limb position is NOT EQUAL to the old limb position + 1,1,1 ! Why???

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-10-01 16:40:20
Your offset time is: 2024-10-01 16:40:20