Source Filmmaker

Source Filmmaker

raptornx01 May 20, 2013 @ 4:39pm
Conforming a walking animation to a terrain.
Just wondering if it's possible. Say I spawn a character, and import a walk sequence. generally they just walk in a straight line, but is there a way to make them walk along the terrain? like how when you are using that edit tool thats a circle with a square in it (forget the name.) and you hold shift and the model stays on the ground as you move it.

or is it only possible to do manually.
< >
Showing 1-10 of 10 comments
Frostbyte May 20, 2013 @ 5:05pm 
There is an easy way to create a character who is walking across terrain. Hit the F11 button to position your character in place. Hit F11 again and click the record button. On the fourth beep, it will start to record.

If you are using an unplayable character, create bookmarks of the character in certain heights of the place, while adding the walking animation
R234 May 20, 2013 @ 5:33pm 
I don't think that's what Raptor meant. What you want is basically leg IK, right?

Hm... As far as I know, leg IK was used in Half-Life 2, so the engine should be able to handle it, in theory. Whether there's a way to get it working in SFM, I don't know... Seems like getting scripts to recognize the terrain could be difficult, judging by how terrain detection isn't supported by SFMPhys yet.

So, is it possible to make an auto leg IK script for SFM? Not sure, but I would think so. Until some genius comes up with one though, doing it manually is all I can think of.
raptornx01 May 20, 2013 @ 5:49pm 
well, i'd hoped that since that editor is capable of detecting the terrain that there might be something in there that allowed for it. See if it was just one character i'd just do what Frost suggested, but i'm doing an army walking over uneven terrain. I could just use a flat map, but there are issues with that as well. namely the shots before and after the scene I have in mind, which call for the previously mentioned terrain, not lining up as far as lighting and sky are concerned.
psi onix May 20, 2013 @ 6:25pm 
would it be possible to just do it manually for one character then use constraints or locks to apply the manual work you've done to the rest of the army?
raptornx01 May 20, 2013 @ 6:51pm 
Or just copy and paste the animation set. but still uneven terrain and everyone would going up and down at the same times.
Pte Jack May 20, 2013 @ 8:17pm 
Wonder if it is possible to use the Move Manipulator (Big Orange Circle with the square inside it) to pull the model across the terrain adding keymarkers as the terrain changes, then add a walk/run sequence between the markers??? (Thought, haven't had a chance to test)
R234 May 20, 2013 @ 8:41pm 
Oooh, I understood you wrong then.

No, I don't think it's possible to adjust a character's root motion to the terrain. I have a little trick that might cut down on the time it takes to make each individual character's vertical motion though, gimme a sec...


Right. So. If you import a character's run sequence, this is what you get:
The character runs right through the floor.

What you can do to remedy that quickly is use puppeteering on the pelvis joint's "z" axis position. Select it (like in the screenshot) and hold LMB on the blue arrow, then hit space and try your best to follow the ground with the mouse. You can give it a few shots until you're mostly happy with the results:
You also might want to apply some "smooth" filter on that before committing it.

This isn't perfect, but it's fast enough to do it for a bunch of characters, and it looks okay for a crowd seen from not too close.
Last edited by R234; May 20, 2013 @ 8:50pm
raptornx01 May 20, 2013 @ 8:44pm 
The walk sequence moves on it's own. but, if you are in motion editor hold the manipulator and press play it stops moving, just walks in place. but, you now have to grab it, hold shift, hit play and slide it at the same rate it walks.
psi onix May 21, 2013 @ 12:12pm 
Well you make an interesting point about SFM being able to distinguish terrains... for that reason i wouldn't be surprised if a script for this could be made. I mean it should only have to be a slight alteration on the way a sequence is applied to the model....

But if it was me, i would probably just do like you said and do it once then copy the animation set. Then with all time selected in the motion editor i'd move the new model over a bit next to the previous one, then do my best to quickly edit the new models motion in the graph editor to make it look better & unique to that model's path over the terrain. Then do that again and again...

I really want to do a Star Wars project next.. that is pretty much how i have figured i'd animate an army of clone troopers. Either that or using locks and the playhead preset to copy over motions.

Best of luck to you with this.
Last edited by psi onix; May 21, 2013 @ 12:53pm
raptornx01 May 21, 2013 @ 3:15pm 
Thanks all for the help. In the end I decided to go the safe route and use a flat map. The reason being after so many models SFM starts to really lag, and it gets harder to animate and manipulate objects. I did a test just to see how well the animations copied over just through c&p (i'm using combine soldiers BTW). and at around 80 I started getting severe slow down. And the fact the final shot will have more then that, not to mention over 100 other models like trees, striders (which are a pain in the ♥♥♥ to animate BTW, especially since the animations included are broken so I had to make them walk manually), apcs, etc.
< >
Showing 1-10 of 10 comments
Per page: 15 30 50

Date Posted: May 20, 2013 @ 4:39pm
Posts: 10