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

This is a discussion on Normal maps: Get normal x/y/z from color within the Game Programming forums, part of the General Programming Boards category; hi! i think the way you get the normal vector from the pixel color of a normal map is Code: ...

  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
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,597

  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 02: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, 04:48 AM
  2. Critique my lighting model.
    By psychopath in forum Game Programming
    Replies: 4
    Last Post: 08-12-2006, 07: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, 11:36 AM
  5. Just one Question?
    By Irish-Slasher in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2002, 10:19 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21