Normal Map Issue?
by James Spellman · in Torque Game Engine Advanced · 10/25/2007 (11:13 am) · 0 replies
I think this is a bug so I'll state my case here and see what you all decide.
I was experimenting with Normal Maps and everything was peachy until I got to the heads of my toons.
Here, hopefully, is the before pic:

and here it is with my Normal Map:

The Normal Map itself didn't really make a difference. I was always getting those "hotspots". There was nothing obviously wrong with the Mesh. By messing around with the model, I was able to get the spots to change shape but never go away. That's when I started poking around in the engine.
Without knowing what I was doing, I started debugging the problem by changing settings, turning things on and off before I finally found the code in bump.cpp that affected my image.
The line around 336 read:
the problem, to me, was that normalizing the bumpNorm was artificially inflating the lighting in those key areas. By removing the normalize to look like:
my result is now this:

I also changed the following Shader 1.x line to not use normalize.
So now am I insane? Does my artist need to fix something in the model? Let the debate begin...
Edit: Worked out the image paths, formatting
I was experimenting with Normal Maps and everything was peachy until I got to the heads of my toons.
Here, hopefully, is the before pic:

and here it is with my Normal Map:

The Normal Map itself didn't really make a difference. I was always getting those "hotspots". There was nothing obviously wrong with the Mesh. By messing around with the model, I was able to get the spots to change shape but never go away. That's when I started poking around in the engine.
Without knowing what I was doing, I started debugging the problem by changing settings, turning things on and off before I finally found the code in bump.cpp that affected my image.
The line around 336 read:
meta->addStatement(new GenOp(" @ = saturate( dot(@.xyz * 2.0 - 1.0, normalize(@.xyz)) * @.w );\r\n",
bumpDotDecl, bumpNorm, lightVec));the problem, to me, was that normalizing the bumpNorm was artificially inflating the lighting in those key areas. By removing the normalize to look like:
meta->addStatement(new GenOp(" @ = saturate( dot(@.xyz * 2.0 - 1.0, @.xyz) * @.w );\r\n",
bumpDotDecl, bumpNorm, lightVec));my result is now this:

I also changed the following Shader 1.x line to not use normalize.
So now am I insane? Does my artist need to fix something in the model? Let the debate begin...
Edit: Worked out the image paths, formatting