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

Doom's Floors

Recommended Posts

I searched around for a bit but I was surprised I didn't find anything on this... (And hopefully this is a good place to post this...)

Doom's floors. I know how they are made the original way with the visplanes and all, but what I want to know is how someone could go about forming polygonal meshes for the floors/ceilings.

From what I've been finding, is it seems you can use the points from the subsectors to form them. Is that right? But what is this about implicit edges? I'm just a tiny bit confused at which lines they actually are. I just need a quick rundown I guess.

Thanks in advance!

Share this post


Link to post
HollowedEmpire said:

I searched around for a bit but I was surprised I didn't find anything on this... (And hopefully this is a good place to post this...)

Doom's floors. I know how they are made the original way with the visplanes and all, but what I want to know is how someone could go about forming polygonal meshes for the floors/ceilings.

From what I've been finding, is it seems you can use the points from the subsectors to form them. Is that right? But what is this about implicit edges? I'm just a tiny bit confused at which lines they actually are. I just need a quick rundown I guess.

Thanks in advance!

Most ports use a precalculated "GL" BSP to facilitate quick determination of these fully closed polygons; however, this shouldn't be strictly necessary, especially for levels with well-formed sectors and BSP trees.

The segs together with the complete set of node partition lines (determined by the node_t::x, y, dx, dy fields) should form a complete division of space. So the problem is one of recursively splitting node lines with the vertices of segs that lay on (or sufficiently near in some possible cases of round-off error) the node lines, and then generating one or more dummy segs for each resulting edge in order to close the subsectors that are against them.

Something to be aware of is that a subsector may have only one explicit edge (typically a single-sided wall), while all remaining 2 or more other lines in the subsector are implicit node line edges. So it doesn't suffice to make any assumptions about how many implicit edges there may be.

I can't promise it'll be fast, but it should be the kind of thing that only needs to be done once when loading the level.

Share this post


Link to post

PrBoom has such an algorithm but it's not without its share of serious problems. The regular nodes with their shitty vertex precision are just not suitable for hardware rendering.

Another problem is that neighbouring polygons don't necessarily share the exact same line which is also a precision concern with hardware rendering.

GL nodes are just more robust and require a lot less work on the engine side.

Share this post


Link to post
Quasar said:

..then generating one or more dummy segs for each resulting edge in order to close the subsectors that are against them.


Ingenious! That seems like it work very well actually. Especially since the subsector nodes are all sequential.. Meaning I should just be able to throw the dummy ones right on the end. I guess the tricky part will just be getting the partition line to use.

Share this post


Link to post
Graf Zahl said:

PrBoom has such an algorithm but it's not without its share of serious problems. The regular nodes with their shitty vertex precision are just not suitable for hardware rendering.

Another problem is that neighbouring polygons don't necessarily share the exact same line which is also a precision concern with hardware rendering.

GL nodes are just more robust and require a lot less work on the engine side.

Yes the precision is an issue which concerns me. You need a *lot* of epsilon values, to say the least.

Share this post


Link to post
Graf Zahl said:

GL nodes are just more robust and require a lot less work on the engine side.


This is very true, and they would be much simpler to implement by all kinds of degrees... but part of me sorta irks at this because it won't have that vanilla authenticity to it. I don't want the wads to have to contain the extra information.

And it's even crazier I'm saying any of this, because if you think about it.. I'm basically trying to create my own GL Node builder when you get right down to it. :P Oh the madness.

Maybe I should examine the source code to a builder.

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
×