Jump to content
SquirkyTurtle

Crowd agent orient problem

Recommended Posts

Hello there :)

I am doing a crowd sim and my agents need to turn around quickly after a certain event triggered and run away. Now I have a clip for the turn but when it plays the agents heading vector doesn't actually turn so when I try to do the transition to the running clip (and new direction) afterwards, the agents flip back and then turn around. I tried to solve this by manually updating the vector right when the clip changes but I get a horrible blend between the clips and stuttering in the movement. I am wondering if anyone knows a way to approach an issue like this smarter? I have set up a transition graph but I can only blend between both clips facing one direction and I am not sure if there is a way I can change the clip orientation? 

I am grateful for all suggestions!

Share this post


Link to post
Share on other sites

Have you set up the turning clip as a locomotive clip? it should work fine if its locomotion channel includes the overall orientation.

Share this post


Link to post
Share on other sites
Posted (edited)
37 minutes ago, cwhite said:

Have you set up the turning clip as a locomotive clip? it should work fine if its locomotion channel includes the overall orientation.

Yeah I have but it isn't updating the heading, should it do that while the agents is spinning around? Do I have to do any setting up for this?

Oh and thank you for your reply :)

Edit: I did not set up the Locomotion right, I am stupid. On it now.

Edited by SquirkyTurtle

Share this post


Link to post
Share on other sites

Alright, so I have set the turning clip to be locomotion and the heading now updates but as soon as it switches back to the running clip, he starts turning backwards again? This clip is not a locomotion, should it be?

Share this post


Link to post
Share on other sites

You should be able to blend between locomotive and in-place clips. If you're able to post a scene file, that might make it easier to debug

Share this post


Link to post
Share on other sites
14 hours ago, cwhite said:

You should be able to blend between locomotive and in-place clips. If you're able to post a scene file, that might make it easier to debug

Will do when I'm back at my computer, thank you :)

Share this post


Link to post
Share on other sites
3 hours ago, SquirkyTurtle said:

Will do when I'm back at my computer, thank you :)

Okay, I made a quick example file with what I am attempting to do. Basically, I would like the turn clip to play and then I would like to blend into the running clip once the agent is turned. I am pretty new to this so I am sure I am not understanding or doing something right.

example.zip

Share this post


Link to post
Share on other sites

For the Locomotion Orient parameter on the Agent ROP, you should specify another joint (like the upper leg) - the orientation is extracted based on the vector from the locomotion joint (hips) to that joint. If you preview the clip on the Agent SOP with Apply Clip Locomotion turned off, you want the character to face in a consistent direction so that you can blend between clips correctly.

Also, the number of blend frames for the transition was set to 20, which is far too high given how short the turning clip is.

  • Thanks 1

Share this post


Link to post
Share on other sites
13 hours ago, cwhite said:

For the Locomotion Orient parameter on the Agent ROP, you should specify another joint (like the upper leg) - the orientation is extracted based on the vector from the locomotion joint (hips) to that joint. If you preview the clip on the Agent SOP with Apply Clip Locomotion turned off, you want the character to face in a consistent direction so that you can blend between clips correctly.

Also, the number of blend frames for the transition was set to 20, which is far too high given how short the turning clip is.

Thank you so much, that was a great explanation, I am really grateful! I got it now and my clips blend nicely :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×