Spilling in a Closed Sector

Status
Not open for further replies.

Metal96

Member
Hello again,

So I have encountered an odd little bug that I just can't seem to fix. In two locations on my map, there is a small area of HOM/flat spilling that I just can't seem to get rid of. All the sectors in the area are closed, and the FOFs are set up right. It doesn't impact gameplay at all, just the visuals. Screenies:

6ajIM.png


A textured wall with HOM and a FOF texture glitch; the first spot.

OXD49.png


The camera above the plane reveals the FOF's floor and ceiling spilling into the empty space, not the regular floor's.

p0JEJ.png


A FOF above the spot shows severe graphical glitches, as this missing floor and minor HOM shows.

eJr94.png


However, the same FOF renders fine from the bottom.

zdxNl.png


The second spot: much less severe but still annoying.

sxXNG.gif


Examining the map (only the first spot shown) shows that there are no unclosed sectors or overlapping lines, but you're gonna have to trust me on the textures :-P

Click here for a wad highlighting the problem. A word about this: the wad contains everything currently in the map, including secrets, two unused textures that will probably be removed, and a whole lotta lag until I get it optimized. You spawn looking straight at the first spot, and if you turn around, you'll see an obvious impromtu teleporter that will take you to the second spot. Climb the stairs, and it will be immediately visible. At the top of the stairs, if you take the right path and keep right, the first FOF you can jump on from the "bridge" (for lack of a better word) has the no-floor glitch mentioned above.

Also, the wad currently crashes vanilla SRB2 after about 3 seconds, no matter where you spawn, where you look or where you move to. It runs fine in OpenGL and XSRB2, the latter of which I've been using for testing. If some light could be shed on why it breaks vanilla SRB2 that'd be fantastic :-)

Thanks!
 
I am inclined to believe that your map is just so excessively overdetailed that the software renderer completely breaks down.
 

I presume those plus formations are trees?

You need to put a vertex in the center of them. As it is now, each of those formations have two linedefs crossing each other, which is a very bad thing.

On a second note, the reason vanilla SRB2 hangs is because of your title card's numbers. It's drawing off the top of the screen, which is again a very bad thing in software (OpenGL couldn't care any less, given how it works; but software has a very constrained memory space to work in and this causes it to try "drawing" to things that aren't the screen). Given XSRB2's title cards go off to the sides instead of up/down, the issue never even occurs.
 
Last edited:
Ok, thanks for the title card thing. I know the map needs to be cleaned up a bit-switching to textured trees instead of a bunch of things gave it a speed boost, considering the thing count was cut in half. I'd think the biggest slowdown is the size coupled with nearly every sector having an FOF for snow...I realize I could compact the snow into the ground simply by texturing the ground but it just destroys the aesthetic touch. Besides toning down the scenery things some more, should I just go about removing vertices from the mountain-gradient sectors or something...?

And also that spilling glitch is apparently unfixable at this point. Well darn.

EDIT: And how is the lindef-crossing a bad thing? It's given me no bugs at this point, and considering they're part of the same sector that they're in and only there for the middle texture, they don't cause any sector bugs or anything...it seems like splitting them would just give me more work with offsets ( :-P ) and make the engine have to render double the lines.
 
Last edited:
You know, you can use Fake_Floors instead of FOFs in some areas for the snow. Although in the areas where you would have a cliff or something, then fake floors alone wouldn't work in that area. I am not sure if an FOF in that area would be the best, or something else that I don't know about.

I wonder if a custom FOF (only the ceiling renders and sides or something) would be good in those parts. It might already exist though, I haven't mapped in a long time, so I don't know.
 
Last edited:
Thanks Torgo, I didn't think of a custom FOF. I'll look into that, it'd cut the render load by a quarter, almost. Is there a sector effect that prevents the regular floor from rendering as well? Because a fake floor wouldn't work for cliffs, you're right, and like 90% of the snow is on cliffs. Also, apparently the spillage bug fixed itself when I removed the huge unused texture from the wad:

nUoX5.png


Thanks guys, I'm trying my best to get this running well without throwing away detail.
 
Well if it doesn't actually pose a problem, what's bad about it? I understand why it does pose a problem in most cases: it creates overlapping sectors that leak all over the place and screw up the gameplay and graphics. Of course I'm not gonna do that! The lines are part of the same sector, so it just acts as if you stuck a big line in the middle of a sector. The line doesn't actually have the data for a separate sector so the game just draws over it. Here, the game can basically just ignore the lines when drawing the floor and draw the middle textures which come out fine anyway. It's also why you can put two identical unclosed sectors next to each other with no problem: they get grouped into the same visplane, rendered without spilling because of it, no harm done. If it's such a big deal I'll split them all; I'm not trying to be stubborn here, I just want to know why.
 
Crossed linedefs are never a good thing. You may not see it now, but those can cause serious errors, regardless how obvious they may or may not be. It's best for them to never happen in the first place, ever.
 
Renderers need to determine the order of linedefs when drawing. When you have two linedefs that cross, you have two linedefs that are simultaneously in front of and behind each other.

Unfortunately, renderers are not that great at handling logical impossibilities, and such tends to result in erratic, inconsistent behavior. While it may work now, it might break if something else gets breathed on.



Of course, the sheer overuse of FOFs as snow doesn't help matters. Fake floors usually handle that better, due to lacking a lot of the overhead that FOFs have.
 
Thanks Inuyasha, that's exactly the information I was looking for. But how do you suggest I make the snow cliffs with fake floors? It kinda doesn't work:

NKiwC.png


oo9N7.png


TiDNF.png


FOF on the left, fake floor on the right.
 
Go and check out how Midnight Freeze did it, since all the snow blocks there are made using fake floors.

...or if you don't want to check it, I could just say the "edge"s of the fake floor blocks are placed 1 fracunit away from the actual platform edge, the fake floor "edge"s being in fact lower unpegged middle-textures.
 
Actually I had thought of that, but I thought that adding twice as many sectors would be just as slow as a bunch of FOFs. But you think it'll have less overhead? I'll give it a shot, see how the speed is.

EDIT: I'm actually gonna try Torgo's idea first, it'll take less time and there would be less to have to undo if I did the fake floors first.

EDIT2: Well apparently there is no flag to just render the ceiling. Well then.
 
Last edited:
Actually, Midnight Freeze doesn't even use mid textures. Fake floors are treated by the renderer as being normal floors, so the edge of the fake floor just has a lower texture as if it was any other edge. For putting snow on top of FOFs you obviously need to use FOFs, but for any other situation you should use fake floors, because not only do they run faster, there are less renderer errors when you overuse them.
 
BTW, I'd recommend hitting F4 (which is the shortcut for the Error Checker in Doom Builder 2, and probably Doom Builder 1) and checking for any errors in your map (well, aside from missing/unknown textures).

I have a nagging feeling you'll bump into a few, but I'm at work, so I can't check myself.
 
Actually, Midnight Freeze doesn't even use mid textures. Fake floors are treated by the renderer as being normal floors, so the edge of the fake floor just has a lower texture as if it was any other edge. For putting snow on top of FOFs you obviously need to use FOFs, but for any other situation you should use fake floors, because not only do they run faster, there are less renderer errors when you overuse them.

...and that's what happens when I rely on my memory instead of double-checking it was actually correct first. x_x
 
I check for errors every 5 saves or so, but I was ignoring the trees until now. Fixed the trees, no errors. I think it's just too big :-/

EDIT: Also, I came up with a script that clips sprites more than a distance I'm still working on away... :-) Brings up the framerate a ton.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top