PDA

View Full Version : stair climbing



vonsatan
09-17-2002, 05:52 PM
Hello,
Basically, I'm trying to implement smooth stair climbing. I can already climb stairs and small bumps...but its not smooth. What's the best way to do this?

vshader
09-17-2002, 07:52 PM
you may get better results if you hold the handrail....

perhaps tell us the parameters you are sending to glClimbStairs() ?

vonsatan
09-17-2002, 09:27 PM
mmm...good one! ...how long did it take you to think of that? Good to see you have some important things to contribute to this forum,
thanks again.

NordFenris
09-17-2002, 10:48 PM
Hi there!

I know I did read up on this - hang on, I'll just go dig up the URL: http://www.gamedev.net/reference/articles/article1026.asp

This is collision detection with ellipsoids, which should at least point you in some kind of direction.

Good luck!

Ysaneya
09-18-2002, 12:26 AM
Come on! I don't see what *you* are doing to contribute to this forum.. that topic is just off-topic. It has nothing advanced. It has nothing OpenGL. It even has nothing about graphics programming! I don't want to sound rude, but you've already asked your question on other development sites, so what the hell are you doing here ? Are you so desperate ... ?

Y.

masterpoi
09-18-2002, 12:31 AM
So tell me, what exactly do you consider advanced then?

Djeez, guys like you just kill a forum...

MtPOI

knackered
09-18-2002, 12:49 AM
Search for the posts they've made on this forum, masterpoi - then you'll see that far from killing the forum, they actually *make* the forum.
And the forum shall from now on be known as ADVANCED OPENGL.
Tell us all what tenuous connection you make between "stair climbing" and opengl...I'd love to hear it.

masterpoi
09-18-2002, 02:31 AM
What exactly does insulting people as being lazy and dumb add to the forum? Love to hear that...

You can't have advanced topics with only opengl commands, you just can't. And i still don't see why this isn't considered an advanced topic. (While Looking at the beginners forum)

I've been following the forum for about 2 years now, every now and then something like this becomes a mayor thread with more than 50 posts.

MtPOI

[This message has been edited by masterpoi (edited 09-18-2002).]

Fredz
09-18-2002, 02:53 AM
I think your question should be more specific in order to obtain a constructive answer.

For what sort of project do you need this ? a game ?
What method do you use at this time ?
What is your character ? human, animal, robotic, none of the above ?
What sort of things do you want your character be able to climb (exhaustive list) ?
Do you want to calculate animation in realtime ?
Do you want your animation to be physically correct or just believable ?
Did you analyse biomechanics of stairs climbing ?

knackered
09-18-2002, 02:58 AM
Originally posted by masterpoi:
You can't have advanced topics with only opengl commands, you just can't. And i still don't see why this isn't considered an advanced topic. (While Looking at the beginners forum)


You have a point, but simulating climbing stairs is really not related in any way to graphics algorithms, technical issues with rendering, or any opengl related issue. It's a collision detection question - and there are plenty of other forums that deal exclusively with these kind of questions, so why ask them here?

zen
09-18-2002, 03:47 AM
I have a strange deja-vu feeling...
Don't make such a big deal out of this or we're going to have another 70+ post thread over nothing.And that's what's hurting the forum most.Wasted,meaningless typing.Besides, vshader's first remark was 'a good one' indeed...No need to take it personal.

knackered
09-18-2002, 04:00 AM
I have a strange deja-vu feeling about someone else writing "I have a stange deja-vu feeling"...add infinity. http://www.opengl.org/discussion_boards/ubb/wink.gif
I'm on mi lunch now....

vonsatan
09-18-2002, 05:42 AM
Ok, thanks for all the help!...i think
I only posted this question because from the things i've read, there are deffinently some intelligent people reading/contributing here. I was hoping to get some other peoples ideas on this subject, I already have my own ideas/implementation and wanted to see how it compares to others.

Coconut
09-18-2002, 05:52 AM
First of all, it would be nice if you can tell people how you did it.
Secondly, I still don't understand what you are asking. Are you looking for something like:
http://www.honda.co.jp/robot/

to do quote: "I'm trying to implement smooth stair climbing"?

vonsatan
09-18-2002, 06:16 AM
Fair enough, here it is:
I've implemented collision detection using a bsp tree along with the dynamic plane shifting algo. I have also implemented "stepping". This allows the player to move up small rises like stairs..but its very rough, it just jumps straight up each step. Im aiming this for use in a FPS style game..and i have a few ideas of how to do it but would like some other opinions.

V-man
09-18-2002, 11:31 AM
opinion? no problem!

No need to be realistic in a game. Just do a smooth move up.

It will keep your collision detection simple as a bonus.

PS: I think you now understood how to post in the advanced forum!

V-man

Humus
09-18-2002, 01:52 PM
I haven't tried this, but I think it should work: For each frame, you calculate the height it should be at. Currently you just use this value right off, but instead you should do a weighted average between this a previous values. I'd try something like this:

#define AVERAGE_FACTOR ... (something in 0..1)

current_y = calcCurrentY();

static float accumulator = 0;
accumulator *= AVERAGE_FACTOR;
accumulator += current_y;

y_to_use = accumulator / sum(i = 0 to infinity, AVERAGE_FACTOR^i);

Korval
09-19-2002, 11:12 AM
No need to be realistic in a game. Just do a smooth move up.

Yeah, no need for that pesky realism like self-shadowing, volumetric lighting, fog effects, bump mapping, etc...

If you're going to try to do something realistic, it should be consistently realistic. Meaning, you shouldn't gloss over stuff like stairs if you're going to spend hours getting some stencil-shadow volume technique to work. That's why it bothers me that very few FPS's do decent animation; it's mostly 80's-style sprite animation.

knackered
09-19-2002, 11:53 AM
Medal of Honour: Allied Assault has a magnificent movement model - real shakey-cam stuff, when running around and climbing stairs...very atmospheric, and certainly worth the effort.

V-man
09-19-2002, 06:03 PM
Well excuse me if you guys dig that stuff (stair climbing realism) but to me it gets dizzying when the camera shakes too much. It's a good thing most games dont implement shaking for walking.

Ever tried filming with a camera while walking or running?

Better put that in options section!

V-man

vonsatan
09-19-2002, 07:34 PM
Yep..thats exactly what im trying to do.
i.e.. make it seem like the player is actually walking around in the world rather than just viewing the world through a movable camera. I havent yet tried any of the stuff thats been suggested (no time!) but i think i'll try some kind of interpolation thing so as not to let the new movement position be too far away from the current one (depending on the current velocity)...hopefully that will smooth out the stairs thing but still feel like you're moving up stairs and not a slope.

knackered
09-20-2002, 12:07 AM
Originally posted by V-man:
Well excuse me if you guys dig that stuff (stair climbing realism) but to me it gets dizzying when the camera shakes too much. It's a good thing most games dont implement shaking for walking.

Ever tried filming with a camera while walking or running?

Better put that in options section!

V-man

You felt dizzy during Saving Private Ryan?

Tim Stirling
09-20-2002, 01:39 AM
My basic collision detection had things like stair climbing thrown in for free,Make sure you use sliding planes and then when you come across a stair you auomaticly end up sliding up the stair in a nice smooth way.

Collision detection is never realistic as it uses spheres/elipsoids/cylinders to fake a physical body. A proper C.D algorithm would be highly connected to both physics and the skeletal animation so that collisions are based on parts of the body colliding with the world effecting the skeleton and thus the head and thus the camera and moving the limbs about. The movement should also be realisticly modeled not a simple vector moving forwards but basd on human walking motion.

This is not too advanced for a 20 strong team but for the rest of us its best just to concentrate on the basics. Oh and even if you had this fully acurate model then it would be sick making as the human brain consciously removes most of the movement from your vision- this is what makes it possible to read a book even although your hands and eyes move slowly. So if any wobble on the samera is needed it should be very minimal.

2 conflicting idea but both correct and it depends what you are after.

Tim

vonsatan
09-20-2002, 06:03 AM
ive read about the sliding plane thing and if it acheives the stair climbing for free I might try implement that as a replacement of my current method...
.......cheers