3D Map formats... Help :p

Loffen

Regular
Joined
Mar 21, 2004
Messages
51
Location
Akershus, Norway
Well, i decided to start of with the amazing thing called 3D graphics. The first big questions that popped up in my head was: 3D Maps? Formats?...

I looked at some .bsp (ex: half-life maps) files I found on my computer, they where crypted or something, impossible to read, except the "entity" section...

I am not that far yet that i am able to load a map, but i'd like to know what my class should be prepared for...

suggestions?? if you ever created a 3d map engine how did you do it??

I have absolutely no idea, and I have a bad feeling, telling me this question has been answeared 100's of times, but I cant find the answear anywhere. Just post a link if you know where the answear is ;).

Thanks...
 
You have to export all of the Geometry to a file and all of the textures too. You are probably better off making your own file, since you will learn more that way.
 
3D maps? Look into Heightmaps..

Thanks to Phikwe for a LOT (and I mean a LOT) of help on this.

Here's the attached heightmap class, Loffen you know the clsSprite class on the tutor's corner? You'd use it pretty much the same way..

Anyways, here it is:
 

Attachments

http://www.gametutorials.com/

Under that tutorials section they have a few samples on how to load .bsp Data and how to display these.

The code is c++ and c++.NET
They use Opengl to display, but loading shouldn't be different and changing the code to display in Dx shouldn't be too hard.

Hope it helps :)

PS.: More direct link: http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg5.htm

+

The page where the Q3 Bsp format is explained:
http://www.gametutorials.com/Tutorials/OpenGL/Quake3Format.htm
 
Last edited:
Hmm.. after looking at these tutorials i maybe change to OGL... looks much better documented here than in the DXDocs (first impression)...

Anyway, i reccomend you too visit the tutorial section here. It IS OpenGL, but in the camera moving around example, you could extract the math and convert the rest to DX...

Will post about my later impressions...

EDIT: Noticed the code is written in c/c++. Well, i'll have to blow away the dust from my c++ book since last time i used it :p

EDIT2: Err... c/c++ is still as hard as i remembered. Staying with DX for now :-\

--Loffen
 
Last edited:
Note about my Heightmap class,
in my Render sub - before DrawPrimitaves -
add this line:

dxDevice.VertexFormat = CustomVertex.PositionNormalTextured.Format
using this line, texturing will work and you wont get an error (which i recently realized ;))
 
Back
Top