Skip to main content
GameDev.net gamedev.net
🔒 Locked

.bsp format (maps)

Started by John_23 Feb 14, 2007 at 11:27 AM 2 replies 1.5k views
Original Post
John_23
John_23
I'm stuck on two things... 1) How does the .bsp format work? 2) How can it be imported into OpenGL and used as a map? Anyone with any information on either of these points please help! Thanks :P John
Kwizatz
Kwizatz
1) There are many different .bsp file formats, you cannot reliably infer the exact format by extension alone, that said, Binary Space Partitioning is a space partitioning method originally used to increase rendering efficiency (depth tests used to be very expensive), but now is mostly used for collision detection. More information here and here

2) Depends on the format, Quake 3 BSP files already contain polygon information, so you should look up the spec and write a loader for it, if you're using raw text .map files, you will notice that there is no polygon information, each brush (convex chunk of geometry) is described as a collection of planes, so you must create a huge quad per each plane in the brush (coplanar with the plane) and clip it away using the remaining planes in order to get the actual polygon you'll feed to OpenGL.
John_23
John_23
Thanks, I'll take a look at those sites :D
Krohm
Krohm
Maybe also take a look at this and follow the link to a similar resource.
Previously "Krohm"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.