CacophonousChorus Posted December 13, 2017 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? 0 Share this post Link to post
scifista42 Posted December 13, 2017 (edited) Doom renderers use a BSP tree (nodes) rather than triangles. Read about node builders. For OpenGL, specifically GL nodes and GLBSP. 0 Share this post Link to post
dpJudas Posted December 13, 2017 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. 0 Share this post Link to post