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.

Incorrect texture mapping

Postby Nevander » Sun Jan 04, 2015 6:37 pm

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.
Nevander
Self-Banned User
 
Joined: 06 Jan 2014

Re: Incorrect texture mapping

Postby Graf Zahl » Mon Jan 05, 2015 4:45 am

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

Re: Incorrect texture mapping

Postby Nevander » Mon Jan 05, 2015 9:10 pm

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. :(
Nevander
Self-Banned User
 
Joined: 06 Jan 2014

Re: Incorrect texture mapping

Postby Gez » Tue Jan 06, 2015 3:53 am

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.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Incorrect texture mapping

Postby Graf Zahl » Tue Jan 06, 2015 5:35 am

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

Re: Incorrect texture mapping

Postby Nevander » Tue Jan 06, 2015 10:34 am

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.
Nevander
Self-Banned User
 
Joined: 06 Jan 2014

Re: Incorrect texture mapping

Postby Gez » Tue Jan 06, 2015 2:45 pm

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.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Incorrect texture mapping

Postby Graf Zahl » Tue Jan 06, 2015 3:47 pm

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

Re: Incorrect texture mapping

Postby Nevander » Tue Jan 06, 2015 11:00 pm

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.
Nevander
Self-Banned User
 
Joined: 06 Jan 2014

Re: Incorrect texture mapping

Postby Enjay » Wed Jan 07, 2015 12:09 pm

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.
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


Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 6 guests