MilkMan5x
Member
Quake 3 BSP loading & rendering
GitHub repo link (legacy repo)
==========================================================================
So, back in 2017, I somehow decided to create a BSP loader.
After few days of pain and agony, I managed to wrangle up some very basic loader... and then I forgot about it.
But today, As I found this thing all dusty and forgotten,
I thought this bad boy needs to see the light before it gets totally abandoned.
So I polished a little and decided to Share with you, Folks.
(Who knows? This might be come in handy and could be some good starting point on writing the map Loader.)
So here it is, The very Minimal (AKA too-lazy-to-finish-it) Quake 3 BSP loader.
==========================================================================
--=[Things implemented]=--
"Leaf" culling using visibility data from the map
6DOF(...kinda) 3D camera with Quake-like side tilt thing (You can backflip! ...sorta)
Basic loader :
Loading basic level geometry, leaves, lightmap and more.
Basic(?) renderer :
Able to render the "leaves" that is visible only
Lightmap!
(The renderer can still be optimized; As I didn't knew much about the Vertex buffers and used some inefficient method.)
--=[Things NOT included]=--
BEZIER PATCH (my urban weakness) - If you see some "holes" in the level, That's probably the Bezier patch model that's not loaded and rendering.
Textures & Entities - My intent on writing this was to Learn about the BSP's level structure, So I didn't wrote them, Apparently.
Many other things - As this boy's really Abandoned.
Also there's "playable" .EXE file conveniently compiled in the GitHub's repo, Feel free to Take a gander at it!
(It contains Brütal metal music and Some handsome & evil guy's voice; Be careful with the volume!)
==========================================================================
--=[Screenshots]=--
--=[GitHub]=--
GitHub repo link (legacy repo)
GitHub repo link (legacy repo)
==========================================================================
So, back in 2017, I somehow decided to create a BSP loader.
After few days of pain and agony, I managed to wrangle up some very basic loader... and then I forgot about it.
But today, As I found this thing all dusty and forgotten,
I thought this bad boy needs to see the light before it gets totally abandoned.
So I polished a little and decided to Share with you, Folks.
(Who knows? This might be come in handy and could be some good starting point on writing the map Loader.)
So here it is, The very Minimal (AKA too-lazy-to-finish-it) Quake 3 BSP loader.
==========================================================================
--=[Things implemented]=--
"Leaf" culling using visibility data from the map
6DOF(...kinda) 3D camera with Quake-like side tilt thing (You can backflip! ...sorta)
Basic loader :
Loading basic level geometry, leaves, lightmap and more.
Basic(?) renderer :
Able to render the "leaves" that is visible only
Lightmap!
(The renderer can still be optimized; As I didn't knew much about the Vertex buffers and used some inefficient method.)
--=[Things NOT included]=--
BEZIER PATCH (my urban weakness) - If you see some "holes" in the level, That's probably the Bezier patch model that's not loaded and rendering.
Textures & Entities - My intent on writing this was to Learn about the BSP's level structure, So I didn't wrote them, Apparently.
Many other things - As this boy's really Abandoned.
Also there's "playable" .EXE file conveniently compiled in the GitHub's repo, Feel free to Take a gander at it!
(It contains Brütal metal music and Some handsome & evil guy's voice; Be careful with the volume!)
==========================================================================
--=[Screenshots]=--
--=[GitHub]=--
GitHub repo link (legacy repo)
Quake 3 BSP loading & rendering
(stronger & spicier & better, Hjåh!)
GitHub repo link : https://github.com/TandyRum1024/gml-q3-bsp-loader
Hi. After chucking this old tech on this forum back in 2018, abandoned, Those haunted souls of railgun-holding quad-damage-loving-freaks kept haunting me every friday the 13th.
That combined with the guilt of leaving some (potential) projects alone made me to return to this project & work a bit more on it.
So Here I am, Re-wrote everything & made few improvements.
The future of this project is still unknown, But at least I was able to make this thing a bit more usable.
==========================================================================
This example features :
Rendering of level geometry via the BSP with Potential visible set, Pre-baked in the map.
(stronger & spicier & better, Hjåh!)
GitHub repo link : https://github.com/TandyRum1024/gml-q3-bsp-loader
Hi. After chucking this old tech on this forum back in 2018, abandoned, Those haunted souls of railgun-holding quad-damage-loving-freaks kept haunting me every friday the 13th.
That combined with the guilt of leaving some (potential) projects alone made me to return to this project & work a bit more on it.
So Here I am, Re-wrote everything & made few improvements.
The future of this project is still unknown, But at least I was able to make this thing a bit more usable.
==========================================================================
This example features :
Rendering of level geometry via the BSP with Potential visible set, Pre-baked in the map.
3D camera with Quake-like side tilt thing
Loading basic level geometry, leaves, lightmap and more.
Bezier patches (Finally!)
Texture loading & mapping (only if its available)
Lightmap lighting model
Lightvolume lighting (in test phase)
Things not featured :
Quake 3's shader pipeline (too much complicated for me to implement it :/)
Frustum culling of leaves when rendering them (potential optimization)
Level geometry texture atlas (another potential optimization)
"Billboard" Type of leaffaces.
==========================================================================
Heads up :
In order to use this example, You'll need some resources from Quake 3 : Arena (or Quake live).
Since including the resources in the example violates the Copyright law (and potentially dunk me in some sticky situations), You have to get them yourself.
Thankfully the bare-minimum resources you need is just a .bsp / .pk3 / .zip map file.. And you can grab some of them from the Quake 3 map database (link).
On the other hand, The assets (pak0.pk3) must be obtained by you. It can be found in quake 3's installation folder with the name [pak0.pk3], And you can grab the demo version of Quake 3 : Arena on steam for free, If you don't happen to have the full version of the game. Quake live's assets works just as fine as Q3A, So you can use that if you have one too.
==========================================================================
Gallery
==========================================================================
GitHub repo link : https://github.com/TandyRum1024/gml-q3-bsp-loader
Loading basic level geometry, leaves, lightmap and more.
Bezier patches (Finally!)
Texture loading & mapping (only if its available)
Lightmap lighting model
Lightvolume lighting (in test phase)
Things not featured :
Quake 3's shader pipeline (too much complicated for me to implement it :/)
Frustum culling of leaves when rendering them (potential optimization)
Level geometry texture atlas (another potential optimization)
"Billboard" Type of leaffaces.
==========================================================================
Heads up :
In order to use this example, You'll need some resources from Quake 3 : Arena (or Quake live).
Since including the resources in the example violates the Copyright law (and potentially dunk me in some sticky situations), You have to get them yourself.
Thankfully the bare-minimum resources you need is just a .bsp / .pk3 / .zip map file.. And you can grab some of them from the Quake 3 map database (link).
On the other hand, The assets (pak0.pk3) must be obtained by you. It can be found in quake 3's installation folder with the name [pak0.pk3], And you can grab the demo version of Quake 3 : Arena on steam for free, If you don't happen to have the full version of the game. Quake live's assets works just as fine as Q3A, So you can use that if you have one too.
==========================================================================
Gallery
GitHub repo link : https://github.com/TandyRum1024/gml-q3-bsp-loader
Last edited: