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

Sideref mid texture "bleeds" through floor

Question

Hello everyone,

I've been working on this map for a while and I can't for the life of me understand why this texture is bleeding through the floor:

 

Screenshot_Doom_20201030_013618.png.2f010be1d87bb8ce0662b3a994a2aebf.png

 

Normally, I would assume that the engine is trying to draw the full 128 height of the texture (the window is 96 units high) and that would be it, I'd need to manually shorten it, but there is this one instance in the same map, with the same texture, in the same context, that DOES cut the texture where the floor starts:

 

Screenshot_Doom_20201030_120936.png.bab9ef2692cc2e7760bf533ea6706841.png

 

I figured that maybe the "cut" happened at 64 units but nah, I increased the height of that sector to 96 and it still cuts the texture at the floor.

Basically, is this "correct" texture the exception? Should I just manually cut them to the desired height? Or is there some arcane reason as to why the second grate is rendered properly (it was the first one I made, if that's of any help).

 

For the record, the screenshot is taken in zdoom, the map is made in Doom Builder 2.

Thanks.

Share this post


Link to post

8 answers to this question

Recommended Posts

  • 4

There needs to be a difference between the sectors on both sides of the midtexture for it to clip. You can either set up a brightness level difference of 1 unit between the sectors, or alternatively to use a different flat for each side. In software renderer you don't see the difference unless the two brightness levels are using a different part of the colormap. If you set up brightness levels of 128 and 127 for the sectors, they will appear to have different brightness. What you can do instead is to lower/raise the light level of one side by 1 unit, and the other side by 2 units. So for example 127 and 126, or 129 and 130. There should then be no discernible difference in game.

Edited by Aurelius

Share this post


Link to post
  • 0
32 minutes ago, Aurelius said:

There needs to be a difference between the sectors on both sides of the midtexture for it to clip. You can either set up a brightness level difference of 1 unit between the sectors, or alternatively to use a different flat for each side. In software renderer you don't see the difference unless the two brightness levels are using a different part of the colormap. If you set up brightness levels of 128 and 127 for the sectors, they will appear different brightness. Your best bet is to lower/raise the light level of one side by 1 unit, and the other side by 2 units. So for example 127 and 126, or 129 and 130. There should then be no discernible difference in game.

 

Goodness gracious, I constantly kept comparing the 2 "grates" trying to find what was different and that's literally the only thing I hadn't noticed.

Many thanks!

Share this post


Link to post
  • 0

My understanding, which may be faulty, but seems to be backed by anecdote at least, is that in software, the only discernible difference is every 16, such that actually 112-127 are all identical, which is why 127 and 128 would be different, but then 128-143 would all be the same. In other words, just make sure you go up 1 rather than down when using the lighting trick, assuming your sectors start at standard multiples of 16. 

 

Share this post


Link to post
  • 0
2 minutes ago, HAK3180 said:

My understanding, which may be faulty, but seems to be backed by anecdote at least, is that in software, the only discernible difference is every 16, such that actually 112-127 are all identical, which is why 127 and 128 would be different, but then 128-143 would all be the same. In other words, just make sure you go up 1 rather than down when using the lighting trick, assuming your sectors start at standard multiples of 16. 

This is true, and it is better to go up by one than down to keep with the surrounding light level. Interestingly though, the Doom colormap does contain brightness level in increments of 8, so I assume only every second row is actually being used. Although some source port software renderers (like Eternity if I'm not mistaken) do render brightness difference in increments of 8 instead of 16.

Share this post


Link to post
  • 0

Light levels are the same on each side. So if you change the light level from 128 to 127 you will not get this problem.

Share this post


Link to post
  • 0
9 hours ago, Aurelius said:

This is true, and it is better to go up by one than down to keep with the surrounding light level. Interestingly though, the Doom colormap does contain brightness level in increments of 8, so I assume only every second row is actually being used. Although some source port software renderers (like Eternity if I'm not mistaken) do render brightness difference in increments of 8 instead of 16.

 

The ZDoom family will render light levels in increments of 8.

 

10 hours ago, Aurelius said:

There needs to be a difference between the sectors on both sides of the midtexture for it to clip. You can either set up a brightness level difference of 1 unit between the sectors, or alternatively to use a different flat for each side. In software renderer you don't see the difference unless the two brightness levels are using a different part of the colormap. If you set up brightness levels of 128 and 127 for the sectors, they will appear to have different brightness. What you can do instead is to lower/raise the light level of one side by 1 unit, and the other side by 2 units. So for example 127 and 126, or 129 and 130. There should then be no discernible difference in game.

9 hours ago, HAK3180 said:

My understanding, which may be faulty, but seems to be backed by anecdote at least, is that in software, the only discernible difference is every 16, such that actually 112-127 are all identical, which is why 127 and 128 would be different, but then 128-143 would all be the same. In other words, just make sure you go up 1 rather than down when using the lighting trick, assuming your sectors start at standard multiples of 16. 

 

 

According to Essel, you run the risk of 127 being treated as the next light level down, so she recommends going up by 1 (e.g., from 128 to 129) on one side of the grate.

 

 

EDIT: This happens to be exactly what HAK wrote, so my apologies to HAK for misreading his statement.

Edited by Pegleg : Reading is fundamental.

Share this post


Link to post
  • 0
1 hour ago, Pegleg said:

According to Essel, you run the risk of 127 being treated as the next light level down, so she recommends going up by 1 (e.g., from 128 to 129) on one side of the grate.

 

Is this somehow different from what I wrote?

Share this post


Link to post
  • 0
3 hours ago, HAK3180 said:

 

Is this somehow different from what I wrote?

 

No, that is not different than what you wrote, which I misread.

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
×