Incorrect texture mapping

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Incorrect texture mapping

Post by Nevander »

I'm working on modifying the DHTP to suit my needs and change some textures that I don't like, and I've run into a problem I can't seem to resolve. For whatever reason, GZDoom is mapping the wrong texture to a particular surface, in this case, it is mapping the STEP# textures for walls to the STEP1 or STEP2 textures for flats. They both have the same name, so they can't co-exist in the same folder. Right now, I have the hires folder and then flats and textures. Not sure what I am doing wrong, since GZDoom should see which folder the texture belongs in and map it correctly. The original folder structure for the DHTP is sort of a mess, because it has subfolders that GZDoom completely ignores or mis-loads. Some textures are loaded incorrectly if using it with Plutonia for example. I am in the process of fixing this by having multiple packs for each game, and a base pack that each IWAD shares.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48355
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Incorrect texture mapping

Post by Graf Zahl »

Whatever is in TEXTURES will always override what is in FLATS.
I'm afraid, but you'll probably need to handle these two names with a TEXTURES lump instead of relying on hires replacement functionality to get it right.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Incorrect texture mapping

Post by Nevander »

That's sort of what I was thinking I would need to do. I see on the wiki that I can use "remap texturename hireslumpname" to replace one. This is what I need to use, but I'm not sure how the original textures are organized. Seeing as how there are two STEP1 and STEP2 textures, they both can't be "remap STEP1" and "remap STEP2," they would need to be in something like "remap FLATS\STEP1 hireslumpname" correct? I've opened the Doom II IWAD in SLADE and noticed it follows a different texture system, whereas Doom Builder II will show each texture as one with the names used above and that the DHTP uses. Bit confused on this on how the textures work internally. Would I also need to specify the path, such as "remap texturename foldername\subfoldername\hireslumpname"? Lastly, does this mean I don't need the hires folder and could technically just throw them all into one folder? Since for Doom II these appear to be the only two name conflicts. I know I am noob. :(
Gez
 
 
Posts: 17686
Joined: Fri Jul 06, 2007 3:22 pm

Re: Incorrect texture mapping

Post by Gez »

Use full fledged TEXTURES definition.

walltexture STEP1 { ... }
flat STEP1 { ... }

SLADE3's texture editor should help you get the scaling factors right, because it shows "scaled size" for them.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48355
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Incorrect texture mapping

Post by Graf Zahl »

REMAP is deprecated for good reasons. Do not use if you want reliable results in unclear situations. That keyword is merely a leftover from ZDoomGL and kept for compatibility purposes.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Incorrect texture mapping

Post by Nevander »

Gez wrote:Use full fledged TEXTURES definition.

walltexture STEP1 { ... }
flat STEP1 { ... }

SLADE3's texture editor should help you get the scaling factors right, because it shows "scaled size" for them.
This is just confusing me more. Not sure why I need sizes when all I want to do is to tell the game engine to use this texture instead of the default. I looked over TEXTURES more, but my head is spinning. I've never dealt with texture stuff before. What do I need inside the brackets exactly to only remap a texture? I have something now but I'm 100% sure it's wrong. :?

SLADE3 wouldn't show flats in the texture editor for me.
Graf Zahl wrote:REMAP is deprecated for good reasons. Do not use if you want reliable results in unclear situations. That keyword is merely a leftover from ZDoomGL and kept for compatibility purposes.
It actually made the most sense to me, but I couldn't even get that to work.
Gez
 
 
Posts: 17686
Joined: Fri Jul 06, 2007 3:22 pm

Re: Incorrect texture mapping

Post by Gez »

Nevander wrote:This is just confusing me more. Not sure why I need sizes when all I want to do is to tell the game engine to use this texture instead of the default.
You're trying to use a high-res pack, are you not? The textures in it have to be scaled down, otherwise they'll be huge textures instead of high-res textures.
Nevander wrote:SLADE3 wouldn't show flats in the texture editor for me.
Give unique names to the STEP1 flat and to the STEP1 wall texture (for example, F_STEP1 and W_STEP1).
Create a TEXTURES lump. Open SLADE's texture editor, so that this TEXTURES lump can now be edited. Create a STEP1 texture, using the "New from patch" button below the list of textures. Choose the F_STEP1 flat as the patch. In the panel below the texture preview, you have a "Type" drop-down. Set it to "Flat" instead of "Texture". Adjust the two "Scale" fields so that the "scaled size" displays as 64x64.

Now do that again. Create another STEP1 texture, this time using W_STEP1. Change its type to "WallTexture". Adjust its scaled size to display as 32x16.

Save the textures, close the texture editor, save the wad.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48355
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Incorrect texture mapping

Post by Graf Zahl »

Nevander wrote:
Graf Zahl wrote:REMAP is deprecated for good reasons. Do not use if you want reliable results in unclear situations. That keyword is merely a leftover from ZDoomGL and kept for compatibility purposes.
It actually made the most sense to me, but I couldn't even get that to work.
Well, of course not. The limitations of this command in the context of the current texture manager were the reason for deprecation. It's simply not usable for a fringe case like this one where you have a name clash and need to be more explicit with your definitions.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Incorrect texture mapping

Post by Nevander »

Gez wrote:Give unique names to the STEP1 flat and to the STEP1 wall texture (for example, F_STEP1 and W_STEP1).
Create a TEXTURES lump. Open SLADE's texture editor, so that this TEXTURES lump can now be edited. Create a STEP1 texture, using the "New from patch" button below the list of textures. Choose the F_STEP1 flat as the patch. In the panel below the texture preview, you have a "Type" drop-down. Set it to "Flat" instead of "Texture". Adjust the two "Scale" fields so that the "scaled size" displays as 64x64.

Now do that again. Create another STEP1 texture, this time using W_STEP1. Change its type to "WallTexture". Adjust its scaled size to display as 32x16.

Save the textures, close the texture editor, save the wad.
Thanks, this is pretty detailed and makes sense, but I have a problem. When I launch GZDoom it's telling me Unknown patch 'F_STEP1' in texture 'STEP1' for each of them (change F_STEP1 to F_STEP2, W_STEP1, and W_STEP2). They show up black in-game. They aren't properly scaled. Can you look at the WAD and tell me what is wrong?

Hah! I fixed it myself without looking at anything! I had to change the size back to the original size, and then change the scale factor to x4 for each axis, thus making the scaled size correct. Gez didn't mention that, or maybe his way works but I missed something.

Here is the right version that works correctly (as far as I know). It correctly maps STEP1 and STEP2 for both walls and flats from the current DHTP. You can delete those textures out of the DHTP now and simply load this alongside it for the STEP textures to work properly. That was driving me nuts.

Are there any more same texture name conflicts in any Doom IWAD? I know there are different textures with the same name, but they are different from IWAD to IWAD, so they can be easily replaced unlike these STEP textures.
dhtp-stepfix.wad
You do not have the required permissions to view the files attached to this post.
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Incorrect texture mapping

Post by Enjay »

Good to see this resolved. That clash of names has been quite annoying to me in the past but, seeing as how it usually occurred with something I was working on rather than a general replacement issue, I just circumvented the issue and made my own textures/flats with unique names.

Return to “Editing (Archive)”