So, I decided to try to make computer games. Really? How unique. Why? Simulations of reality have always fascinated me. With a small amount of math and a computer you can make things wobble and wiggle and oscillate in a realistic way. This was probably the reason I became a research scientis in atmospheric physics. But it turned out that solving radiative transfer in the atmosphere wasn't very exciting at all. You needed to stick to reality. For me, a good game should be an accurate simulation of reality, just that you need to take away all the boring parts of it and emphasis the interesting parts.

RSS My Blogs

TBN

BergeLab Blog

Ah, the glory of normalmaping for lighting calculations!

I have previously not used normapping for any other surfaces than completely flat ones (sea-surface, buttons). The problem has been to calculate the tangent frame for each vertices. Now, I found a very nice description here

Terathon.com

on how to do it. It requires som understanding of linear algebra, but otherwise it's a quite good (and accurate) description of how to get a transformation matrix to get the lighting in coordinates that follow the texture surface of a vertice/triangle.

This really makes a difference for how surfaces look and feel. Only at very very close range is the illusion of a rough and detailed surface broke.

This would have been easier if I had not been so stubborn as to write all the code and shaders from scratch without using a framework or higher-level program. But now I know a lot more of how it works than if I just had to specify "phong" or "normalmap".

Now it's just a matter of adding normalmaps to all surface textures...