Page 1 of 2

How to create Aim Pose?

Posted: Fri May 05, 2017 3:52 pm
by fury22uk
Hi. I am struggling with Aim Pose. I have my own character and skeleton. I made basic movement but now I am stucked on Aim Poses.
I have already read document about Aim Poses about hundred times. I made 15 frames with poses like it is shown in documentation. I use LowerBack joint for the rotation as a ParameterJoint, and custom middle joint as StartJoint. I use correct AnimToken. Everything seems to be alright. But in documentation there is something called DirectionalBlends.img which I don't have, and I don't know how to create it as my RC doesn't do anything. I wrote some code in C++ but SetTarget method doesn't change anything. Without it my aim pose works in the same way. It reacts for the camera movement, but it seems to make some weird stuff.

Could someone tell me how to properly create Aim Poses? How to create DirectionalBlends.img file? Or maybe something is out of date? This document is already 2 years old.

Re: How to create Aim Pose?

Posted: Sat May 06, 2017 7:00 pm
by Romulas
It says set the ca_useIMG_AIM to 0 before running the editor so it can recalculate that img file. Maybe you need to do something like this?

Re: How to create Aim Pose?

Posted: Sat May 06, 2017 11:47 pm
by fury22uk
Nope it doesn't do anything. Img file does not exist and with this command it stilll does not appear. Documentation about that is out of date, for example I've noticed that there is 9, 15 or 21 frames for the aim/look poses, whereas documentation mentions only 9 and 15.

The hint might be, that console throws warning which says that my aim pose animation does not have compressed file or something like that. Tomorrow I'll edit this post with the complete warning. However my .caf file works in manequin and character tool, so it is compressed. I believe this warning refers to missing img file.

Re: How to create Aim Pose?

Posted: Sun May 07, 2017 6:29 am
by mknmknmknjk
try blendspace2d or ik

Re: How to create Aim Pose?

Posted: Sun May 07, 2017 6:42 am
by Romulas
Aim poses for sdk works in game but I couldn't preview it with the character tool properly. Editor tool may not be reliable.

Re: How to create Aim Pose?

Posted: Mon May 08, 2017 4:19 pm
by fury22uk
How do I use blendspace in this case? Could you give me some hint? Cause as far as I can see .bspace's have only travel speed, direction and so on. Can I use bspaces from c++ somehow?

There is that warning I mentioned before:

Code: Select all

[Warning] File contains uncompressed controller data. [File=animations/humanoidanims/aimposes.caf]
[Warning] File does not contain any compressed controller data. [File=animations/humanoidanims/aimposes.caf]


It also gives me assert like that :

[Assert] [File=D:/jk/gamesdk_release/Code/CryEngine/CryAnimation/GlobalAnimationHeaderAIM.cpp]

Re: How to create Aim Pose?

Posted: Mon May 08, 2017 11:22 pm
by sparki
Are you using gamesdk? Also sometimes deleting the resource cache will help refresh the animations if they bug out. (editor/resourcecache or something)

You might want to study the Turret entity, since it has a custom aim setup.

Re: How to create Aim Pose?

Posted: Tue May 09, 2017 1:11 am
by fury22uk
I'll check on turret then.

I am not using GameSDK. I am working on Blank C++.}


EDIT:

So I studied Turret gun today it was helpful although I just realised that everything I've done so far was correct.

Re: How to create Aim Pose?

Posted: Tue May 09, 2017 4:38 pm
by mknmknmknjk
viewtopic.php?f=15&p=3052#p3052

search

void CPlayer::SetIK( const SActorFrameMovementParams& frameMovementParams )


SetPlayerAimIK

Re: How to create Aim Pose?

Posted: Tue May 09, 2017 5:49 pm
by Romulas
When you make a fragment you can put the bendspace animation in that layer there. Then you can set walk speed, rotation speed etc using cpp. You probably know these already but Its in the firstpersonshooter templete. I don't think blend spaces can be used for something else. That would be unintended.

Code: Select all

pCharacter->GetISkeletonAnim()->SetDesiredMotionParam(eMotionParamID_TravelSpeed, travelSpeed, 0.f);
m_pAnimationContext->state.Set(m_walkTagId, travelSpeed > 0.2f && m_pPlayer->GetMovement()->IsOnGround());


Looks like you have a problem with your aimpose file. Warnings might be disregarded?, not sure really, but assert means something failed.

Still I would suggest to do what mknmknmknjk said, it might work in game. There is so much going on in that function.