Game Development Community

Replacing default normal map hlsl

by TheGasMan · in Game Design and Creative Issues · 05/07/2007 (12:10 am) · 9 replies

Greetings everyone,

I am looking for some help. TGEA seems great except for a few specific things....however I really only need help with 1 right now. If I can get the issues solved, I will definitely buy. ;)


...I am concerned about the rendering of normal maps. It seems that they are VERY awkwardly made and rendered for this engine. Let me explain:
Here are some examples to help me explain my points;

Here I have used one of TGEA's normal maps and one I made from the same TGEA image.
(( the lights are in the same spot of each box )) Obvious differences.
www.spyjuice.com/wtf1.jpg

Here is a portion of the normal map that I re-made for the PLAYER (space-orc).
There was VERY little change in the player appearance when the change should have been extreme.
www.spyjuice.com/wtf.jpg

This next image is a render in TGEA of the accompanying normal map. The black color in the right-side image was transparent.
1. The detail is lost.
2. TGEA seems to only care about what is and what isn't transparent. [ What is 'black' and what isn't. ]
www.spyjuice.com/wtf2.jpg

****My main point: I would like to change the default normal map rendering to tangent space or if it already is tangent space, then I would like to improve it 100fold(times).
Especially for player models but also the entire game. There are several beautiful features but this one seems quite "lacking". (no offense)

Thank you


P.S. I forgot to mention somethings....
it also seems the normal maps have an extreme effect on specularity in regards to them being rendered more like "Gloss maps" IMO. Again, any help in this area would be tremendous. ;)

#1
05/08/2007 (8:10 am)
This is so interesting and getting not attention.
GG Is there a problem with the way TGEA is Normal mapping?
#2
05/08/2007 (8:41 am)
I have been wondering about this also. I keep seeing GG refer to their Normal Maps as "Bump" maps. Now I'm thinking they really do mean Bump mapping instead of Normal mapping. As you show above, the "normal" maps are acting much more like bump maps with a splash of specularity thrown on top.

I agree with the your words about the overpowering specularity as well. I have tried to adjust it, but get odd results.

As an example of the why real normal mapping is desirable, take a look at Gears of War on Xbox360. Your character in the game is wearing nicely detailed armor.

technabob.com/blog/wp-content/uploads/2006/12/gears_burger_king.jpg

(funny picture, but it shows the back of the character like i need)

All that cool stuff on that guy's back (the armor part) isn't geometry - it's a normal map. That's why a "bump" map with specularity does not equal a real normal map.

A Normal map gives the appearance of full fledged geometry, whereas a bump map simply generates a shadow where specified. If you have an object with a bump map that appears nice and "bumpy" from the front, but then turn the object to the side, you will see that the surface is still perfectly flat.

A normal mapped surface will actually appear to be modeled and have dips and valleys etc. This normal mapped surface will also react to lighting situations as if it were real geometry.

I'm not sure TGEA's current implementation of "normal mapping" could handle such convincing normal mapping...
#3
05/08/2007 (8:46 am)
I believe already that TGEA is rendering out to Tangent Space for its normal maps.

What might be leading you astray is the fact that some of the textures that have been done for the TGEA demos were done years ago (ie. 4+) back when this was fairly new tech. At the time the only reliable method for building normal maps was through the nVidia Photoshop plugin (back when all the settings were being learnt). A plug-in that at best generates really nice bump maps, but doesn't do a great job at normal maps. As such you can forgive GarageGames for some of the sample art in the demos.

As for the changes in the normal maps that you have recreated. I honestly Don't think you are going to see as much of a change as you expect to see. Sure things might bump up a bit more, but its not going to really stand out because its just a normal map, not a relief map. I do know that there are a few things in TGEA that back in the day affected the normal maps ability to shine, and this mostly had to do with having other shader effects on the model in the other passes, so you might want to check there first to ensure that it is or isn't working as you think it should.

Lastly, as for TGEAs abilities to render out normal maps, it honestly isn't as bad as you are making it (trust me, I do a pretty good job at critisizing the tools sometimes). A normal map that is generated from a 3D application will come out looking pretty much as it should in TGEA. There are some gotchas and things you need to be aware of course such as proper lighting, the need for a flat per node based specular instead of pixel based or how to use reflection maps (the alpha data stored in the normal bitmap image). But all in all it does the job as its supposed to even though the process could use some tweaking and love (which I honestly won't deny).

Logan
#4
05/08/2007 (8:47 am)
No they use normals, but they are using a different format. They PNG's which I've not used before. hmmm..

If you want more info on PNG's like I did..

www.libpng.org/pub/png/pngintro.html
#6
05/08/2007 (10:16 am)
@Thomas Shaw

Technicly the effect is called a Normal Bump Map, but everyone just calls it a Normal Map.

A regular bump map will simulate a Z change by a few pixels by using an 8 bit image to adjust the pixels on the polygonal normal to which it is applied. Normal Bump Maps (aka Normal Maps) work the same way but they use a 24 bit image to also simulate movement by a few pixels in the XY and Z axis.

Normal bump maps are great for small subtle effects like scratches, skin pores, simulating muscle form, so on and so forth. They suck when you are actually trying to simulate large scale changes to the geometry that actually emulate form (ie. smoother appearing geometry, bolts or rivets, armor plating, etc.). To do this you need another pixel shader called a Relief Map, which looks very similar to a Normal Bump Map (bitmap data is the same) except the relief map will actually alter the depth of the pixel on the local normal that it is applied on.

Wikipedia article on Normal Maps (or Normal Bump Maps as we should be calling them).
Wikiepedia article on Paralax mapping (or Relief mapping as I know it)
#7
05/08/2007 (12:00 pm)
Both bump mapping and normal mapping are just different ways of doing per-pixel shading. the difference is that bump maps use an 8-bit grayscale image as a heightmap to simulate bumps, thus it's understood that it'll be used as part of a planar surface facing a predefined direction, whereas normal maps can be used for anything with any orientation by encoding object-space normals in the texture. different types of displacement mapping(like parallax mapping) are different in that they affect that actual positioning of the pixels before rendering to give a 3d effect like the decals in FEAR.

  • that TGEA shot Eric shows up top is NOT normal mapping.
  • you don't need relief mapping for high-quality visuals
  • [li]TGEA can do proper normal mapping
    #8
    05/08/2007 (5:14 pm)
    @L Foster ....maybe the older art work is confusing the issue on my end. See the image, with newer artwork, below.
    -> Please remember I have only had the TGEA demo for a few days now and I have not exactly had loads of time to research the engine and read at this point. So any good/direct help is very appreciated. ;)

    As for my first image and Sean's comment, there is no relief...however, there is specularity...but the render is purely based off of calculations of the light to the color information in the map. Your perception of it is what you want to make of it. No need for fanboi like comments. **"'that TGEA shot Eric shows up top is NOT normal mapping.""**
    I think you should read this article...the entire thing plz: (no offense intended btw) http://www.bencloward.com/tutorials_normal_maps1.shtml

    Besides, I was able to recreate the same effect in TGEA with a bit of tweaking.
    www.spyjuice.com/not_bad.jpgwww.spyjuice.com/not_bad2.jpg

    Thanks for the help.

    baseTex[0] = "~/data/shapes/SpaceOrc/garbagecan1_uv";
    bumpTex[0] = "~/data/shapes/SpaceOrc/garbagecan1_uvn2";
    pixelSpecular[0] = true;
    specular[0] = "0.5 0.5 0.5 0.5";
    specularPower[0] = 10.0;

    turn off all sources of lighting in the specific dts settings
    #9
    05/09/2007 (6:39 am)
    Sorry for a double post.

    I am fine with the above result...all I need is a bit of diffuse ambient and the object would look great.( err, with a better normal map ;) )

    For anyone interested about relief/parallax mapping(not brought up by me but my post was interpreted in such fashion, I have been informed that the engine is capable and that there are shaders that can be downloaded from the private forum section.

    After reviewing a bit more of the engine's structure, I do not believe that it would be too hard to improve the default normal mapping or even add most/any shader functionalities desired.



    Cheers...I will buy the engine this coming week. :wink: