Re: [Algorithms] Normal mapping error - not sure if it's a generation error, or a rendering error
Brought to you by:
vexxed72
From: Christian S. <chr...@bt...> - 2004-01-30 19:39:38
|
Hi! Whatever tool you use (ATI's, ORB, or Kaldera, etc, etc) the most important thing (as said by other people) is that your tangent basis are correct. While making ORB and including normal mapping in my engine I tried a bunch of algorithms and find that many are flawed, including ones presented by nvidia and microsoft (in tutorials for example). The one that works in all cases (under the restrictions mentinioned earlier like [0,1] range, etc) is the one by Eric Lengyel in his book Mathematics for 3D game programming and CG, http://www.terathon.com/books/mathgames2.html With his permission I include a .pdf with C-code that you can copy and paste into your engine. The pdf lies in the ORB.zip at /docs/orb_tangentvectors.pdf http://www.soclab.bth.se/practices/orb.html (direct download): http://www.soclab.bth.se/practices/orb/orb.zip You can also read Eric's post in the Opengl forum http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/011349.html From what I've heard Kaldera is the best, but it does cost some moneys... Soon nvidia will release Melody, we'll see how good that one is, they've been working on it quite long now, tried an alpha a year ago. good luck chris |