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.

DarkBASIC Professional Discussion / limb angle x() doesn't work??

Author
Message
Nytus Sermus
13
Years of Service
User Offline
Joined: 17th Jan 2013
Location:
Posted: 7th Oct 2014 11:43
I was trying to create a new glue object-like command that is expanded to support offsets (positions and angles), so i could not only glue to a limb, but also offset it from that pos/angle. i am using single mesh skeleton based models and i found out that expressions 'limb angle x()' always return zero, even while the animations are playing and the limb angles are clearly non-zero. Do these limb commands work on such models? I have tracked it down to the point that i know the expressions always return null, any help would be great, thanks.

I've seen the expression works with limb models like DarkMatter1 but can't get it to work with DM2 type models or any with skeleton based bones / limbs.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 7th Oct 2014 17:06
I have encountered this problem with Direct X models exported from Blender. I have not found a solution.

Nytus Sermus
13
Years of Service
User Offline
Joined: 17th Jan 2013
Location:
Posted: 8th Oct 2014 00:09
Its funny how every time i'm about to make a breakthrough i come to another wet wall, its like TGC saw me coming...ha ha... no but seriously this has me wondering how the glue limb command works in those cases and how it is able to set the correct angles of an object glued to a limb who's angles are unreadable. I guess its done internally somehow. The only solution i can think of would be to track the bone angles manually over time using an array or some data storage, but this seams unreasonable if not improbable, does anyone know how this could be implemented? And does anyone know if this problem exist with DarkMatter2 models as well?

BTW: i have been trying to implement a glue system that uses cos() and sine() but so far i can't get it quite right, if anyone has the correct code to offset object B to object A taking into account object A's local rotations....feel free to share, i ended up doing it manually using position, rotate and move commands, but this wouldn't be as fast when a large number of objects are being "glued". thanks again.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 8th Oct 2014 00:55
Hi there. I have seen this problem before with objects exported from differents programs. It seems like some programs gives zero position for limbs and zero for angles also .

I found a solution for my purpose that perhaps could help you here. Instead of gluing to limb, use limb position x,y,z and position your object on top of it. To rotate this object according to limb , use
limb direction x(1,L) ,limb direction y(1,L) , limb direction z(1,L).



Cheers.

I'm not a grumpy grandpa
Nytus Sermus
13
Years of Service
User Offline
Joined: 17th Jan 2013
Location:
Posted: 8th Oct 2014 02:40
Wow, worked like a dream.... i can't believe i never used limb direction, this is insane! am i dreaming? WhooHoo chafari your awesome; no wonder your a valued member
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 8th Oct 2014 16:51
I've learned to never underestimate Chafari!
That Yoda graphic is the real deal!!


Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 8th Oct 2014 17:09 Edited at: 8th Oct 2014 17:10
Now that's what you call a chafarication; I did not think to ask about the end goal which is well suited for the limb direction commands.

I am still confused as to why the local limb angles are zero.

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 8th Oct 2014 19:42
@Nytus Sermus
Enjoy it !

Quote: "I've learned to never underestimate Chafari!"

We learn something new every day


Quote: "Now that's what you call a chafarication; I did not think to ask about the end goal which is well suited for the limb direction commands.

I am still confused as to why the local limb angles are zero.
"


That's why I had to resort to this method . I guess it will be something like vertexdata . we can move an object and its center could be static


May the force be with you ....Cheers

I'm not a grumpy grandpa
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 9th Oct 2014 16:26
Quote: "
I am still confused as to why the local limb angles are zero."


Limb Angle x(),Limb Angle y() and Limb Angle z() do not get filled
with a value until you have rotated the limb using the rotate limb commands.
Limb angle commands were for use with limb based animations not bone based animations.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 10th Oct 2014 12:32
I see now. Thanks SITDS.

Now I will have to figure out why my limb 'directions' are not the angles specified by my modelling program; even when the parent object is yet to be rotated.

Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 10th Oct 2014 15:50 Edited at: 10th Oct 2014 15:52
Quote: "Now I will have to figure out why my limb 'directions' are not the angles specified by my modelling program; even when the parent object is yet to be rotated."


They should be the same as what limb direction commands return.
I discovered that you must zero all the bones/joints rotations before animating in your modeling program.
This is the models default pose/first frame of animation that needs to be zeroed.
It is difficult to zero the rotations after you have added the animations but can be done with "Fragmotion".
I know that this works because this is what I had to do when creating the Ragdoll physics for "FPSC Reloaded".


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 10th Oct 2014 19:56
Thanks for the tip, I will add your suggestion to my TODO list.

Login to post a reply

Server time is: 2026-07-18 07:32:33
Your offset time is: 2026-07-18 07:32:33