Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How are sector floors and ceilings broken up into triangles for rendering?

Recommended Posts

I'm refactoring my software DOOM clone to use OpenGL support, but am having trouble figuring out an efficient and accurate algorithm to create triangulated floors and ceilings for each sector.  What I have so far only works for self-contained convex sectors, but handling concave and sectors within sectors scenarios eludes me.


Does anybody know the general process for doing so or know what it's called (or where to look) in ports such as ZDoom to see how they do it?

Share this post

Link to post

You have to generate a new BSP tree where all subsectors are convex. ZDoom includes its own node builder that it uses to generate such a tree - the BSP in the WAD can not be used. From that step forward it is a matter of drawing each subsector floor/ceiling as a triangle fan.

Share this post

Link to post

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