Original Post
Hey all, does anyone know a thing or two about Quake 3 BSP rendering? I'm using Direct3D to be specific but it doesn't really matter what you use since my problem is not related to any specific API. I have already written my BSP rendered and it works fine for most maps, but not the maps I want to render. Since I'm on my iPhone at a wifi hotspot, I can't share any screens of my problem right now. I can however tell you the problem at hand. My code is based off of the game tutorials.com code which works rather well and was the most straightforward example I could find. Every other tutorial was either too confusing, or had gone C++ class crazy!
My code renders all BSP faces and meshes using triangle fans which works fine for most maps but for more complex maps that I want to use in my game, the geometry is completely distorted! Triangle fans don't work, and I can't figure out how to re-organize the vertices into triangle lists. For those who want to know, I am trying to render the Simpsons map. So far, it is the most complex and most memory intensive map I have ever seen ( and yes, more complex than Pyramid of the Magician which also has the same problem) so I am not surprised. So far, it has over 300,000 vertices and takes up over 200mb of memory on my PC and requires 128mb of VRAM to render. Right now, I'd like to figure out some way to reorganize the vertices to render them properly. I don't have the slighest clue of what to do here, but I tried analyzing the vertices generated by the map. I was particularly looking for polygons that were 4 vertices. The trees render correctly, but the windows don't. Here are some vertices generated from a 4 vert polygon.
v0 = {-1971,-92,4696}
v1 = {-1971,-184,4700}
v2 = {-1971,-184,4696}
v3 = {-1971,-92,4700}
I tried playing around with the vertex order, but never got consistant results. Usually, it looks worse when I try to fix it.
So if any of you have experience with Quake 3 maps or have any ideas, please tell me your thoughts because I'm a few days away from going nuts!
Btw, I don't have Internet at my place atm so I won't be able to readily dl anything for a while. And if you don't know what map I'm talking about, you can do a quick search for Simpsons Q3 on YouTube. So far, I have never seen a single BSP loader render that map correctly, period. Some do a fairly decent job and and the gfx don't get distorted, but there is missing geometry everywhere. So far only quake 3 itself is the only loader that renders it properly.
Thanks for reading.
My code renders all BSP faces and meshes using triangle fans which works fine for most maps but for more complex maps that I want to use in my game, the geometry is completely distorted! Triangle fans don't work, and I can't figure out how to re-organize the vertices into triangle lists. For those who want to know, I am trying to render the Simpsons map. So far, it is the most complex and most memory intensive map I have ever seen ( and yes, more complex than Pyramid of the Magician which also has the same problem) so I am not surprised. So far, it has over 300,000 vertices and takes up over 200mb of memory on my PC and requires 128mb of VRAM to render. Right now, I'd like to figure out some way to reorganize the vertices to render them properly. I don't have the slighest clue of what to do here, but I tried analyzing the vertices generated by the map. I was particularly looking for polygons that were 4 vertices. The trees render correctly, but the windows don't. Here are some vertices generated from a 4 vert polygon.
v0 = {-1971,-92,4696}
v1 = {-1971,-184,4700}
v2 = {-1971,-184,4696}
v3 = {-1971,-92,4700}
I tried playing around with the vertex order, but never got consistant results. Usually, it looks worse when I try to fix it.
So if any of you have experience with Quake 3 maps or have any ideas, please tell me your thoughts because I'm a few days away from going nuts!
Btw, I don't have Internet at my place atm so I won't be able to readily dl anything for a while. And if you don't know what map I'm talking about, you can do a quick search for Simpsons Q3 on YouTube. So far, I have never seen a single BSP loader render that map correctly, period. Some do a fairly decent job and and the gfx don't get distorted, but there is missing geometry everywhere. So far only quake 3 itself is the only loader that renders it properly.
Thanks for reading.
