Thread: Normal maps: Get normal x/y/z from color

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    244

    Normal maps: Get normal x/y/z from color

    hi!
    i think the way you get the normal vector from the pixel color of a normal map is
    Code:
    nx=128-red
    ny=128+green
    nz=256-blue
    can someone please tell me whether this formula is correct?
    thanks

  2. #2

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    244
    thats amazing. i felt over this link while searching but i didn't find it much useful...

    edit: whats also bothering me is how to calculate the world space normal from the surface normal + the normal from the normal map.
    adding them only works on flat surfaces pointing up...
    Last edited by Devils Child; 08-09-2009 at 01:51 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Towr of Hanoi move the disc
    By WatchTower in forum C Programming
    Replies: 9
    Last Post: 07-17-2009, 03:48 AM
  2. Critique my lighting model.
    By psychopath in forum Game Programming
    Replies: 4
    Last Post: 08-12-2006, 06:23 PM
  3. inet_aton()... Noob needs help with sockets :|
    By Maz in forum C++ Programming
    Replies: 3
    Last Post: 11-22-2005, 04:33 PM
  4. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  5. Just one Question?
    By Irish-Slasher in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2002, 10:19 AM