Procedural walk

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Procedural walk // Work in Progress

1  |  

Post by 3dfrog // Jan 11, 2008, 1:05pm

3dfrog
Total Posts: 1225
pic
Hello


I am trying to get together a little procedural animation walk in a circle for tomorrow. I have my guy's legs moving with the zig zag node, and I have him going in a circle with the circle generator. What has been driving me nuts most of today though is trying to get him to face forward to where he is walking. I have tried with offset look at cube and triggered loop and anything I could think of, but I can't get it. Maybe one of you gurus can look at it and help me out. Once I get that I can worry about making it look good.


See Attached object, it is encapsulated and there is a timer inside.


Thanks

Post by frootee // Jan 11, 2008, 1:32pm

frootee
Total Posts: 2667
pic
you need the yaw angle of the expanded matrix of your character to increase as the character walks in the circle.

Post by frootee // Jan 11, 2008, 1:36pm

frootee
Total Posts: 2667
pic
standby... upload now. Fixed! added binary op, multiplied timer value by -60. looks pretty good.

Post by frootee // Jan 11, 2008, 1:36pm

frootee
Total Posts: 2667
pic
here it is. THough you will notice it is not too accurate. If you let it run long enough the rotation gets out of sync (quickly) with the rotation.
But you can work this out with math, and get a better result.

Post by Délé // Jan 11, 2008, 1:57pm

Délé
Total Posts: 1374
pic
Another way to do it is to add a dummy object that is using a copy of the circle generator but is running a bit faster then the character. Then it will be in front of the character as he walks. Then you can use the look at tool to make the character look at the dummy object as he walks. You can click the "invisible" check box for the dummy object so it is not seen. I also added in a speed controller so you can speed up or slow down the legs to match the walk somewhat.


There are better, more accurate ways to do stuff like this, but it would take much more time and scripting. Something I have been planning on doing with bones eventually. ;)


hth

Post by frootee // Jan 11, 2008, 2:35pm

frootee
Total Posts: 2667
pic
well I don't think you want to have the cube running Faster Dele... you want the cube running at the same speed, but In Front of the stickman. In other words, make the cube Ahead of Phase of the stickman in the circle cycle.


if the cube runs faster, eventually, the cube will catch up with the stickman, and smack him in the back of the head. Which will, of course, have a Physical Comedy effect...


Froo

Post by Délé // Jan 11, 2008, 2:38pm

Délé
Total Posts: 1374
pic
That's what I meant. I shouldn't have said faster. I used an offsetter script to offset the time so the dummy cube is running at the same speed, but ahead of the character. ;)

Post by frootee // Jan 11, 2008, 2:40pm

frootee
Total Posts: 2667
pic
ah cool.
Likewise for me... I should have downloaded the file before replying. :D

I see what you meant. But he's upside down! Doing a breakdance move I guess...

Dele's always topping me! HAHA!

Post by Délé // Jan 11, 2008, 2:45pm

Délé
Total Posts: 1374
pic
He's upside down? That's weird...I had him right side up when I saved it. :confused:

He imports correctly for me. If he's upside down, check the "roll" input on the stickman inside. It should be at 180. I guess if it says 180 and he's still upside down, try changing it to 0. I'm really not sure why he's upside down for you though. That's weird.

Post by frootee // Jan 11, 2008, 2:46pm

frootee
Total Posts: 2667
pic
yep. Upside down and walking in the wrong direction. No big deal though! We can straighten him out!

Post by 3dfrog // Jan 11, 2008, 3:21pm

3dfrog
Total Posts: 1225
pic
Thanks guys. Changing the value for the yaw with the timer was something i tried to do today but I couldn't figure it out. Good going froo. I can't figure out how to make it not get out of synch in time, my math is not that good.


The dummy object looks just like how I tried to set it up earlier today. I don't know why mine got so screwed up, when I offset the cube on mine the figure got messed up. I'm trying to figure out whats different. That seems to be the easiest way to do it though.


I'll drop both in tomorrow. I'll mess around with it more and see what I can come up with.


Thankee Thankee

Post by Délé // Jan 11, 2008, 4:35pm

Délé
Total Posts: 1374
pic
I had to try Froo's idea too. You can easily calculate the angle by utilizing the X and Y outputs from the Circle Generator. I also added a speed controller for the Circle Generator so you can control the speed. I threw in the ability for him to automatically change the walk speed depending upon how fast he is moving too. So the walk speed will automatically adjust as you change the radius he is walking in or the speed of the circular motion.


It's easy to go overboard with this stuff. So many different ways to add to it. :)
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn