Modding, Mission Design, and Coding > The Modding Workshop

photoshop cs2 and normal map plugin

<< < (2/7) > >>

Vertigo 7:
Well then I guess my normal map isn't working right. I can't tell they are on when i'm close to the object. I'll post some screens in a sec...


first 2 screens are taken from the F3 area. The only texture i created a normal map for is the main hull texture. If the rest of them have a normal map its included in the mediavp's


normal maps on



normal maps off


and these 2 are taken in game






i donno if its just me or what but i can't tell the normal maps are working up close, from far away i can see the detail in the large areas on the texture that are noticeably depressed.

Herra Tohtori:
Could you post images of your heightmap (greyscale) and the normalmap (purple) generated of the heightmap plox?

Also, describe what you do to the purple normal map to get it into the game.

Vertigo 7:
sure...

simply with photoshop i stroked and filled the areas i wanted to give some depression to



then i used color replacement tool, the darker blue areas became the almost black areas while the lighter blues became the slightly darker gray areas. The tool didn't quite work the way I wanted for it to. I wanted the edges to be a bit darker than they came out and the bigger areas to be not quite as dark but i figured just to get this to work (so i can see the results first hand) it was sufficient




as the map stands right now i ran the filter before saving, i used 9x9 filter, scale 15 (i was using 7 but i stepped it up to see if that was why) average RGB and invert Y. Saved as .DDS DXT5_NM


*edit
ehh the purple picture when I opened it back up in photoshop is grayscale (is it sposed to be after saving it?) it was purpleish pre saving... i'll run a filter again and show yas...


Herra Tohtori:
Well, first of all you should - in my opinion - use a bit stronger seam lines. Remember that the absolute depth is not saved to the normal map, but rather change of depth - which means that width of a transition from low to high (or gradient) can mean as much - or more - to the profile of the normal map detail, as the actual apparent height difference between high ground and low ground.

So basically a sharp edge between black and white will translate to as narrow and steep change from low to high, while blurred edges will end up rounded and low-sloped transitions that might look good with organic models, landscapes and stuff like that, but rarely cut it for ship textures. Also, FS2_Open tends to require rather strong normal maps for them to look good (and be worth using). Too subtle, and you might as well not use them and save the performance for something else.

Another thing that I personally have noticed while using a normal map plugin to generate normal maps - working on higher resolution makes a big difference in the end result.



As an example, I resized your texture to 2048^2, applied some filters to make the seam lines a bit stronger and sharper (see above) (Selective Gaussian Blur is awesome), then applied normal map at 9x9, scale 30, applied still some filters to get rid of jpeg artefacts (Selective Gaussian Blur is awesome) which won't be a problem for you since you have the originals, then resized it to 512 and ended up with this:



FS2_Open shader system uses a set-up where it reads the green channel and alpha channel of an image for u/v co-ordinate normals data. Red and blue channels are completely ignored. This is called normal map-style DDS file, and the most common format is dxt5nm since it takes advantage of the awesome dxt5 compression. However you shouldn't be too confused by the -nm suffix in the file type; the file is a normal dxt5 file with some channel management to take care of the normals information being in the correct channels.

When you save into FS2_Open-usable normal map, you have two options. One way is to save the purplish normalmap into dxt5nm compressed file with a DDS plugin, which does the trick in the sense that FS2_Open should be able to read the file. This file will indeed look like a grayscale (with some transparency) since most dxt5nm saving procedures move the red channel into alpha  channel and copy green channel to red and blue channels to make an uniform RGB image. If you're just starting, it might be easiest to just use this method at least while you're getting your normalmapping technique itself sorted out.


However, the other option seems to offer slightly better compression quality in some cases, and that is to:

step 1 - manually copy red channel to alpha channel

step 2 - manually fill red and blue channels with black, which reduces the amount of information that the DXT compression needs to store, to some extent.

step 3 - save as any DDS file that has full alpha channel, but not dxt5nm since it will just ruin your channel management with it's own and you end up with bad file. Basically, you have two options - if you want a compressed normalmap, use dxt5 compression; if you want superior quality (and superior memory usage) or the map simply doesn't compress properly (can sometimes happen) - use uncompressed u8888 DDS file.

The resulting file will look green with some transparency instead of gray with some transparency, since it has black in red and blue, information in green and alpha channels. Don't be troubled with the green-ness. This dickery with channels sometimes makes a difference to how well the image is compressed by the dds utilities - and anyway, it's good practice to just keep the necessary information in the image. At least in my opinion. This file with correctly managed channels looks like this:



You could copy that png file, save it into texturename-normal.dds with dxt5 compression and it would work - although due to remnants of jpg compression it would look rather lumpy and bad most likely, so you shouldn't do this but rather try doing something like this with your source files. This isn't a standard set in stone, though, I would need to test the normalmap with the model in-game to perform adjustments, but I hope you get at least something out of this message.

Oh, and by the way you should invert y normals in your plugin to get correctly aligned normals on vertical axis. The Photoshop normalmap plugin defaults it into wrong direction considering FS2_Open usage (or FS2_Open shaders use a backwards setting, I dunno which option actually is more descriptive). Interestingly, GIMP normalmap plugin produces correctly aligned normal maps right off the bat. In a nutshell, if you have an extrusion (bright) on the height map, cyan should be on it's lower edge. If you have a recession, cyan should be on the upper edge. Most people tend to interpret cyan as the brightest colour in a normal map so it might look a tad weird for a while, but that's just how the shader system is set up to work.

Vertigo 7:
i did read the thing about copying the red channel to alpha etc etc but I'm not seeing how to do that in CS2. On the channels tab really all i can do is turn the channels on and off (fyi i do not have alot of experience with photoshop, just some small things i've picked up here and there.

Resizing the thing shouldn't be an issue for me. Should I do that from the pre-filtered image (gray scale) or start over completely? the original texture I created the normal map from is a 512x512. Also what exactly do i need to do to make the seem lines more better (as in your example)?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version