View Full Version : Is this normal mapping done right?

mantilope

06-28-2015, 12:47 PM

Hi, I have these textures

18991900

and I've done a normal mapping with this result

1901

I'd like to ask if it is done right.

Thank you for your opinion.

GClements

06-28-2015, 02:27 PM

I'd like to ask if it is done right

Maybe. Is the light coming from below and left?

You really need to see how the lighting changes as the light moves.

Also, to tell if you're doing tangent-space mapping correctly, you need to use a surface which isn't flat.

One other point:

n = gl_NormalMatrix * gl_Normal;

t = gl_NormalMatrix * gl_MultiTexCoord1.xyz;

b = gl_MultiTexCoord2.xyz;

This will result in b being perpendicular to n and t, but t won't necessarily be perpendicular to n (i.e. it won't necessarily lie in the tangent plane). Typically, you'd transform n by the normal matrix and b and t by the model-view matrix so that n is perpendicular to both b and t. But this only matters if the the model-view matrix contains non-uniform scaling or shear.

Powered by vBulletin® Version 4.2.3 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.