Saturday, April 01, 2006

Fog: Real Time Computer Graphics Adventure

So last night I stepped of Glen Garry Glen Ross with Kate and Jenmy to very thickly fogged weather, which I found delightful. The conditions for it were just right: no wind, very moist cold air. The fog was uniform over our entire walk.

While I was walking, I realized just how difficult it must be to simulate fog, and shadows, and combinations of them for computer graphics. I really wish I had taken pictures of what was going on, how the street lights were interacting with the trees and power lines to make really sharp and diffuse shadows.

So, what is the behaviour of fog? Let's assume this: every point in a region of fog distributes all the light it recieves evenly over every angle. Also, the fog has a certain density in the air, which determines whether directionality or diffuseness of light dominates.

On the macro-level, I would notics that diffuseness seems to dominate: light sources have "clouds" of illuminosity surrounding them, which is why it is so useless to have headlights on. Back to computer graphics, this must be horrible to have to simulate, so perhaps (as with some games) it is slightly pre-rendered.

On the micro-level, and this is what is really cool, I noticed that thick, straight power lines or branches that were close to the light cast a planar shadow. This, obviously, isn't unexpected, but it looks fucking cool. For a first short bit the shadow is really harsh, and then lights fills in as it diffuses. What's also fascinating is that the shadows is a VOLUME, not a 2-dimensional pictures that were are used to seeing cast on a surface. As I was walking along I noticed that the shadow would change shape based on the thickness of its volume I was looking through, as it had no clear defined visible edges. This above effect further adds to the horror of trying to simulate this. which makes me content that the universe exists in its full volume and computational power to create pretty effects.

No comments: