["Fixed"] Scaled textures aligning

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Scaled textures aligning

Postby LilWhiteMouse » Sun Dec 28, 2003 10:26 pm

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
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Enjay » Mon Dec 29, 2003 4:47 am

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Postby LilWhiteMouse » Mon Dec 29, 2003 5:17 am

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
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Graf Zahl » Mon Dec 29, 2003 5:23 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby HotWax » Mon Dec 29, 2003 11:38 am

Graf Zahl wrote:Fix the offset and the problem is gone.


And any map that uses the incorrect behavior is broken.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Hirogen2 » Mon Dec 29, 2003 3:08 pm

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
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby Graf Zahl » Mon Dec 29, 2003 3:17 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby HotWax » Mon Dec 29, 2003 3:29 pm

You're right, because the key issue would break no maps. :P
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby LilWhiteMouse » Mon Dec 29, 2003 4:31 pm

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
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Re: Scaled textures aligning

Postby randi » Fri Jan 02, 2004 9:03 pm

LilWhiteMouse wrote:Is this right?

Yes. Here is my comment from that part of the code:
Code: Select allExpand view
   // 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
randi
Site Admin
 
Joined: 09 Jul 2003

Re: Scaled textures aligning

Postby LilWhiteMouse » Fri Jan 02, 2004 9:06 pm

randy wrote:Yes.

Ok, thanks.
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Chris » Sun Jan 04, 2004 10:16 am

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
Chris
 
Joined: 17 Jul 2003

Postby Graf Zahl » Sun Jan 04, 2004 5:42 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby LilWhiteMouse » Sun Jan 04, 2004 7:28 pm

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
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Xaser » Sun Jan 04, 2004 8:38 pm

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
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Next

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest