2010-09-09, 10:07 AM
I'm fairly sure given two components of a unit vector if you know the sign of the vector you can reconstruct the third component (though I can't find any examples online... it's kind of an old technique I think from back when storage was at a premium... surface normal compression)
Anyway assuming so, the third component of the colour could be freed up to store something with 7bits of precision... because the sign bit would be used to store the sign (+/-) of the lighting normal. Then I'm thinking a useful thing to store there would be the rotation angle of the tangent vector where the reflection of the normal is used as the "up" vector. So you end up with a tangent vector that is precise to about 128 slices of pizza (edited: or maybe the sign bit should be taken from the fourth component instead, cutting the number of possible shadow sets from 256 to 128 so the tangent vector would be as precise as the surface normal vector)
Armed with the normal/tangent you can do modern bump mapping. Like where the lights in the room reflect off the stones that make up the floor even though the stones are really just a flat polygon with a stone floor texture.
The same compression technique can be applied to the monster model files etc. So you can have bump mapped armor with intricate metal work, eg. etchings that reflect light naturally.
And the final touch of brilliance I think, is to build a database of the textures based on the final mipmap levels. So like you take a texture and down sample it until it's a 1 pixel image or maybe 2x2 ... whatever it takes to identify the texture uniquely. Because all textures when down sampled should create a kind of fingerprint. And doing a lookup through a table of 2x2 pixel ids is pretty trivial. So that way when the mimaps are built in game the final level (or so) is used to determine what texture you just loaded in, then you can grab the matching bumpmap texture or whatever (there are any number of different kinds of textures that can be combined to generate effects... you can even grab shaders individualized for the textures)
At that point you have all kinds of options. Maybe almost anything you see in a modern game visuals wise
EDITED: You can also of course ditch Som's textures and grab higher resolution/depth ones. And even redirect Som to alternative texture directories where it will find tumbnail versions of the textures so the mipmapping process is short circuited (for speedy load times)
Anyway assuming so, the third component of the colour could be freed up to store something with 7bits of precision... because the sign bit would be used to store the sign (+/-) of the lighting normal. Then I'm thinking a useful thing to store there would be the rotation angle of the tangent vector where the reflection of the normal is used as the "up" vector. So you end up with a tangent vector that is precise to about 128 slices of pizza (edited: or maybe the sign bit should be taken from the fourth component instead, cutting the number of possible shadow sets from 256 to 128 so the tangent vector would be as precise as the surface normal vector)
Armed with the normal/tangent you can do modern bump mapping. Like where the lights in the room reflect off the stones that make up the floor even though the stones are really just a flat polygon with a stone floor texture.
The same compression technique can be applied to the monster model files etc. So you can have bump mapped armor with intricate metal work, eg. etchings that reflect light naturally.
And the final touch of brilliance I think, is to build a database of the textures based on the final mipmap levels. So like you take a texture and down sample it until it's a 1 pixel image or maybe 2x2 ... whatever it takes to identify the texture uniquely. Because all textures when down sampled should create a kind of fingerprint. And doing a lookup through a table of 2x2 pixel ids is pretty trivial. So that way when the mimaps are built in game the final level (or so) is used to determine what texture you just loaded in, then you can grab the matching bumpmap texture or whatever (there are any number of different kinds of textures that can be combined to generate effects... you can even grab shaders individualized for the textures)
At that point you have all kinds of options. Maybe almost anything you see in a modern game visuals wise
EDITED: You can also of course ditch Som's textures and grab higher resolution/depth ones. And even redirect Som to alternative texture directories where it will find tumbnail versions of the textures so the mipmapping process is short circuited (for speedy load times)