More screwing around

Trying out some new fun with style sheets, as well as a tweak for HTML Editor to allow self links to be styled differently, to provide visual feedback of which page in a list of contents you are currently viewing. This current look (which could change, invalidating this sentence) is kind of a textbook thing, attempting to use only 2 colors for text and layout (albeit in varying shades). It may look yukkier to you than to me, because I am red-green color-blind ;)

Specularization

Specular lighting is an important part of 3d graphics, but it is also a mega pain in the ass, because far more than regular ol’ diffuse lighting it can give away the polygonal nature of an object. This is because a specular hilight causes such rapid change in brightness of a surface. One way to deal with it is to use higher polygon models, but this is computationally expensive, and generally requires at least a four-fold increase in geometry detail. I have also tried dynamic tesselation, where the surface is further subdivided in areas where light levels vary rapidly, but found this difficult and fiddly to implement.

So now I am experimenting with a dynamically generated reflection map. The 2 spheres shown here are actually identical, except that the one on the right is using an environment map for its specular hilights instead of generating them at triangle vertices as the left one does. Now it’s only the silhouette which gives away the low detail level of the model. Neat eh?

shiny teapot

A reflection map, as its name implies, can contain actual reflections of other objects, so if you have a relatively static sky in a scene, you can render that to the reflection map and your shiny objects will then appear to reflect the sky!

There are [unfortunately] some limitations to this method, the biggest one being that the reflection map is only ever correct for a single position, and the further an object deviates from this location the less accurate the placement of the hilights will be. The real strength in this method lies in the fact that the creation of the reflection map and the rendering of the object are done separately, and the rendering pass is comparitively ‘cheap’. Although it is computationally expensive to create the reflection map, the same map can be used on several objects, and you can even cheat by only updating the map every few frames. Many driving games do this; if you carefully watch the reflections on the cars, you will see they are more jerky in their motion.