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

Having a problem with middle textures

Recommended Posts

Actually, I have been working on my project yesterday, and after that, I started to playtest it. As I was playing through E1M6, a strange thing in the "prison cells" caught my attention. Actually, I had made five cell windows, each having MIDBRN1 middle texture. As long as the windows are 56 or 64 units high, but the texture is 112, I offseted it.
The major problem that the texture doesn't "sink" into the floor and the ceiling but standing in the sector, it "continues into the flat". Quite annoyed me. I've played Whispers of Satan before, and this problem didn't occur in MAP28, where I had seen MIDGRATE1(?) on the windows of the starting room, but they didn't reproduce this strange visual bug. What would I do?...

Share this post


Link to post

This problem only occurs if the sectors on both sides of the (grate)texture are identical.
If you increase the height of one of the two sectors by 1 pixel the problem will be solved.

Share this post


Link to post
t.v. said:

This problem only occurs if the sectors on both sides of the (grate)texture are identical.
If you increase the height of one of the two sectors by 1 pixel the problem will be solved.

You can also change the light level.

Share this post


Link to post

I believe if you split the sector you have the bars into two sectors along the bars texture this will solve your problem. Not sure if this works in all ports.

Share this post


Link to post
hobomaster22 said:

I believe if you split the sector you have the bars into two sectors along the bars texture this will solve your problem. Not sure if this works in all ports.


No, because two identical sectors, from what I understand, are "merged" into one during runtime. The most logical thing to do is make sure each side is a different sector, and change the light level of one of them so it's off by one. In software ports, the difference can be unnoticeable since light levels are rounded to the nearest multiple of 16 (Vanilla/Boom) or 8 (ZDoom). You just have to watch to make sure that your "off by 1" light level doesn't round it to another visible light level (instead of 129, you might try 127).

Share this post


Link to post

They're not actually the nearest multiple, exactly. They're always rounded down.

128 and 129 are the same, but 159 and 160 are not.

Thus, make the sector on one side of your midtexture be 1 unit brighter than the other side, and it'll eliminate the texture bleeding.

Share this post


Link to post

Eh, well, guess I could have worded it better.

By the way, one neat trick I noticed, is if you have both sides the same (but different sectors), and you make one of the sectors have a strobing light effect, then the middle texture will go into a cycle of clipping at the floor/ceiling and bleeding into the floor/ceiling.

Not sure which engine I tested it in (or what source ports it even works in), but it was a cool effect. Not really sure how it could be useful though. :)

Share this post


Link to post
EarthQuake said:

the nearest multiple of 16 (Vanilla/Boom) or 8 (Eternity) or 1 (ZDoom).

If I'm not mistaken.

Share this post


Link to post

Yeah. ZDoom doesn't use the colormap directly anymore but compute it on the fly, so a difference of one light level can be enough to change the display, IIRC.

Enjay made this. It's a big corridor composed of sectors with 1-unit increments in their light levels, so you can compare how they look in various ports.

Share this post


Link to post

I've used transfer heights (type 242) to fix this whenever I have a tall mid-texture that bleeds into the ceiling or floor (as pointed out to me sometime last year on the forum - in the 32in23-5 thread from memory). You don't have to change either sector, just re-apply the same sector style to one or both of the sectors involved.

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
×