Jump to content

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!

Link to comment
Share on other sites

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
Link to comment
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?

Link to comment
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

Link to comment
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
Link to comment
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 :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...