There is a slight difference. But what are you modeling exactly with the spherical harmonics? If it's just some ambient occlusion, can you bake it into the texture or something?
Well, the difference is slight because it is still just normal mapping. I want to improve it a bit, but it will always be just normal mapping. I'm trying to make the effect pop out just a tiny bit more. If you compare the first picture to the second or the first to the third, and you think that the bricks seem more extruded in the second or third version, than the effect did its job.
I could use a baked texture, but due to the relationship spherical harmonics have with spacial mapping, to get the same effect I would need a cube map. And to get the same detail the face of the cube amp should be equal to the normal map or one half the width and height. Going one quarter the size would make the effect not worth it.
I want to have better than standard normal mapping and better than standard everything. My next step is to improve specular highlights. Here is a standard energy conserving specular highlight:
This has a few classical problems, like the specular highlight being aliased, standard specular shimmering and non great behavior once the object gets far from the camera.
So I'm implementing a specular AA scheme:
This might still look pretty aliased, but it is better that the first one. But the main property it has is that the highlight are much more stable than the non-AA version, and they get more and more stable the farther the object is. I'm still working on it because at great distances the highlight was out too much. An I also need a hand picked bias for each normal map. I'm trying to figure out a way to either normalize the normal maps or autocompute the bias. And this method is also more ALU intensive.
My third scheme is not more ALU intensive but instead it uses a special specular map. The problem is that the content pipeline must generate this map for each texture, but the AA is the highest quality and should behave theoretically the best at all distances:
And it does, but only when close to the camera. Actually, it has to do with MIP levels. The additional specular map must be both generated and MIP mapped, but the standard MIP map filter of my tools is not good enough, so the effect only produces AA and very stable highlights at the highest MIP level. I need to figure out a way to generate in a shader not just the highest MIP, but instead all the MIP levels and output that to disk.
So this is my plan for:
- better normal mapping
- stable antialised specular highlights
- physics based BRDF
Am I missing anything?