Advertisement

Collisions in 3ds scene

Started by November 30, 2003 02:42 PM
3 comments, last by ichor 21 years, 3 months ago
Hello! I''m going to be loading a 3DS "world" into my simple game engine (Octree), and I''m wondering about collision detection for entire 3ds models. In the past, I have loaded 3ds models into a world and been able to determine if there is a collision with the entire object. However, I now am wanting to load the 3ds world (a fairly large model), and be able to determine exactly WHERE the collision occurs. For example... If I design a 3DS of a bunch of halls...I want to be able to walk down the halls, but determine if I smack into a wall. So the questions... How difficult is this, and what steps are required? If more information is needed, let me know, but that''s really the gist of what I''m trying to do. Thanks!
well seems like you are out of luck with .3ds like i am....
i am looking 3ds animation importer tutorial and i wasnt able to find any....wish you good luck with 3ds..
belgrade-yu
Advertisement
I''m not really familiar with 3DS so perhaps my help will prove fruitless, but here''s a go:

i''m assuming there are no "objects" like in Milkshape 3D, so everything is just a blend of polys.

In that case, you probably need to do something a bit more difficult but unique. First off, if there is a way to figure out what color and/or texture is bound to the polygon you ran into, you can use that to figure out what you crashed into. this is of course a bit too specific, as all your walls would always have to be gray or have a certain texture (or cause you headaches later on). This is one way to solve the problem

the second and probably better way is to create you own "world" file. What you do is export all your world models one at a time, then create your own txt file to link all the objects in your world. Granted this will be a bit time consuming, but overall more effective. If you have, for instance, the same table modeled in 20 or so of your "world" models, you would be saving yourself disk space by having just one file that contains those polys instead of 20 files having the same polys. I hope that makes some sense

an example would be:

room22.wrd

table 0.0 0.0 2.3 "/models/table.3ds"
wall 0.0 1.2 3.5 "/models/wall1.3ds"
wall 1.0 1.2 3.5 "/models/wall1.3ds"

end room22.wrd

etc. Then of course just create a reader to load those objects appropriately. I think in the end this would be your best approach, mainly because of file size and your ability to control each object more independantly of the world, rather than trying to deal with one large blob of polys

Well if you leave the world as one over sized .3ds file, you know the vertex''s/faces, you can do a simple collision detection with each face, but that is not very efficent.

Breaking the world into many .3ds files will allow you to use frustrum culling.
Hey, thanks for the replies... That gets me going in the right direction.

I do have 1 more question in regards to Milkshape 3D. I''ve used that program before (mostly to import/export 3ds models)...but I would rather use Milkshape because it''s a heck of a lot cheaper and works with tons of models... Alas, I need to be able to import models into my own engine.

Does Milkshape offer a function/file/algorithm/library/class/etc to load their own files? Are there any readily available?

Thanks again!

This topic is closed to new replies.

Advertisement