[TUTORIAL] How to make LoG2 Normal Maps

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
odinsballs
Posts: 288
Joined: Thu Dec 20, 2012 4:25 pm
Location: south of heaven

Re: [TUTORIAL] How to make LoG2 Normal Maps

Post by odinsballs »

why not try the free demo version of crazybump, it gets all different map types generated off of any format in one go, its super simple to use and delivers very profesional looking endresults 8-)
User avatar
THOM
Posts: 1280
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: [TUTORIAL] How to make LoG2 Normal Maps

Post by THOM »

In preparing my things for the ORRR3 Project: Is there a way to shrink normal maps?

I converted some and the size seems to be doubled.. :?:

In egsample I'm trying to use Lekis Ghost Textures. I have a dow_ghost_woman_dif (683 KB) and a dow_ghost_woman_normal (1366 KB). I don't understand why the last is more than twice as big as the first and I didn't found a way to shrink it. I am using Gimp and the DDS addOn with BC3/DXT5 Compression and minimaps enabled.

Anys ideas?
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: [TUTORIAL] How to make LoG2 Normal Maps

Post by minmay »

Generally scaling the texture down like you normally would and then renormalizing it is good enough. In GIMP just set the normal map filter to "Normalize only" for RGB normal maps, I don't know of a way to do it with green-alpha normal maps other than converting them to RGB and back...
Note that the dds plugin for GIMP won't renormalize its generated mipmaps automatically (because it has no way of knowing the texture is a normal map) so you have to do it yourself for the best results (export an uncompressed version of your RGB normal map with "generated mipmaps", then open it, renormalize every layer, convert every layer to green/alpha, and export the final version with "use existing mipmaps"). Alternatively you could use the "Nearest" mipmap filter, which should only choose existing color combinations and therefore stay normal, but that will probably look worse. Really wish I could get that NVIDIA Photoshop plugin to work with GIMP which would do all this automatically...
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
THOM
Posts: 1280
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: [TUTORIAL] How to make LoG2 Normal Maps

Post by THOM »

Thanks minmay - sadly I am not able to understand, what you mean. What is renormalizing? Also I have no idea how to "export the final version with "use existing mipmaps" ".
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: [TUTORIAL] How to make LoG2 Normal Maps

Post by minmay »

THOM wrote:Thanks minmay - sadly I am not able to understand, what you mean. What is renormalizing?
A normal map has to be normal to work properly; the x and y vectors must add up to 1. The "Normalize only" option of GIMP's normal map filter will normalize an RGB normal map.
THOM wrote:Also I have no idea how to "export the final version with "use existing mipmaps" ".
It's an option in the dds export menu (provided your image has mipmap layers already).
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
THOM
Posts: 1280
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: [TUTORIAL] How to make LoG2 Normal Maps

Post by THOM »

minmay wrote:
THOM wrote:Thanks minmay - sadly I am not able to understand, what you mean. What is renormalizing?
A normal map has to be normal to work properly; the x and y vectors must add up to 1. The "Normalize only" option of GIMP's normal map filter will normalize an RGB normal map.
Mybe it normalizes the grafic - I cannot see any changes in the file-dimension after saving. Or I am doing something wrong.
I've tried to normalize the grafic as it was and I've tried to normalize every colour-layer after decomposing it. No change.

minmay wrote:
THOM wrote:Also I have no idea how to "export the final version with "use existing mipmaps" ".
It's an option in the dds export menu (provided your image has mipmap layers already).
Not for me. If I try to save a dds with existing mipmaps I get this message: "DDS: It appears your image may be a volume map, but not all layers are the same size, thus a volume map cannot be written."
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: [TUTORIAL] How to make LoG2 Normal Maps

Post by minmay »

THOM wrote:Mybe it normalizes the grafic - I cannot see any changes in the file-dimension after saving. Or I am doing something wrong.
I've tried to normalize the grafic as it was and I've tried to normalize every colour-layer after decomposing it. No change.
...File dimensions? What are you talking about? In a normal map, pixel values are used to store the coordinates of a surface normal. If the result isn't normal, you get unrealistic lighting. The normalize only filter makes sure every pixel is normal in an RGB tangent-space normal map; you run it on the full RGB layer, not each channel (and sadly I don't know of a way to run it on a green-alpha map, you'll have to convert it to an RGB map and back). Since the filter only operates on one layer you'd have to run it for every layer in an image with mipmaps.
THOM wrote:Not for me. If I try to save a dds with existing mipmaps I get this message: "DDS: It appears your image may be a volume map, but not all layers are the same size, thus a volume map cannot be written."
Then your image doesn't have existing mipmaps layers. Under "Mipmaps", you should see the options "No mipmaps", "Generate mipmaps", and "Use existing mipmaps". If the third one is greyed out it's because your image doesn't have mipmap layers that the plugin can recognize; import a dds with mipmaps and look at the layers to see how the plugin sets things up.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
THOM
Posts: 1280
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: [TUTORIAL] How to make LoG2 Normal Maps

Post by THOM »

Sorry, mimay, "file dimensions" was the wrong word. I meant "file size". Regardless what I try, my normal map is twice as big as the other texture-files.

Sadly you explanations are mainly chinese for me. On my opinion all my dds-files are in RGB-mode and I do not know, what "export an uncompressed version of your RGB normal map" could mean then. I have decomposed and normalized and recomposed it (thought that could be menat) - no effect.

And as we will see - there seem to be differences in our Gimp appearences:

In the saving menue I don't see the options "No mipmaps" and "Use existing mipmaps". Only "Generate mipmaps" can be checked or unchecked. And we are talking of original files of LoG1/Log2. I am using Gimp 2.8.10 and AKAIK the last version of the dds-addOn.

Strange.
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: [TUTORIAL] How to make LoG2 Normal Maps

Post by minmay »

THOM wrote:Sorry, mimay, "file dimensions" was the wrong word. I meant "file size". Regardless what I try, my normal map is twice as big as the other texture-files.
5 seconds with Google would have told you why this is: DXT5 or DXT3 compressed file will always be twice the size of a DXT1 file of the same dimensions.
THOM wrote:Sadly you explanations are mainly chinese for me. On my opinion all my dds-files are in RGB-mode
"RGB normal map" here is shorthand for "image with the red, green, and blue channels of each pixel corresponding to the tangent-space x, y, and z coordinates of a surface normal, respectively."
THOM wrote:I do not know, what "export an uncompressed version of your RGB normal map" could mean then. I have decomposed and normalized and recomposed it (thought that could be menat) - no effect.
Export the image using the DDS plugin, select "None" under compression, generate mipmaps. You export it uncompressed so that it doesn't degrade the image. Then you open the image again so that you have the mipmaps.
THOM wrote:In the saving menue I don't see the options "No mipmaps" and "Use existing mipmaps". Only "Generate mipmaps" can be checked or unchecked. And we are talking of original files of LoG1/Log2. I am using Gimp 2.8.10 and AKAIK the last version of the dds-addOn.
Well it's not version 2.0.9-2 because that one lets me use existing mipmaps.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
THOM
Posts: 1280
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: [TUTORIAL] How to make LoG2 Normal Maps

Post by THOM »

Well, my only question is, how to shrink the size of my normal map.

If it's bound to the compression-format I don't understand the discussion here. So is it right, that the filesize is always the same, depending on the compression format? A thing I would never consider of (and therefore never had googled for).

Problem in my case: If I choose another compression-option, the result is weired. For egsample like this:

https://www.dropbox.com/s/ugkuyegxl6b3k ... s.jpg?dl=0

Left DXT5 / right DXT1

The DXT1 file is smaller, but obviously unuseable.

If there is no way to bring the quality of DXT5 compression together with the size of DXT1 compression, I have a problem for my ORRR3 project...
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
Post Reply