Sign in to follow this  
xsirxx

About 3D worlds and 3D maps? Whats the real way?

Recommended Posts

DISCLAIMER: (First off let me say, this is a general question that I could not find very much info about here on the groups. Ive searched for hours, or maybe im bad at searching.) 1st Question is, what is the best way to have a "world" in your game? Ive heard of people using ID's BSP format & writing their own editors... 2nd Question is, Where can I find tutorials about incorporating BSP into my game? Where can I find tutorials about making a new map editor with object placement? Culling as well... Thanks --Brad

Share this post


Link to post
Share on other sites
As for BSPs, you can have a look at the advanced OpenGL tutorials on Game Tutorials.com. It's not a tutorial as such, more commented code for you to play around with and see in action. Of course, you're free to implement it in your own engine too.

As for culling, you'll find some information on that site, but also over on Code Sampler, which is in a similar format to the Game Tutorials series.

As for creating worlds, people seems to use Valve's Hammer (which I think was based on WorldCraft), as well as the Q3Radient tools that are used with Quake 3.

An even simpler example can be found on Psionic3d's page, which uses Milkshape 3D to create simple game level architecture.

I'm sure others will have a lot more to add, but this should be an interesting starter.

Share this post


Link to post
Share on other sites
There really isn't a best way per se. One of the easiest partitioning algorithms are octree/quadtree. There's a lot of articles written up on them all around the net. Octree is normally used by outdoor scenes. BSP is normally used for indoor stuff.

Share this post


Link to post
Share on other sites
Quad/Oct Trees seem like a good way to go then for me... Any idea where I might find a good tutorial on that? or just general info to read up on?

Also If worldcraft is a good program, that uses ID's bsp format right? Is that generally a good thing to incorporate rather than re-writing everything? And is there a good DirectX tut on that? Thanks

--Brad

Share this post


Link to post
Share on other sites
Worldcraft (including Worldcraft 3.x, which is Hammer, iirc) allows the designer to create worlds using CSG by adding blocks and entities to the level. The results are saved as .map and .rmf files, which do not contain any culling, visibility or partitioning information, just the blocks and entities.

From there, programs take the .map or .rmf saved files and transform them by removing hidden faces, creating a bsp tree, computing visibility and lightmaps, in the case of half-life maps (that use their own bsp format - although it is heavily inspired by the quake 1 bsp format). However, you can use any converter to transform a .map or .rmf file into your own file format (although basic operations such as turning brushes into triangles or removing hidden faces can still be performed using the default programs).

Share this post


Link to post
Share on other sites
Yea im definitly reading up on the OctTrees.... So basically Im going to write a world editor for my game that uses OctTree's to give culling information collision detection, that sorta thing. Then whats the best way to create a map that I will make with the World editor? I take it that there is prolly another tut for that hiding around? Or most people go with the .map creation from another editor and then convert? Thats where my confusion begins.

Thanks again for hte tuts on the oct trees, im going to try to incorporate that as soon as I can find info on building maps from an editor that I create iI suspose.

--Brad

Share this post


Link to post
Share on other sites
Yea im definitly reading up on the OctTrees.... So basically Im going to write a world editor for my game that uses OctTree's to give culling information collision detection, that sorta thing. Then whats the best way to create a map that I will make with the World editor? I take it that there is prolly another tut for that hiding around? Or most people go with the .map creation from another editor and then convert? Thats where my confusion begins.

Thanks again for hte tuts on the oct trees, im going to try to incorporate that as soon as I can find info on building maps from an editor that I create iI suspose.

--Brad

Share this post


Link to post
Share on other sites
Quote:
Original post by xsirxx
So basically Im going to write a world editor for my game that uses OctTree's to give culling information collision detection, that sorta thing.

Making your own 3d world editor is a *big* task, much more so than for 2d games. You'll save yourself lots of time if you can use an existing editor and convert it's output. If conversion takes a long time you can always do it as a preprocessing step when you actually build your game.

Share this post


Link to post
Share on other sites
Well my problem is, I cant find any tuts on converting and for some reason see that as a more daunting task. If I could build an app (directx) and save the vertex info automatically in format I know and then read it in, it would seem more likely? Of course I cant find a tut on that either to make sure I do it correctly. ? Thanks

--Brad

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this