Animation & Trackview

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Beginner BeginnerMember since: 29.11.2012, 22:33Posts: 8 Likes: 0
 

 Post Topic: Setting up Aim IK for Custom Characters
PostPosted 01.03.2013, 06:45 
I'm having some trouble setting up Aim IK for my character correctly. My character often looks opposite of where I'm aiming and seems to snap to the aim poses. It's a bit weird because the character's Look IK works perfectly. Is there a way to fix or adjust this? You can see a video of the problem below.



I'm using the CryEngine 3 SDK and the character is using a custom skeleton, set up and exported from Maya. Any help would be appreciated!

User avatar   Trainee TraineeMember since: 10.08.2011, 19:10Posts: 150Location: Somerset (England) Likes: 1
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 02.03.2013, 22:29 
Terry is an animator on our team and unfortunately, unless we get a reply to this post, we can't really do any more animation work.

Help would be very much appreciated. :-)


Part of the Star Wars: BattleCry team!
http://www.moddb.com/games/star-wars-battlecry


My rig:
i7 960 @ 3.2ghz, Asus Ares gpu @ stock, 6gb XMS3 DDR3 ram @ 1600mhz, Antec 1200 case, Samsung 840 256gb SSD, Asus P6X58D-E mobo
User avatar   Honourable Member Honourable MemberMember since: 01.11.2010, 15:28Posts: 605Location: Orlando, FL Likes: 9
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 04.03.2013, 23:12 
It is hard to tell what went wrong with your animations. Possibly the aim poses are too narrow and don't cover enough of an angle. How many poses are you using? 9, 15 or 21?

Can you turn on the aim pose debug drawing and maybe post a screenshot/video of this?
ca_DrawAimPoses
  Beginner BeginnerMember since: 29.11.2012, 22:33Posts: 8 Likes: 0
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 05.03.2013, 02:17 
I'm using 9 poses for my Aim Poses, following the documentation. I tried widening the range of the poses a bit and that did seem to help with smoothing the tracking a little.

I turned on aim pose draw but I'm not quite sure what it does. The blue line that appears seems to always be pointing downwards and stays by the leg.
Image
I noticed on the default male character that it's supposed to follow his weapon bone. Is this part of the problem?

I'm also wondering if it could be a joint rotation problem, even if Look IK works?
User avatar   Honourable Member Honourable MemberMember since: 01.11.2010, 15:28Posts: 605Location: Orlando, FL Likes: 9
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 05.03.2013, 17:17 
Hi again,
I was hoping for a screenshot inside the level with the debug draw on, but in general you are correct, the weapon bone should be giving the direction that the character is aiming in. The aim setup in the chrparams file takes care of this. You weapon bone (and if I remember correctly your should bone) are set up in there and your bone names should match the setup.
LookIK uses a different bone to calculate the rotation and it is likely that that setup in the chrparams file simply matches your character's setup.
  Beginner BeginnerMember since: 29.11.2012, 22:33Posts: 8 Likes: 0
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 06.03.2013, 01:16 
Here is the video of the debug inside the level. Hopefully you can get something from it.



I also double checked the chrparams file and the bone names match up. The definition is pretty much the same as the one in the documentation, but maybe there is something out of place.
Code:
<AimIK_Definition>
   <DirectionalBlends>
      <Joint AnimToken="AimPoses" ParameterJoint="weapon_bone" ReferenceJoint="Bip01" StartJoint="Bip01 R UpperArm"/>
   </DirectionalBlends>
         
   <RotationList>
     <Rotation Additive="0" JointName="Bip01 Spine" Primary="1"/>
     <Rotation Additive="0" JointName="Bip01 Spine1" Primary="1"/>
     <Rotation Additive="0" JointName="Bip01 Spine2" Primary="1"/>
     <Rotation Additive="0" JointName="Bip01 Spine3" Primary="1"/>
     <Rotation Additive="0" JointName="Bip01 Neck" Primary="1"/>
     <Rotation Additive="0" JointName="Bip01 Head" Primary="0"/>

     <Rotation Additive="0" JointName="Bip01 R Clavicle" Primary="1"/>
     <Rotation Additive="0" JointName="Bip01 R UpperArm" Primary="1"/>
     <Rotation Additive="0" JointName="Bip01 R ForeArm" Primary="1"/>
     <Rotation Additive="0" JointName="Bip01 R Hand" Primary="1"/>
     <Rotation Additive="0" JointName="weapon_bone" Primary="1"/>

     <Rotation Additive="0" JointName="Bip01 L Clavicle" Primary="0"/>
     <Rotation Additive="0" JointName="Bip01 L UpperArm" Primary="0"/>
     <Rotation Additive="0" JointName="Bip01 L ForeArm" Primary="0"/>
     <Rotation Additive="0" JointName="Bip01 L Hand" Primary="0"/>
   </RotationList>


   <PositionList>
     <Position JointName="Bip01 R Clavicle"/>
     <Position JointName="weapon_bone"/>
     <Position JointName="Bip01 L Clavicle"/>
   </PositionList>

   <ProcAdjustments>
      <Spine JointName="Bip01 Pelvis"/>
      <Spine JointName="Bip01 Spine"/>
      <Spine JointName="Bip01 Spine1"/>
      <Spine JointName="Bip01 Spine2"/>
      <Spine JointName="Bip01 Spine3"/>
   </ProcAdjustments>
</AimIK_Definition>
User avatar   Honourable Member Honourable MemberMember since: 01.11.2010, 15:28Posts: 605Location: Orlando, FL Likes: 9
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 06.03.2013, 16:12 
Hm, this is strange behaviour. I guess it must be something in the animation itself, since the aim poses of the SDK character seem to work fine.
You are using 9 poses, right? Have you been manually creating them, or using the aim pose script? (I am not sure Maya comes with a similar script as Max)
Are the upper aim poses covering at least the same angle range than the lower ones?
User avatar   Beginner BeginnerMember since: 07.03.2013, 02:16Posts: 5Location: Australia Likes: 0
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 07.03.2013, 02:32 
I had a similar issue when making Star Wars The New Era's aim directions on source engine. Can you please post a video again, but with what direction you're trying to aim?

Also, check to see if your bone axis orientation matches up to the original skeleton.


I'm going to download the tools and have a looksee at how the original skeleton is setup.
  Beginner BeginnerMember since: 29.11.2012, 22:33Posts: 8 Likes: 0
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 07.03.2013, 22:14 
I managed to partially solve the problem. It turned out that some of my joint orients still had values. After zeroing everything out and quickly reskinning and redoing the aim poses, aim ik seems to work now.

The down side is that there's a new problem. The spine has extra rotation to the left and my character seems to be looking to the left by default. It's a bit weird since all of my rotations are zeroed out and the character editor's preview is normal.



I am using 9 aim poses again, manually created without tools.
User avatar   Beginner BeginnerMember since: 07.03.2013, 02:16Posts: 5Location: Australia Likes: 0
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 08.03.2013, 03:11 
Very curious. Have you tried exporting the agent's skeleton from Maya? Your issues could be due to Maya's CryEngine plugins or your skeleton so we need to rule out one or the other.
  Beginner BeginnerMember since: 29.11.2012, 22:33Posts: 8 Likes: 0
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 14.03.2013, 09:27 
After some more tinkering I managed to get it to work! It turns out that the rotation of the weapon bone is very important. After a minor adjustment, all of the aim poses work normally.



Big thanks to Mika and DT85 for the help!
User avatar   Trainee TraineeMember since: 10.08.2011, 19:10Posts: 150Location: Somerset (England) Likes: 1
 

 Post Topic: Re: Setting up Aim IK for Custom Characters
PostPosted 14.03.2013, 10:48 
YES!

Thanks for helping Terach everyone, this is good news.


Part of the Star Wars: BattleCry team!
http://www.moddb.com/games/star-wars-battlecry


My rig:
i7 960 @ 3.2ghz, Asus Ares gpu @ stock, 6gb XMS3 DDR3 ram @ 1600mhz, Antec 1200 case, Samsung 840 256gb SSD, Asus P6X58D-E mobo