Forums
Games
Cyberpunk 2077 Thronebreaker: The Witcher Tales GWENT®: The Witcher Card Game The Witcher 3: Wild Hunt The Witcher 2: Assassins of Kings The Witcher The Witcher Adventure Game
Jobs Store Support Log in Register
Forums - CD PROJEKT RED
Menu
Forums - CD PROJEKT RED
  • Hot Topics
  • NEWS
  • GENERAL
    THE WITCHER ADVENTURE GAME
  • STORY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 THE WITCHER TALES
  • GAMEPLAY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 MODS (THE WITCHER) MODS (THE WITCHER 2) MODS (THE WITCHER 3)
  • TECHNICAL
    THE WITCHER THE WITCHER 2 (PC) THE WITCHER 2 (XBOX) THE WITCHER 3 (PC) THE WITCHER 3 (PLAYSTATION) THE WITCHER 3 (XBOX) THE WITCHER 3 (SWITCH)
  • COMMUNITY
    FAN ART (THE WITCHER UNIVERSE) FAN ART (CYBERPUNK UNIVERSE) OTHER GAMES
  • RED Tracker
    The Witcher Series Cyberpunk GWENT
THE WITCHER
THE WITCHER 2
THE WITCHER 3
MODS (THE WITCHER)
MODS (THE WITCHER 2)
MODS (THE WITCHER 3)
Menu

Register

Normal Maps - Questions and Problems

+
D

dragonbird

Ex-moderator
#1
Sep 2, 2015
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...
 
superdemus

superdemus

Senior user
#2
Sep 4, 2015
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: Sep 4, 2015
HalkHoganPL

HalkHoganPL

Senior user
#3
Sep 4, 2015
superdemus said:
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/?
Click to expand...
Can you write something more about this process?
 
D

dragonbird

Ex-moderator
#4
Sep 5, 2015
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.
 
superdemus

superdemus

Senior user
#5
Sep 5, 2015
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.
 
  • RED Point
Reactions: HalkHoganPL and dragonbird
D

dragonbird

Ex-moderator
#6
Sep 5, 2015
Thanks. It looks lengthy, but also straightforward and very well explained. And faster than doing a lot of tweaking in specular maps.
 
Ancient76

Ancient76

Senior user
#7
Sep 5, 2015
Dragonbird said:
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.
Click to expand...
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.
 
D

dragonbird

Ex-moderator
#8
Sep 5, 2015
Ancient76 said:
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.
Click to expand...
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.
 
Ancient76

Ancient76

Senior user
#9
Sep 5, 2015
Dragonbird said:
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.
Click to expand...
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
 
D

dragonbird

Ex-moderator
#10
Sep 5, 2015
Ancient76 said:
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
Click to expand...
OK, so maybe it's a topic for a different thread, as you're unaware of the issue with the tool and normal maps.
 
superdemus

superdemus

Senior user
#11
Sep 7, 2015
superdemus said:
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.
Click to expand...
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.
 
R

runaway_cd

Rookie
#12
Sep 8, 2015
superdemus said:
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.
Click to expand...
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 :)
 
  • RED Point
Reactions: superdemus
superdemus

superdemus

Senior user
#13
Sep 15, 2015
runaway_cd said:
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 :)
Click to expand...
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?
 
Share:
Facebook Twitter Reddit Pinterest Tumblr WhatsApp Email Link
  • English
    English Polski (Polish) Deutsch (German) Русский (Russian) Français (French) Português brasileiro (Brazilian Portuguese) Italiano (Italian) 日本語 (Japanese) Español (Spanish)

STAY CONNECTED

Facebook Twitter YouTube
CDProjekt RED Mature 17+
  • Contact administration
  • User agreement
  • Privacy policy
  • Cookie policy
  • Press Center
© 2018 CD PROJEKT S.A. ALL RIGHTS RESERVED

The Witcher® is a trademark of CD PROJEKT S. A. The Witcher game © CD PROJEKT S. A. All rights reserved. The Witcher game is based on the prose of Andrzej Sapkowski. All other copyrights and trademarks are the property of their respective owners.

Forum software by XenForo® © 2010-2020 XenForo Ltd.