["Fixed"] Scaled textures aligning

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Scaled textures aligning

Post by LilWhiteMouse »

There's been various discussions about aligning scaled textures, but I don't recall this behaviour as normal:

I have a 128x32 texture, scaled to 64x16 using an X-scale of 16, and a Y-scale of 16. My sectors floor height is 0, and it's ceiling 384. I have three consectutive linedefs, totaling 64 units long. The first two segments are 24 units long, and the third 16. I want to align my texture so it's 256 units from the ceiling, and it's x-offsets set appropriatly so it transitions from linedef to linedef smoothly. To align it horizontally, I doubled the normal offsets to compensate for the scaling, which is what I believe to be the correct behaviour(?).

Now the inconsistancy. To align it at the verticle height I want, I do *not* double the offset to -512. Instead, I have to use the unscaled offset of -256 to have it 128 units off the ground. Is this right?
User avatar
Enjay
 
 
Posts: 27144
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Sounds like you are putting this texture on a 2S line - right? If so, there does seem to be an inconsistency. I just tested by scaling one of the normal doom2 textures and putting it on a 2S line and a 1S line that was right beside the 2S line. I offset both by -16. The one on the 2S line lowered by 16 world units (at least thats how it looked) and the one on the 1S line lowered by 8 world units.

As for whether this needs to be changed, or even if it can be (I understand textures on 2S lines are handled quite differently) or if it is just something people need to be aware of, I dunno, but it is inconsistent.

Just as a BTW, do you know that it is now possible to set up textures to always be scaled using world units rather than image pixels? That way things get scaled according to effective texture size rather than graphic size. I personally prefer that, but it does mean you cannot align things by fractions of world units.
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Post by LilWhiteMouse »

Enjay wrote:Just as a BTW, do you know that it is now possible to set up textures to always be scaled using world units rather than image pixels?
Yes, but I don't believe my copy of XWE supports it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49241
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Enjay wrote: As for whether this needs to be changed, or even if it can be (I understand textures on 2S lines are handled quite differently) or if it is just something people need to be aware of, I dunno, but it is inconsistent.
Why should this not be fixable? To me this looks like a minor oversight in the offset calculation. Fix the offset and the problem is gone.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Graf Zahl wrote:Fix the offset and the problem is gone.
And any map that uses the incorrect behavior is broken.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

LilWhiteMouse wrote:Yes, but I don't believe my copy of XWE supports it.
Randy said something about switching bit 0x8000 in the second free field... and.. IIRC XWE doesnot have such a field.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49241
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

HotWax wrote:
Graf Zahl wrote:Fix the offset and the problem is gone.
And any map that uses the incorrect behavior is broken.

The current behavior is clearly a bug so it should be fixed. You cannot keep all bugs in the game for backward compatibility. This isn't comparable to the key issue. ;)
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

You're right, because the key issue would break no maps. :P
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Post by LilWhiteMouse »

All I want is an official decision. I don't want to continue my map until I know I should go one way or the other, so I won't have to redo anything.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: Scaled textures aligning

Post by randi »

LilWhiteMouse wrote:Is this right?
Yes. Here is my comment from that part of the code:

Code: Select all

	// rowoffset is added before the MulScale3 so that the masked texture will
	// still be positioned in world units rather than texels. This is different
	// from the solid texture positioning in R_NewWall().
I suppose this isn't so necessary now that you can set a texture to position itself in world units instead of texels for all walls. I would consider changing this if no one can provide examples of existing maps that make use of the positioning as it is now.
Last edited by randi on Fri Jan 02, 2004 9:07 pm, edited 1 time in total.
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Re: Scaled textures aligning

Post by LilWhiteMouse »

randy wrote:Yes.
Ok, thanks.
User avatar
Chris
Posts: 2978
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

I suppose this isn't so necessary now that you can set a texture to position itself in world units instead of texels for all walls. I would consider changing this if no one can provide examples of existing maps that make use of the positioning as it is now.
Since no one's replied to this yet, I think this should absolutely be done. While I'm not the biggest fan of texel-unit offseting, you should most definitely keep the behavior uniform. Think about this: a window with an upper and lower texture using a vinewall, with a scale of two, and a middle texture of just a vine, also with a scale of two. If the middle texture behaves differently than everywhere else, it'll be impossible to line up properly unless you enable world unit offsetting. I can't think of any examples that exploit this bug (and even if there is, you could provide a compatibility option).

Just my 2c.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49241
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Chris wrote:
I suppose this isn't so necessary now that you can set a texture to position itself in world units instead of texels for all walls. I would consider changing this if no one can provide examples of existing maps that make use of the positioning as it is now.
Since no one's replied to this yet, I think this should absolutely be done. While I'm not the biggest fan of texel-unit offseting, you should most definitely keep the behavior uniform. Think about this: a window with an upper and lower texture using a vinewall, with a scale of two, and a middle texture of just a vine, also with a scale of two. If the middle texture behaves differently than everywhere else, it'll be impossible to line up properly unless you enable world unit offsetting. I can't think of any examples that exploit this bug (and even if there is, you could provide a compatibility option).

Just my 2c.

I'm in full agreement. And even if there are levels out there that exploit this bug (something I highly doubt. I can't remember ever seeing a level that used scaled textures and I check out everything in the /idgames archives) the negative effects for coming maps are much more severe than the problems it might cause on existing ones. This bug makes texture alignment on affected walls highly tedious if not impossible.
User avatar
LilWhiteMouse
Posts: 2270
Joined: Tue Jul 15, 2003 7:00 pm
Location: Maine, US
Contact:

Post by LilWhiteMouse »

Don't tell me that now I've put all my street signs in place I'm going to have to go back and re-align them all?
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

LilWhiteMouse wrote:Don't tell me that now I've put all my street signs in place I'm going to have to go back and re-align them all?
Okay, I won't tell you that. :P
Post Reply

Return to “Closed Bugs [GZDoom]”