John P. on 10/5/2005 at 18:44
(I haven't used the editor yet(!), but according to DXTool which I used to export textures, most textures have about 8 mipmap levels, although it varies of course)
Bukary has asked if I could help with his problem, but I'm not sure I can - I don't think I've seen exactly what he describes and I haven't used the editor.
But I guess I can share a little about how I used to make normal maps when I made my high res textures, and the little I know about them:
The proper way to make a normal map would be to make it from a model, but since I didn't have that, I had to come up with other methods.
So I most of the time first resized the original texture, painted/"photoshopped" new details in, then flattened the image and made a normal map from it using the Nvidia filter(using Photoshop). I have played with the settings depending on how I needed the normal map to look, so I can't give you any exact figures there - you just have to play around with it until you understand how it works.
I then put this new normalmap layer on top of the original normal map, and blended it with the underlying original by choosing a layer style like Soft Light.
I have also made new normal maps from scratch, but I can't really make a tutorial, because I've pretty much painted them by hand and/or used similar "Photoshop" -techniques. I also would like to keep some secrets... ;)
Normal maps are adversely affected by DXT compression; the pixellation is easily seen ingame. This is especially a problem when using the original low res normals as a base, as the pixelation gets enlarged when you enlarge the normalmap.
One technique I have invented to combat some of that, is to edit the Red, Green and Blue channels of the original normal map. The channels are what dictates the height, depth, etc. properties. The channel which is affected the most by compression, is the Red one for some reason. I have blurred and painted/edited each channel to remove the pixelation, and in some cases saved the normal map as a lossless .dds, without compression, for best result(some of my Garrett textures for instance).
But in the cases where I have wanted/needed to save as either DXT1 or DXT3, I have added a little noise to the normalmap's channels, especially the red. The reason is that the noise will prevent the layer from becoming color banded and/or pixellated, kind of like adding noise to a .gif image will do the same. Don't use too much noise though, just enough to "bind" the shades of gray.
Royalties for this 'invention' can be sent to.... ;)
I always work in layers, and save as multilayered .psd files. I only flatten when I'm about to create a normal map using the filter, and when finally saving the finished texture as .dds. I usually also keep normal maps and color maps in the same .psd file, only separating them by having normals on top of the list of layers, and turning them on or off as i work on either.
About DXT1 and DXT3:
They are both .dds compression methods, but you can save .dds files without compression if you want. Naturally the texture will then take up a lot more space. Save it as a 8:8:8 24bit RGB .dds in that case(unless you need an explicit alpha).
DXT1 does not have an explicit alpha channel, whereas DXT3 does. The alpha channel in DXT3 is used to control what parts of the texture are supposed to be transparent ingame.
In Thief: DS and DX:IW however, some of the DXT1 textures also have transparent details, and they have done that by simply telling the game to make everything which is black in the DXT1 texture become transparent.
DXT3 also handles colors better than DXT1, which is why it will sometimes be the best looking format of the two. For instance I used DXT3 to save my wood textures, because DXT1 would 'miss' a lot of details in the wood, and just look bad. In some textures there won't be any visible difference though - it depends on what's in the texture.
As I mentioned earlier, you can alter the normal map by altering the color channels. One other way, other than the one I mentioned above, is to play with contrast and levels on the Red, Green and Blue channels. Increasing the contrast will make the normalmap stronger. It works differently than altering the contrast of the whole RGB channel. By altering the contrast of just one channel, you can strengthen just that property(depth for instance).
All the above is for altering already existing normal maps though, which is mostly what I have done. The best way to make them would be to have access to the models.
When saving the textures/normals, I have used mainly the default .dds settings, only changing mipmaps to about 8 or 9 levels. I have usually looked at what DXTool told me the original texture used, and followed that.
I save them as a "2D Texture".
I guess that's pretty much what I know about DXT1 and 3 and .dds and normal maps; just enough to enable me to make my own. I probably know a little bit more though - some "secrets" and some things i have plain forgot to mention.
Although i couldn't solve the original problem, I hope some of this can be of some help to someone. :)
toolman on 10/5/2005 at 19:03
Nice post, John. :thumb:
Bukary, I tried out that brick texture and it looked fine in game, in light/dark, up close, whatever. Think you're possibly having display problems due to your graphics drivers..?
from the epic site above:
Quote:
Avoid DXT1 when guaranteed quality is needed - choose another DXTC variant that doesn't have issues on NVidia hardware, and check your DXT1 textures on NVidia hardware before committing to them.
You have a nvidia card?
bukary on 10/5/2005 at 19:49
Quote Posted by toolman
Bukary, I tried out that brick texture and it looked fine in game, in light/dark, up close, whatever.
Strange... The problem is gone when I use GIMP filter to make normal maps. If I use Nvidia filter, the problem is there again. :confused:
Quote:
You have a nvidia card?
No. Radeon 9800 Pro.
Thanks for great post, JohnP! :thumb: I'll try to use your excellent advices and - if everything goes OK - write some basic tutorial about creating and importing textures for TDS.
BTW, I've just checked the whole KEP family in PCTextures folder. ONLY 5 textures have more mipmaps than 1. I think that most 'standard' textures (walls, floors etc.) in TDS have 1 mipmap.
bukary on 10/5/2005 at 21:18
Few questiones, JohnP:
1) Did you turn
a) .PSD picture into normal map;
b) .DDS picture into normal map?
I ask because, as I suppose, normal map must have the same number of mipmaps as color map, right? I guess the file used as the base for normal map does not have to be already "mipmapped"...
2) Did you edit normal map RGB channels before saving it as .DDS?
Let's suppose that I've run Nvidia filter (from .PSD file) and now I have a new normal map. Should I alter RGB channels to prevent it from pixellation, and then save it as .DDS, or should I save it as .DDS, and then alter RGB channels to remove pixellation (and save it again as .DDS)?
Thanks in advance for any advice... :)
John P. on 11/5/2005 at 05:07
Quote Posted by bukary
Few questiones, JohnP:
1) Did you turn
a) .PSD picture into normal map;
b) .DDS picture into normal map?
I ask because, as I suppose, normal map must have the same number of mipmaps as color map, right? I guess the file used as the base for normal map does not have to be already "mipmapped"...
2) Did you edit normal map RGB channels before saving it as .DDS?
Let's suppose that I've run Nvidia filter (from .PSD file) and now I have a new normal map. Should I alter RGB channels to prevent it from pixellation, and then save it as .DDS, or should I save it as .DDS, and then alter RGB channels to remove pixellation (and save it again as .DDS)?
Thanks in advance for any advice... :)
I flattened the layers when I was done with the normal map, then saved it as .dds.
I
never saved as .dds first and manipulated it after. That would be like saving an image as a .jpg and opening it up and saving it as .jpg again.
When you make new normalmaps from 'high res' sources, you usually don't have to do the thing I mentioned about adding noise, because there'll be enough little crisp details that colors can 'bind' to.
Creating normal maps from textures doesn't work well if you need real curves, like for a face for instance. The normal maps created with the nvidia filter are very 'flat'.
Also - the noise thing is useful mostly when working on surfaces like that; the curves and round smooth shapes that are in the original normalmaps. They tend to be very pixelated by the compression. If you make a new normal map of a brick wall from scratch, you won't need to add noise, because as mentioned there will be enough little details in it to prevent color banding and severe pixelation. Adding noise is only a suggestion of mine though - just something I thought up when re-doing the faces especially. So it's not something you have to do, just something to try out. Also - if adding too much noise, it will be visible in-game, like 'glitter' in the normal. The noise thing will only be useful if you have smoothed/blurred out the pixelation that was introduced to the original normal maps, or if you manage to make a really smooth normal from scratch.
I saved the normal maps with the same settings as the color maps, so I guess mine has the same amount of mipmaps, yes.