Advertisement Jump to content


This topic is now archived and is closed to further replies.


Quake3 Map Format or Unreal Map Format loading?

This topic is 6342 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For my 3D Shooter Engine i need some Format for Levels now. I don''t have much time so i don''t wanna write my own level editor let appart the editing itself. That''s why i want to use Unreal or Q3 Level files. Has anyone good documentation on either one of these. Perhaps even some source code for loading or something? Thanks for helping. By CommanderXXL

Share this post

Link to post
Share on other sites
That helps alot. Thanks.
All i need now is some sort of a rough description on how to get all the visible vertices of these data. /me thinks that this will be one difficult problem, looks like i have to check each frame which of the clusters(leafs) are visible and then get the vertices for the given leaf out of the Faces lump after checking if the Meshverts index tells me some vertices to use instead of the normal vertices i get. Is this correct?
I don''t wanna use the lighmap data in the file cause i use my own lighting of the levels.

By CommanderXXL

Share this post

Link to post
Share on other sites
Yeah, that sounds about right...
Here''s how I did it:
First I made a function that draw a leaf. Not to hard to do but remember the meshverts and stuff like that or you''ll get some really weird results...
Then you need to find out wich leaf the camera are in. I assume you know how to do that, if you don''t just tell me and I''ll try to explain.
Then I looped through all leaves and did exactly what it says at the bottom of the file format document: "Cluster x is visible from cluster y if the (1 << y % 8) bit of vecs[x * sz_vecs + y / 8] is set." If it is then draw it.

This is very brief and I hope it makes some sense...

BTW This may not be correct way do draw a bsp tree since I didn''t care about Z-sorting when I did it. I just used the Z-buffer instead.

Share this post

Link to post
Share on other sites
I''m in the process of writing a Quake3 BSP renderer for The Nebula Device. The code is fairly clean, though its still in an early-rough-Alpha state. The source code of the renderer is available here:

If any of the code is useful to you, feel free to use it in your engine. Even if the code is not directly useful, it should enable you to easily understand how the data is packed and can be extracted and used.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!