True spider walker project

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
first of all, im not sure if this can be done or not but I hope it can.
What im planning to make is a spider vehicle (for now only walks on ground, no wall crawlin atm :D ) its gonna have 8 legs, and I want it to feel very rigid and real, nothing fake.

and thats the hard part as you may have guessed.

Ive been thinkin about it for a few days on/off n i came up with this algorithm to move the legs; assume that all odd numbered legs are left and all even numbered are right. If one was to thrust forward (hold w) a 'motion' in that direction would be queued to the next leg to move (the next leg to move starts at 0 and increases as each leg takes a turn moving until it hits 7 at which point the next leg would be 0). If the leg has a 'motion' queued then it will perform it, regardless of whether or not you are holding that directional button combination anymore; after being performed, the 'motion' is removed from queue. Only 1 motion can be queued to each leg at a time; to keep it from gettin outta control :D .

so thats the easy part, eight possible directions mean 8 animations for each leg. I will be extending ONSVehicle for this, obviously there's gonna be a lot of code for me to fill in :rolleyes: .

here are my problem(s), Im not sure how to propel this thing :hmm: . the basic problem is that im not sure how to glue a foot to the ground! Im gonna be using krepulsors to keep the feet out o the ground but, is there possibly a way to add friction to repulsors?? rotational n vector maths n wat not ill handle, not the biggest deal, but some help with the locomotive system would be highly appreciated.

o n btw no real code as of yet so feel free to use algorithms :D .

once im done ill make a sick model for it (i make good models lol, i show if you want haha)
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
see thats the thing, if i animate the entire thing it'll feel fake, my inspiration for all of this was the spider tank from the first ghost in the shell movie, that thing walked amazingly n i realli wanted to capture its power.

(realli awesome vid right here ---> http://www.youtube.com/watch?v=Z-K9LHmvdzA tank shows at about 2 mins, fight over at about 7 mins, awsome fight btw :lol: )

so no i have to move them independently, rotating each one so that the body moves forward i can calculate, in all cases i was planning to move the legs via script bone by bone anyway (if i cant use ued animations) n from there rotation calculations are all done through vectors.

so any ideas for gluin 1 leg to the ground just short of me updating position every tick ;) (dont think i didnt consider it :lol: )? lolol
 

luciano.bargmann

Mecha pilot
Dec 5, 2002
27
0
0
45
Porto Alegre, Brazil
Visit site
you know, to capture its power and dont bring down player CPUs, you will have to make it with animations. Unreal blends animations very nicelly so with a bit of work, they will look as perfectly as you want.

Have you checked out HalfLife 2 spiders or Quake4 Spider bots? I bet they are animated.

Anyway, the Ghost in the shell link is awesome! Heheh thanks!
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
lol i know eh?! i love that scene! hahaha

anyway i found a way to do this without tracing or anything and it'll still look great but to do it i set bone rotations quite a bit, like every frame, think that'll kill cpu/lag? Im taking the cicada into account cuz its fans are reset every frame(about 4 bones, what im gonna do needs 16), and it doesnt seem to lag too much.

so wat u think?

P.S. oh an i forgot a few things that just came to mind :eek: when players pith up and down a bone in the spine gets rotated through code so thats a lotta bones + every vehicle with a moving turret has at least 2 bones that get rotated via code every frame. you know i dont think setbonerotation is an expensive function!
 
Last edited by a moderator:

Geminosity

Mischief Maker
Sep 10, 2004
35
0
0
Scotland! =D
This won't help you at the moment but it's handy to note that UT2007 will have tripod walkers in it. If you still haven't got much progress before it comes out you could probably glean a lot by checking their code out when it hits the shelves :)
 

rich_zap

New Member
Jul 18, 2004
133
0
0
Dissapearing into the fog !
I dont believe the Dark Walkers are actually 'walkers' as such. Fron the videos it looks like the glowing ball at the centre is some sort of anti-grav device with the turret mounted on top. The legs just seem to pull it along, so im not sure that there will be any code that could be used... Still we can hope.
 

pospi

New Member
Jun 30, 2003
298
0
0
www.pospi.cjb.net
oh so offtopic really but damn they look nice
the video i've seen that most impresses me shows one of them standing on really uneven terrain and the legs dancing around catching it before it falls and generally keeping it balanced and standing.
My guess though would be that the new engine is using at least hints from the new physics engine to help with that fluidity of movement. In any case I doubt any of the code they use will be portable or useful to UT2004.
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
ya i started a thread about darkwalkers a while ago the first time i saw them lolol

i was actually disappointed by how they turned out :( . not that they're not frightening b/c they most definitley are lol but they just didnt move like how i wanted them to move, just another style, its ok though, still thumbs up to epic for putting in first real multiplayer walker lol

ANYWAY, about my walker, gonna code it today, i think i just might have a prototype by tomorrow ;) of course not net ready but o well haha
 

pospi

New Member
Jun 30, 2003
298
0
0
www.pospi.cjb.net
what's the plan?
trace down to find the point of contact, and then use some trig to work out how the legs should rotate to meet said point?
Could be very interesting if you get it right!
You might also want to try out some IK algorithms, if you do a google or two you should find some that would be applicable.
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
alright well heres the plan, no tracing, too slow, instead im putting a KRepulsor on the tip of each foot. these repulsors wont really repulse anything they'll juz tell me when they in contact of ground. then ya sum trig math n there you go. the point is, after repulsor leaves ground then comes in contact AGAIN, i get the vector that it contacted at, save it and that becomes the "target" of the leg until it takes another stride to find a new target. every tick i do some trig math to find rotation of leg bones so it'll never look awkward. and to make it even more real, the only thrust force applied on the vehicle is the length and result direction (multiplied by some preset magnitude of course) of the stride! and there you go, true walker.

the one part i dont entirely like is my use of krepulsors, while useful, im not sure how net expensive attaching eight different actors to the different bones of a single actor is :( (obviously done only once :lol: ).

any suggestions?

edit: and about ik, not really necessary considering how simple this is. the leg forms a triangle with the target, atm im only allowing legs with 2 main joints (as many bones as you want but only 2 will effectively rotate) so sum trig math should be more than enough to work this out :D
 
Last edited by a moderator:

pospi

New Member
Jun 30, 2003
298
0
0
www.pospi.cjb.net
sounds good. I personally wouldn't worry about using traces too much, not even in ridiculous amounts. I've never had any troubles with traces taking too long to execute or upsetting the framerate, and although I'm aware it's generally frowned upon to use them if there's an alternative I've never had problems.

it's useful to remember things like the scorpion, that uses two traces every tick to check if its blades are hitting anything, cause no slowdown or problems in the game at all.

Don't know much about KRepulsors but I think the additional overhead of making extra karma objects might outweigh the performance hit from simple traces by a fair bit.
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
just might yeah, so what do you think, go for 2 or 3(depends on how many legs in air really), 20 UU line traces every tick?
 

Geminosity

Mischief Maker
Sep 10, 2004
35
0
0
Scotland! =D
well if you want it to move realistically I'd look at how insects move to work out how many legs you'll need and when. For 6 legged creatures there's always 3 legs on the ground to form a 'tripod' while they move the other 3 :)

Shame the darkwalker won't help buuuut it's ages away anyways. Thought it would be nice to suggest it all the same :lol:
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
lolol its ok, the vehicle im making is a base class, fully customizable, you can create your own walk cycle for each of the eight movement directions. ill make a preset of course but you can always make whatever cycle you want. gonna be real nice :D

im really goin all out with this, this base class is gonna be very detailed, gonna give alot of room for ppl to make their own stuff.
 
Last edited by a moderator:

pospi

New Member
Jun 30, 2003
298
0
0
www.pospi.cjb.net
go for 2 or 3(depends on how many legs in air really), 20 UU line traces every tick?
why 20UU? I'd just trace from wherever the leg joins the body to where the 'ideal' position for the foot is. Make the max trace distance the length of the outstretched leg, that way if it returns nothing you know the leg won't be touching the ground and you can adjust accordingly, whether that be to find a different place for the leg, stop the walker going off the cliff or start it tipping over :D
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
hmmm that would be a problem. you know what give me a few hours; ill show you how this class works. because of how open ended im making the walk cycle, i dont want to limit anything. one of the things you can set in the walk cycle, for every leg, is stride length; so effectively thats all that the class should be able to "see".

I dunno its startin to clutter up my head :lol:

I show you when done lol