Collision Detection with animated meshes

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Tariq Jawaid
Gnoblar
Posts: 7
Joined: Sun Jun 05, 2005 2:56 pm

Collision Detection with animated meshes

Post by Tariq Jawaid »

Hello Guys,

1) Please anybody help me out, for collision detection in .mesh with .skeleton animated meshes, how I can able to detect collisions b/w two characters? because I did'nt find in OGRE this option! I heard about ogreODE binding but how to use it :?: , is there any tutorials specific for animated meshes collision detection etc...

2) how to integrate audio and networking capibilities with OGRE?

I will be very kind if anybody help me :idea: in these regards...

thanks
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

I will help you. :wink:
All you need is the ability to use the search button.
OgreODE is great. You can get it from ogreaddons - take a look at the zombie ragdoll demo in simple scenes.
Animated meshes will take a little extra work on your behalf, I´m afraid. It is an advanced topic, Ogre-wise.

How to integrate audio and networking with Ogre?
Well, that's an easy one. :wink:
Just integrate them. Ogre is only a rendering engine.
Do you want examples?
Plenty examples here - this has been discussed a lot. Searchy, searchy.

The Ogre Wiki is a good place to browse around.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
ahmedali
Gnome
Posts: 302
Joined: Fri Feb 20, 2004 8:52 pm
Location: Lahore, Pakistan

Post by ahmedali »

hi Tariq, I guess you are new to game programming. Can you tell us about your requirements and what kind of project you are working on in more detail.
Tariq Jawaid
Gnoblar
Posts: 7
Joined: Sun Jun 05, 2005 2:56 pm

More on my game

Post by Tariq Jawaid »

Hello guys, Im the student of computer systems engineering, well I've developed a street fighter kind of game using directx 8.0 programming, no build-in engine, just utilized the features of directx(DirectDraw, DirectInput, DirectShow etc) no 3d stuff, that was my 4th semester, It was great fun dealing with that! I have passion to develop modular s/w components, probably game engine is a good place to start my job...

I have quite a good experience with c/c++/jave(im SCJP)/C#/.NET/maya etc..., I like OGRE becuase of its great design and implementation, I planning to make Mortal Kombat 4/Tekken type of game as my final year project, honestly speaking I've only 6 months to go! so time is limited, but passion is great! :D

In which I've to complete it, I have one of my friend working on totally character modeling with maya, I thanks to Bisco for helping me, for maya exporter, now its time to build a game engine...

* first I just wanna run this game on windows(WIN32) platform nothing else,
I want to make my fighters plugable to game, means there should be some implemented component for every unique fighter, and also that will contain fighter's mesh file, his textures sounds etc...

means if I've I have 4 fighters in the beggining then, after some time, if I want to add more, then I just have to make a different implementation of same component Interface, and It would be then be connected(pluggable) to the game, may be it could be some (dll, COM or something like that), all in one package or directory kind of structure that will extend the game...

* secondly we could have fighting tournament on the LAN with this game, In which two fighters should be playing with each other, and other people who r in the game but not playing yet; and waiting for their turn to come! they could able to watch them, as they r playing in the ground... they can operate the camera manually/or an automatic camera that follow the fighters from bit of AI stuff... the waited ones(players) could pass messages to each other; to fighters :!:

In this I've planned to have central machine(Server) that will going to control all the players connected, and administrating the synchronization mechanism, so every one will see, exactly the same what is goind on!

if player 1, and player 2, are playing on the same machine then the central server and synchonization mechanism will be on the same machine, OGRE will one thread, Game Engine is one one, with two child threads player 1, and player 2.

and if the player 1, and player are on different machines, and other people are also connected, the tournament situation, then there should be a central machine for central server and synchonization mechanism!

just these are some/big spots of my game, I think its possible, if I will work really hard! not hardly working :D , but I will need help from you guys, Its great to join this community! just needs directions!

Im using Visual Studio.NET 2003, C++, maya rightnow!

1st I want some good material to learn multithreading in VC, I've done in java/C# but I think that was easy as compared to C++!

2nd I want to Learn network programming to accomplish my above design.

3rd should be first, OGRE does'nt provide any collision detection mechanism, tell me something about that! I think ogreODE but dont have any knowledge about it... give me some link or reference to download/configure and learn that.

4th sound system integration.

thanks please give me some ideas on pluggable component base players(that will contain common Player Interface Implementation, .mesh files, textures, their sounds, AI togethers)

please give your ideas, and pls try to understand that where iM living here people dont really do these kind thing, I mean game development, Im alone in my university who is doing this...

THANKS
Tariq Jawaid
Tariq Jawaid
Gnoblar
Posts: 7
Joined: Sun Jun 05, 2005 2:56 pm

Tariq Jawiad

Post by Tariq Jawaid »

Yes I will see ogreODE!
User avatar
Raven
Goblin
Posts: 203
Joined: Wed Mar 23, 2005 1:07 pm
Location: Melbourne, Australia
Contact:

Post by Raven »

OpenAL is great for sound. It will work independantly of Ogre, so you will need to set sound sources to be in the same spot as your entites.
I found it quick and easy to pick up and it is cross platform, just like Ogre so they make a good match. There is a thread about someone who is going to make a plugin for Ogre, which will be fantastic. I wouldn't try and wait for it to be done if you have an inpending deadline.
Also remember that Ogre has always been developed as a rendering engine, so it has only ever has graphics in mind when it has been created. Any plugins, like ogreODE, are extra's.

As for multithreading have a look at SDL :)

As for networking, I don't have any recomendations, prehaps some else might...
I used up all my sick days, so I'm calling in dead.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

OpenThreads is great for multithreading. Low impact.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
ahmedali
Gnome
Posts: 302
Joined: Fri Feb 20, 2004 8:52 pm
Location: Lahore, Pakistan

Post by ahmedali »

Games like tekken relies on combos and the number of animations per character is just uncountable. While games like street fighter have a small set of fighting states per character and they rely more on movement tactics, they are simple to make and content is also easy to make. Anyway i suggest you to make it simple.

Its is impractical to use animated meshes collisions for hit testing. Im sure even tekken does not do this. Even if you use it, it will be very unperdictable specially in case of different types and volumes of characters meshes. So better use some simple bounding shapes like capsule/box etc. You can also do it the same way, you did in your 2d fighting game. The only difference is that the characters look 3d.

It is better to use data-driven aproach than class/object driven. I mean just write code for one generic fighter/character and use different models/sounds/animation for each of them. It has its limitations but you have 6 months.

For networking there are plenty of friendly networking libraries available. OpenTNL, RakNet, Quazal's etc. Not matter what network lib you use they are require you some level of study and time for this feild.

And dont you think threads are completely unneccessary for this project?

Good luck.
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1
Contact:

Post by Vectrex »

a big time saver would be to use the Yake or Zeus engines which have already done all the exceptionally dull binding of sound/phyics etc etc to Ogre. Plus any contribs by you would be very appreciated. Not sure about zeus but the Yake fokes have spent a long time on this and since you've got 6 months I wouldn't even think of recreating it :)
Yake is coming up to v0.2 which has everything you need except networking (that's next for v0.3). Plus lua scripting which will be a big help with a fighting game and all the combos

www.yake.org
http://zeus.graphicsware.com/
Tariq Jawaid
Gnoblar
Posts: 7
Joined: Sun Jun 05, 2005 2:56 pm

Thanks

Post by Tariq Jawaid »

Thanks Guys for your nice suggestions! hmmm im really looking forward to use Yake, it has integrated as plugins most of the APIs(ODE,OGRE,OPENAL)!

and as Ahmedali says; about collision detection to use bouding box or cylinder! I think you're right! In my 2d game, I used to have hundreads of fighters images, and I had used rectangular collision detection mechanism at that time, for every particular frame of action, the fighter had some bmp associated with it at a given instant of time! I just find the bmp, and finds out the rectugular area bounds to it! and check collision with repect to it! to or from the other fighter! that was not a very big deal!

Is it possible to use same kind of approach for quick implementation for animated .mesh file character, at every particular instant the character must be following some motion clip in it! so it does have some bounding on associated with it! if I just able to find that boundings then it would be done easily! as far as I see!

as for multithreading, I think if I use it, it would be more efficient then simple sequentual approach! I had used in my 2d game no networking, but consider for a moment a simple single thread game:

In your main loop you read in from the keyboard, move things in the world, and then draw them to screen. So it would be seen reasonable to that in network game you would read in from the keyboard, read in from the internet, move things around, send msg back out to internet, and then draw to the screen. Sadly, I think this is not the case. Oh sure it would work like this! but I think it won't work the way you expect it to. Why? let's say your computer draw 20 frames per second. That means that most of 50ms is being spent of drawing, which means that nearly 50ms go by b/w to checks for new data from the internet, but I think 50ms makes a difference b/w life and death. so when u send a msg to another computer the msg could be waiting to be read for nearly 50ms and the reply could be waiting in your machines h/w for an extra 50ms for extra round up trip time of 100ms. yes it can be reduced if frame rate is high!

(Advanced 3D Game Programming with DirectX 9.0 by Peter Walsh)!

Peter Walsh says that! Its seems to me logical! any ideas about it?

and really thanks for your guidelines for me! really admire!
thank you all guys!
Tariq Jawaid
Gnoblar
Posts: 7
Joined: Sun Jun 05, 2005 2:56 pm

Bounding Box Update through

Post by Tariq Jawaid »

First of all thanks, for your answers! but I need to know about bouding box transformations again skeleton animation, I've gone through most of the threads here about this! but got some questions right-away!

1) How can we manage this, I mean how could we able to transform bounding box attached to the entity?

2) Do I need to use ogreODE certinely for that, becuase I dont need any-other functunality, just collison detection against 2 characters, being Pre-Skeletally animated during the course of export within maya!

If somehow I could able to achieve updating of bounding box, corresponding to the .skeleton file of animation&skeleton! I would be able to do that!
could somebody tell me some Algorithmic approach towards that?

I will be very thankfull!

Thanks
Post Reply