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

Can't align textures sometimes

Recommended Posts

Why sometimes I cane align textures on a window by making it lower and upper unpegged and moving it and sometimes I can't? What's the formula here?

Share this post


Link to post

The formula is:
UPPER UNPEGGED: Top row of the upper texture is at the facing sector's ceiling, as opposed to bottom row at the opposite sector's ceiling.
LOWER UNPEGGED: Bottom row of the middle texture is at the sector's floor (instead of the top row at the ceiling), and the Nth row of the lower textures is at the facing sector's floor (instead of the top row at the opposite sector's floor), where N is the sector height (not the texture height, as is commonly supposed).
Y-offsets are added to the above results.

The problem you're having is that you have a sector that's a different height than the wall texture, your one-sided walls are lower-unpegged, and your two-sided walls would be perfectly aligned if only your one-sided walls weren't lower-unpegged, correct? What you need to to do is make your one-sided walls not lower-unpegged, and instead set the Y-offset to the difference between the sector height and texture height. Use the same Y-offset on your two-sided walls (which are still upper- and lower-unpegged), and everything should be perfect.

Share this post


Link to post

As Foxpup said. It's interesting how from the technical point of view, LOWER UNPEGGED flag works the same way on middle textures of one-sided and two-sided linedefs, while in the map editor it feels very different on each type (for me at least) in a way that I wouldn't naturally guess. But I've already got familiar with the principle well.

Share this post


Link to post
Memfis said:

mmmm that post, see you in 30 years after I figure it out...

I'll try to simplify it:

UPPER UNPEGGED FLAG:

  • Affects only upper texture.
  • Makes the upper texture be rendered FROM THE HIGHER CEILING DOWN.
  • When the higher ceiling will move, the texture will move too. Otherwise it won't move.
  • Completely useless on 1-sided linedefs.
LOWER UNPEGGED FLAG:
  • Affects only middle and lower texture.

  • MIDDLE TEXTURE:
  • Makes middle texture be rendered FROM THE HIGHER FLOOR UP. (on both 1-sided and 2-sided linedefs)
  • On 1-sided linedefs, it will cause the texture to move with the floor. (instead of moving with the ceiling)
  • On 2-sided linedefs, the texture will move with the "higher" floor. (technically it's the same situation)

  • LOWER TEXTURE:
  • At the same time, the flag makes lower texture be rendered FROM THE FRONT CEILING DOWN! (like upper unpegged, but affecting lower texture, and the front sector is the sector where the lower texture displays, it doesn't necessarily be the higher one)
  • When the higher ceiling will move, the lower texture will move too. Otherwise it won't move.
Hint:
Spoiler

Each 2-sided linedef connects 2 sectors. I assume the sectors have different floor and ceiling heights, that's what I mean by terms like "higher ceiling", "higher floor".
"From the higher ceiling down" means that the texture starts rendering on the "higher" ceiling, and continues rendering in the direction down.
"From the higher floor up" means that the texture starts rendering on the "higher" floor, and continues rendering in the direction up.

I have probably completely failed to simplify it or make it clear. :D
But here you have it, logically on one place, anyway.

Share this post


Link to post

Short answer: sector height - texture height = +/-Y offset. This fixes vertical alignment problems in all common cases. If you've got a 112 high sector and a 128 high texture that's not aligned properly, a Y-offset of either +16 or -16 will fix it, depending on exactly what the problem is. Works every time.

Share this post


Link to post

You might need a in game screenshot and editor screenshot with the linedef properties shown

is your question why you can't align textures with upper and lower unpegging alone? Otherwise I've never had an issue. But honestly, there's a few things in doom where I can understand what's happening just by looking at it, but not able to communicate it in words.

Share this post


Link to post

I've been mapping for awhile and sometimes the pegged/unpegged thing still makes me scratch my head. If you're finding texture alignment to be a pain in the ass, do what I do, which is based on a wonderful suggestion from someone here whose name I can't recall: Just change all the textures in the area that you're trying to align to GSTONE 2. The blood at the bottom of the texture is in such stark contrast to the rest of the image, it'll be easy as pie to align everything. When you're done, just change it back. You can use the shift/click option to make this less tedious.

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
×