Inside3D!
     

Normal maps?

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
jim



Joined: 05 Aug 2005
Posts: 400
Location: In The Sun

PostPosted: Wed Oct 03, 2007 10:05 pm    Post subject: Normal maps? Reply with quote

Not really programming it, but how's it programmed to DarkPlaces? Which colour is top, which left? Or does it matter?
_________________
zbang!
Back to top
View user's profile Send private message Visit poster's website
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Thu Oct 04, 2007 1:40 am    Post subject: Reply with quote

It's standard. RGB=XYZ.
R=0 -> X=-1
R=0.5 (128) -> X = 0
R = 1 (255) ->X = 1

And they're tangent space.
+X=right, +Y=down, +Z=away from the surface. (note that it's also common to have +Y=up, but DarkPlaces has +Y=down).

To get plain Phong shading (as if you had no normal mapping), all the normals should point 'out', which is positive Z. The normal should be 0,0,1, therefore the colour should be 0.5,0.5,1 (aka 128,128,255). It's a light bluish-purple that you commonly see on normal maps.
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
jim



Joined: 05 Aug 2005
Posts: 400
Location: In The Sun

PostPosted: Thu Oct 04, 2007 1:43 pm    Post subject: Reply with quote

Allright, then everything seems to be good with my normal map render settings and the maps... Smile
_________________
zbang!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group