Page 1 of 1

Normal Mapping

Posted: Sat Mar 15, 2014 8:07 am
by Samuel
Hello everyone,

I've been getting a few requests lately for a Normal Mapping example. So, I figured it's about time I posted one. It's one of them from Ogre's shader cookbook.
Here's a little picture for comparison.
Image

:shock: Notice the muscles and clothing have a lot better detail.
Most PS3 and Xbox 360 games lived off of Normal mapping.
In fact without it that generation of games wouldn't have looked all that different from the previous generation.
Well, obviously they would have looked a bit different. I'm just saying Normal Mapping played a very important part graphically.

So, here's the download for anyone interested.
Normal Mapping.zip

When I get more energy I'll try to post all the code here on the forums, but for now I need a little timeout.
So, you'll have to get the code from my download for the time being. :P

Enjoy and don't hesitate to ask if you have any questions.

Re: Normal Mapping

Posted: Sat Mar 15, 2014 9:13 am
by DK_PETER
Yeah, it looks really good.
Very nice example.
Thank you for sharing, Samuel.

Re: Normal Mapping

Posted: Sat Mar 15, 2014 9:29 am
by AndyLy
I have not had much time to test, but this material works well (in my game).
I wrote to you about the problems with the lights, whith "old materials", with new one everything is fine.
Later will test better, but I hope everything will be fine.
I do not know how you did it, but thanks for your voodoo. :)

Re: Normal Mapping

Posted: Sun Mar 16, 2014 9:57 am
by Bananenfreak
Hey Samuel,
I will also try your code in my Project. Thank you for sharing it with us :)

Re: Normal Mapping

Posted: Mon Mar 17, 2014 7:59 pm
by AndyLy
ImageImage
ImageImage
ImageImage

Re: Normal Mapping

Posted: Wed Mar 19, 2014 9:04 am
by Samuel
Nice pictures, AndyLy. Are they just for comparison or is there something wrong that I'm not noticing?

Re: Normal Mapping

Posted: Wed Mar 19, 2014 10:37 am
by AndyLy
Just for comparison. If something goes wrong, I'll let you know immediately. :)

P.s. There is one problem with fog. Objects become white.
I marked objects without normal maping. They normally displayed in the fog. ( Fog(RGB(50,50,50),1,40,160) )

Image

Re: Normal Mapping

Posted: Fri Mar 21, 2014 8:27 am
by Bananenfreak
Samuel, why your Normalmapping Needs a specularmap? Those Normalmappingthings I know don“t Need specularmaps...

Re: Normal Mapping

Posted: Fri Mar 21, 2014 6:01 pm
by Samuel
@AndyLy
I'll experiment a bit with the fog and try to find out what's wrong.

@Bananenfreak
You could technically go without the specular map, but it can be useful at times. You may already know this, but a specular map allows one to specify which portions
of a texture will receive specular lighting. For example we could edit the sinbad_bodySpec.png to be completely black expect the circle for the eyes which would be white.
Now when specular lighting is enabled only the eyes will receive specular lighting. Which would be more realistic looking.
If you don't need specular lighting then you can just use a solid black specmap.