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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×