Sign in to follow this  
DanielWilkins

How does Quake render it's BSP?

Recommended Posts

Hi. I am trying to find the best rendering method for a file format very similar to the Quake3 format. I have it rendering but it isn't as fast as I'd like it to be so I am wondering how people go about rendering Quake BSP maps the fastest. I haven't been able to get VBOs working so I am using vertex arrays. Quake 3 uses PVS and so you have a list of leaves or regions (sets of faces) that you can see from your current place. Also, how does Quake rendering handle the fact that leaves may have polygons with differing textures?

I had a few ideas and this was one:

Check the PVS and sort all of the visible polygons by texture and render in batches.

Does that make sense? Any other ideas? Thanks!

Share this post


Link to post
Share on other sites
[quote name='Chanz' timestamp='1314011996' post='4852225']Check the PVS and sort all of the visible polygons by texture and render in batches.[/quote]

That's more or less what it does. You could check out the [url="ftp://ftp.idsoftware.com/idstuff/source/quake3-1.32b-source.zip"]Quake 3 source code[/url] for ideas, but be warned that it may look like irredeemable spaghetti in places!

Share this post


Link to post
Share on other sites
[quote name='mhagain' timestamp='1314016540' post='4852255']
[quote name='Chanz' timestamp='1314011996' post='4852225']Check the PVS and sort all of the visible polygons by texture and render in batches.[/quote]

That's more or less what it does. You could check out the [url="ftp://ftp.idsoftware.com/idstuff/source/quake3-1.32b-source.zip"]Quake 3 source code[/url] for ideas, but be warned that it may look like irredeemable spaghetti in places!
[/quote]

Thank you. I wonder how exactly it sorts the indices though. Because there are multiple regions and multiple textures in each region. Guess I will have to come up with a way I can render all of the same textured polygons for all visible regions at once with as little calls as possible. Although in that calculation it might negate the performance increase altogether.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this