create locomotion clips for walk cycles at origin?
5928 15 5- mestela
- Member
- 1803 posts
- Joined: May 2006
- Offline
- Enivob
- Member
- 2629 posts
- Joined: June 2008
- Offline
I just tried this, and here is the workflow that added a new agent clip to my clip list.
Create a copy of your existing character, dive inside and drop down an AgentDefinitionCache node. Overwrite the ClipName with a new name that does not already exist. You can uncheck the other options. Click the save to disk and you will get a .bclip file for the new animation with the keyframed animation baked in.
Inside your main character add a new clip, using the AgentClip node and set the source to File. Browse to the .bclip and it should be added as a new clip state that you can transition to.
Create a copy of your existing character, dive inside and drop down an AgentDefinitionCache node. Overwrite the ClipName with a new name that does not already exist. You can uncheck the other options. Click the save to disk and you will get a .bclip file for the new animation with the keyframed animation baked in.
Inside your main character add a new clip, using the AgentClip node and set the source to File. Browse to the .bclip and it should be added as a new clip state that you can transition to.
Edited by Enivob - Feb. 24, 2020 12:57:51
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- malbrecht
- Member
- 806 posts
- Joined: Oct. 2016
- Offline
If you wanted a tech-geek-solution, what you could do is check for points on ground at frame 0 and track their position throughout the animation cycle. With some luck, what you found there are the feet of the character - therefore, adding those positions' average distance between two frames to the object's world space (sign inverted) should give you “walk forward/backward/sideways” fully automatically.
Obviously this won't work with long cloths touching the ground - you could get better results using the maximum distance between frames to cover for that, but I am a fan of averaging, so I suggested that first :-)
Marc
Obviously this won't work with long cloths touching the ground - you could get better results using the maximum distance between frames to cover for that, but I am a fan of averaging, so I suggested that first :-)
Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
- Enivob
- Member
- 2629 posts
- Joined: June 2008
- Offline
While this adds the clip, it does not seem to pickup on the animated keyframed animation. Perhaps primtrinsic (agentlocaltransform) needs to be revised before exporting the .bclip..?
I tried an unpack-animate-repack-write bclip, but that didn't work either.
The animation step might have to animate the root bone of the rig for this to work…
I tried an unpack-animate-repack-write bclip, but that didn't work either.
The animation step might have to animate the root bone of the rig for this to work…
Edited by Enivob - Feb. 24, 2020 13:41:59
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- cwhite
- Staff
- 750 posts
- Joined: Oct. 2012
- Offline
I think the easiest would be:
- Import as an agent
- Move the agent forward (e.g. with an animated Transform SOP)
- Add an Agent Terrain Adaptation SOP and enable foot locking (terrain can be disabled).
- Use an Agent CHOP with Fetch Mode set to Pose to create a new clip from the agent given a time range.
- Optionally use the Extract Locomotion CHOP to extract the overall motion into the locomotion channel
- Export to a bclip or import back into SOPs via the Agent Clip SOP.
- Import as an agent
- Move the agent forward (e.g. with an animated Transform SOP)
- Add an Agent Terrain Adaptation SOP and enable foot locking (terrain can be disabled).
- Use an Agent CHOP with Fetch Mode set to Pose to create a new clip from the agent given a time range.
- Optionally use the Extract Locomotion CHOP to extract the overall motion into the locomotion channel
- Export to a bclip or import back into SOPs via the Agent Clip SOP.
- Enivob
- Member
- 2629 posts
- Joined: June 2008
- Offline
Trying that, but I'm no CHOPs wizard. I have placed a single Agent node inside the CHOP network and altered the Fetch mode as suggested.
I am using a Channel node to fetch the result from the CHOP, but Houdini does not like the results. I have scoped *.
I am using a Channel node to fetch the result from the CHOP, but Houdini does not like the results. I have scoped *.
Edited by Enivob - Feb. 24, 2020 15:29:33
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- cwhite
- Staff
- 750 posts
- Joined: Oct. 2012
- Offline
- mestela
- Member
- 1803 posts
- Joined: May 2006
- Offline
- cwhite
- Staff
- 750 posts
- Joined: Oct. 2012
- Offline
- mestela
- Member
- 1803 posts
- Joined: May 2006
- Offline
- mestela
- Member
- 1803 posts
- Joined: May 2006
- Offline
- anon_user_89151269
- Member
- 1755 posts
- Joined: March 2014
- Offline
- mestela
- Member
- 1803 posts
- Joined: May 2006
- Offline
I've written up some notes about the workflow: http://www.tokeru.com/cgwiki/index.php?title=HoudiniCrowd#Locomotion_from_cycles_locked_to_the_origin [www.tokeru.com]
- elovikov
- Member
- 130 posts
- Joined: June 2019
- Offline
Hi!
Here's the slightly different setup based on the same idea. But it's more general so it can works with running cycles as well.
I utilized scope and area nodes. Scope gives you speed of the object. It's a bit more useful because you can combine speeds from different sources with any logic you want. In case of biped you just get max of both foots but you can average them for quadruped or something like that.
whole network works like that:
- get both foots speed on the ground. it's pretty much the same but you can use Foot Plant node for filtering. With setting “distance from terrain” it works exactly the same as your approach
- combine speeds with “maximum” op
- now you have ground speed with gaps which basically like “airborne periods”. filling them properly requires some really nasty physics but I just did it in a very hacky way. I just filtered channel with Envelope and add it in all gaps. Envelope gives you curve along all spikes in channel so it actually works fine. This is the trickiest part and it could require some tuning for specific clips
- after filling the gaps you have graph with agent speed. now you feed it to Area and you have your distance for clip (potentially it works on xz plane not in only one direction)
Here's the slightly different setup based on the same idea. But it's more general so it can works with running cycles as well.
I utilized scope and area nodes. Scope gives you speed of the object. It's a bit more useful because you can combine speeds from different sources with any logic you want. In case of biped you just get max of both foots but you can average them for quadruped or something like that.
whole network works like that:
- get both foots speed on the ground. it's pretty much the same but you can use Foot Plant node for filtering. With setting “distance from terrain” it works exactly the same as your approach
- combine speeds with “maximum” op
- now you have ground speed with gaps which basically like “airborne periods”. filling them properly requires some really nasty physics but I just did it in a very hacky way. I just filtered channel with Envelope and add it in all gaps. Envelope gives you curve along all spikes in channel so it actually works fine. This is the trickiest part and it could require some tuning for specific clips
- after filling the gaps you have graph with agent speed. now you feed it to Area and you have your distance for clip (potentially it works on xz plane not in only one direction)
- mestela
- Member
- 1803 posts
- Joined: May 2006
- Offline
- papsphilip
- Member
- 385 posts
- Joined: July 2018
- Offline
How would you apply this workflow for a standard fbx file? i have an fbx with the rig and some fbx cycles as separate files. Do i need to convert them in an agent somehow?
Also do i have to import the whole rig? it would be much more convenient to work with the fbx character import SOP and tweak the animation stream
Also do i have to import the whole rig? it would be much more convenient to work with the fbx character import SOP and tweak the animation stream
Edited by papsphilip - March 31, 2022 07:45:19
-
- Quick Links