>: CG Forums on 3dtotal - The best forums for CG artists :.
threedy forums home
 


Go Back   3DTotal Forums > Help, Advice and Chat > Animation & Rigging Help

Reply
 
Thread Tools Display Modes
Old 15-07-2017, 10:46 AM   #1
X86Jumps
Registered User
 
Join Date: Jul 2017
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
3dsmax 2012 skeleton ik issue

I have imported with maxscript model from game (3ds max 12)
this script make bones using dummy
script display this objects as liinks

in this model knee dummy and hip aligned by x and y
and when i try make iklimb from foot to hip
as result i see incorrect angle (inverse like a bird)
how it can be resolved?
i try many time make ik hi solver and this ik limb
and 2 or 3 time i did this ik with normal angle, but cant repeat and determine where is key to solving
X86Jumps is offline   Reply With Quote
Old 17-07-2017, 10:05 AM   #2
insect
...
 
Join Date: Oct 2002
Location: Kaunas, Lithuania
Posts: 791
Thanks: 0
Thanked 23 Times in 23 Posts
This is most likely caused by the thigh and lower leg bones being in a completely straight line. The solver determines the knee direction based on which way the bend between the bones is pointing, but in such a case, it can't.

The easiest way to fix it would be to add a very slight bend at the knee joint to the bones. If it's all automated, you could edit the script to do that (offset the knee position just slightly forward before creating the bones).

Failing that, if you absolutely need to keep the limbs perfectly straight, you can set up the swivel controls for the solver first (either target swivel, or keep it controlled by the parent swivel angle as it is by default), and then edit the Preffered Angles of the bones (Command Panel -> Hierarchy tab -> Rotational Joint rollout) so that everything points the way you like. The problem being, this will change the axis orientations of the bones, so you may need to pre-rotate them before applying the solver.
insect is offline   Reply With Quote
Old 17-07-2017, 07:11 PM   #3
X86Jumps
Registered User
 
Join Date: Jul 2017
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
insect
thanks, i check now and this works)
before this, i find way to resolve this problem, but its no so obviously
i move down front and back iklimb resolver and click to ik/fk snap
and again move resolver and click and after some click i see normal angle
(yesterday i move resolver, click assume preferred angle and set preferred angle and ik/fk snap, after some click also i got normal angle)

i trying reconstruct skeleton behavior for generating animation data for this game
(script will be write data file)
but i dont know, possible this or not, i have "bones"
and have something like bone map array 02 01 08 for example
in frame data i see this bone map numbers
first time, i was think all bones will be have data about rotation/move
but its not that, for example, when just "foot" bone is up (for test just 1 bone affected) then i see similar as max picture, when we have ik solver and move him
(sorry my english)
X86Jumps is offline   Reply With Quote
Old 18-07-2017, 09:20 AM   #4
insect
...
 
Join Date: Oct 2002
Location: Kaunas, Lithuania
Posts: 791
Thanks: 0
Thanked 23 Times in 23 Posts
This depends on how it is set up in the game. The game could have its own IK rig for the legs, for example.

The bone array sounds like it could be a "mask" for applying animation. Like, a certain animation would only affect the bones in the array (for example only upper body for shooting).
insect is offline   Reply With Quote
Old 18-07-2017, 03:48 PM   #5
X86Jumps
Registered User
 
Join Date: Jul 2017
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
this array a member of object,+398 offset
max len 255
here part of this array
Quote:
00 01 02 03 04 05 06 07 08 09 0E 0F 10 11 12 24 25 26 27 28 2B 2C 2D 2E
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
here part of animation data
Quote:
010100130000803F000000000000000023AC62C195003340CA F63D410000803F00000000
010100170000803F00000000000000005935204162AA0B4058 471EC10000803F00000000
010100FC0000803F000000000000000068668BC2C1DE1343FA 285CC00000803F00000000
010100FD0000803F000000000000000068668B42BCDE1343F8 285CC00000803F00000000
020300FF0000803F00000000000000000000000077C205BF00 000000A0465A3F00000000
020000010000803F000000000000000084C0103D517385BD7B 18463DCBFE7E3F00000000
+0 word - operation (transform move rotaion scale?)
+3 boneid
+10 float.x
+14 float.y (z for dx)
+18 float.z (y for dx)
+1c float.w

i testing in collection mode, there models stay in one stance, 1 frame, good place for testing
some animation migrate to other models normal, some - not (mb data no for general skeleton)
here skeleton
X86Jumps is offline   Reply With Quote
Old 19-07-2017, 10:01 AM   #6
insect
...
 
Join Date: Oct 2002
Location: Kaunas, Lithuania
Posts: 791
Thanks: 0
Thanked 23 Times in 23 Posts
Oh, that's probably not a mask then, looks like simply ids.

I'm guessing the bone id is also a word at +2. It's a bit unusual to have data aligned at 3 with a gap between them. Or that could be 4 bytes in a row: position_flag, rotation_flag, scale_flag?, bone_id. 01 position flag may mean FK, 02 may mean IK. I have no idea what a rotation flag of 03 could mean if the data is stored as quaternions. If it was euler angles, it could mean the axis order, possibly.

These are all just my guesses, though.
insect is offline   Reply With Quote
Old 19-07-2017, 05:02 PM   #7
X86Jumps
Registered User
 
Join Date: Jul 2017
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
boneid is byte, i see this in import script (maxscript)
and find asm instructions who access to animation data
movzx edx,byte ptr [ebx-02]

strange, why my img url not display as image
http://imgur.com/a/kc2um
X86Jumps is offline   Reply With Quote
Reply

Tags
3dsmax2012 skeleton ik


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
all images displayed on this site are copyright the original artists and may not be reproduced, copied or published elsewhere without their express permission