Normal Maps - Questions and Problems

+
Normal Maps - Questions and Problems

Has anyone been modifying normal maps on any textures at all? If so, and you're using the Nvidia plugin in Photoshop, I would really appreciate if you could walkthrough how you're doing it, in particular what settings you're using the generate the normal map for the changed area.


And some other questions/issues. These apply mainly to the DLC armour such as Wolven, but I've seen it elsewhere too.
Scenario:
- Export the w2mesh and the n01 files from the armour to fbx and image file (DDS, TGA or PNG. It doesn't matter.)
- Import the w2mesh and take it through the cooking process to produce a mod (without actually changing anything)
Result: It works.
- Delete all output files and start again.
- Import the normal file and take it through the cooking process.
Result: It works
- Delete all output files and start again.
- Import the mesh AND the normal file and take it through the cooking process.
Result: Specularity and height information is totally screwed up.

Has ANYONE got this to work by "doing something" to the alpha channel?

Final question: Is anyone using DDS, and if so, what's the format while saving out of Photoshop (again, for RGBA files)? I've been assuming DTS5, the same as TW2, but not sure...
 
The experience that I have with the modkit is that the importer screws up all the texture files that contains an alpha channel, mainly normal files. In case of .dds files, the importer simply screws up all the textures, alpha channel or not. I've worked around this issue by not using the importer at all for the normal files and by copying all the data directly into the .xbm file with the help of a hex editor. I can show you how it's done, though it's a lengthy process.
I've managed to create the following mod: http://www.nexusmods.com/witcher3/mods/597/?
 
Last edited:
The experience that I have with the modkit is that the importer screws up all the texture files that contains an alpha channel, mainly normal files. In case of .dds files, the importer simply screws up all the textures, alpha channel or not. I've worked around this issue by not using the importer at all for the normal files and by copying all the data directly into the .xbm file with the help of a hex editor. I can show you how it's done, though it's a lengthy process.
I've managed to create the following mod: http://www.nexusmods.com/witcher3/mods/597/?
Can you write something more about this process?
 
I'd like to see that too....

I've been working round it on normal maps by filtering out the high/low values from the alpha channel so that it imports without going crazy, and then compensating for it in the specular map, but that's even more work. And I have no solution for other alpha channels, in particular those where it should be used for transparency.

So even if your solution is lengthy, it still sounds good from here.
 
Thanks. It looks lengthy, but also straightforward and very well explained. And faster than doing a lot of tweaking in specular maps.
 
Has anyone been modifying normal maps on any textures at all? If so, and you're using the Nvidia plugin in Photoshop, I would really appreciate if you could walkthrough how you're doing it, in particular what settings you're using the generate the normal map for the changed area.

From what i understand you use Nvidia normal map filter to generate normal maps? If that's the case you are doing it wrong, cause Nvidia normal map filter is a joke.
 
From what i understand you use Nvidia normal map filter to generate normal maps? If that's the case you are doing it wrong, cause Nvidia normal map filter is a joke.

So perhaps you could share with us a better way?

My main issue was the bug with the normal maps, rather than changing them, but more tutorials would definitely prove useful.
 
So perhaps you could share with us a better way?

My main issue was the bug with the normal maps, rather than changing them, but more tutorials would definitely prove useful.

You mean bug with normal maps and TW3 tool? Here i can't help you cause i didn't use this toll. I have it, but people say it doesn't work properly, so i didn't bother.
It takes too much time to make quality mods, assets. So to mess with broken tool isn't an option for me. However i would love to change some things in TW3.

But i have noticed that many people create normal maps not understanding how they work properly. The most popular method is to generate them from diffuse map in crazybump or similar tool. That's the easiest way, but it doesn't work properly, and one still knows very little about normal maps.

This method is very good for beginners, and helps one understand them:

https://www.youtube.com/watch?v=1NTnaPhONOA
 
You mean bug with normal maps and TW3 tool? Here i can't help you cause i didn't use this toll. I have it, but people say it doesn't work properly, so i didn't bother.
It takes too much time to make quality mods, assets. So to mess with broken tool isn't an option for me. However i would love to change some things in TW3.

But i have noticed that many people create normal maps not understanding how they work properly. The most popular method is to generate them from diffuse map in crazybump or similar tool. That's the easiest way, but it doesn't work properly, and one still knows very little about normal maps.

This method is very good for beginners, and helps one understand them:

https://www.youtube.com/watch?v=1NTnaPhONOA

OK, so maybe it's a topic for a different thread, as you're unaware of the issue with the tool and normal maps.
 
I've written a tutorial about the method I've used to get those normal maps back into their .xml files without them being screwed up by the modkit importer.
You can find it here: http://www.nexusmods.com/witcher3/mods/617/?
Hope this helps.

Too bad, it seems my hex editing method has it's limits. Files a resolution larger than 1024x1024 px seems to be rejected by the texture.cache packer when they are tweaked with a hex editor. For the moment this is the best I can do for normalmaps.
 
Too bad, it seems my hex editing method has it's limits. Files a resolution larger than 1024x1024 px seems to be rejected by the texture.cache packer when they are tweaked with a hex editor. For the moment this is the best I can do for normalmaps.

In the xbm files, each dds has a 16 bytes preamble (4 little endian uint32).

The first two uints denote height and width. I don't know what the third does, but it seems to be always set to the double of the dimensions. The fourth is the length of the dds excluding the preamble itself (generally the product of the dimensions).

The way described in your tutorial to copy the dds blocks from the xbm file and back again ignores the extra bytes of the preamble which will either corrupt, overwrite or misplace the dds blocks or preambles (depending on the order they are placed back into the xbm).

I think that could be the the reason for the texture packer to fail.

You should be safe starting to navigate from the first dds to <dds_length> + 16 to reach the next dds.

I haven't tried so far, so I just hope it helps :)
 
In the xbm files, each dds has a 16 bytes preamble (4 little endian uint32).

The first two uints denote height and width. I don't know what the third does, but it seems to be always set to the double of the dimensions. The fourth is the length of the dds excluding the preamble itself (generally the product of the dimensions).

The way described in your tutorial to copy the dds blocks from the xbm file and back again ignores the extra bytes of the preamble which will either corrupt, overwrite or misplace the dds blocks or preambles (depending on the order they are placed back into the xbm).

I think that could be the the reason for the texture packer to fail.

You should be safe starting to navigate from the first dds to <dds_length> + 16 to reach the next dds.

I haven't tried so far, so I just hope it helps :)

Well I'll be damned! I just read your post right now and did a test, this time taking the 16 bytes preamble in account for each .dds stored in the .xbm.
And it works, you 've solved the issue with the texture packer rejecting the .xbm file. I'm very gratefull for your help, you're a lifesaver :)

One of the first things I have on my to do list is updating a tutorial I wrote about hex editing the .xbm files.
(http://www.nexusmods.com/witcher3/mods/617/?)

Is there any way I can put you at the credit list with the tutorial? Do you have profile at "www.nexusmods.com" by chance?
 
Top Bottom