Max Zinkus - Graphics (CPE 471) Project



Experimentation in physical simulation using composition of simple trigonometric and polynomial functions. Playing with particle systems to create swaying, blazing fire, covering rain, and shooting stars. Using random generation to create realism in object placement and scaling - a random forest ;)0. Simple shadows to help imply perspective to an earthbound point of view. Phong, Blinn-Phong, and modified1 Blinn-Phong reflectance for dynamism in lighting.


Most of my work went in to setting the scene, so it would be fair to say that what I chose to explore was the artistic aspect of graphics programming. Additionally, I went for an artistic style strongly inspired by Legend of Zelda: The Windwaker3, which due to the hardware of the time (2002) used very low-poly objects with a similar style to create a rich and engaging world. Third, I explored quite a bit with the re-invention of motion systems to simulate complex fluid dynamics with simple particle systems and composed trigonometric and polynomial functions.
The main light source is translated based on the parameterized circle equation, rotating around the X axis, and the moon is translated out to that point to create the visual effect of the moon orbiting the world, casting light down upon it. The glow of the moon is created by determining relative angle between a point on the sky and the moon via a dot product and adding a yellow shine accordingly.
The stars are a texture painted across the inside of a large sphere, dimmed in the case that they overlap with the shine of the moon.
The shooting stars are simple particles moving across the sky, randomly becoming solid (alpha = 1.0) for fixed durations as they fly.
The clouds are a different texture which replaces the stars, and the rain is another simple particle system. The moon glow still affects the new texture, so as to convey an effect that the glowing bright moon is moving behind the clouds.
The fire is a complex particle system. Various forces are composed to create a vortex, a tight base, a wide, low, and swaying core, a flurrying top, and randomly escaping embers. I achieved the effect using a composition of sine waves, outward forces which reflect as they travel upward, and clamped random initialization. Finally, the deterministic conversion to smoke is applied to almost all particles (the escaped embers.. escape) and a wind drift takes over as the dominant force.
In order to acheive the lighting effect I wanted for the trees, I initially used Phong reflectance against the moon and the firelight with orange-red material coefficients for light from the fire. This led to a problem where the trees glowed with firelight but only when viewed from above, due to the reflectance angle from the ground against the slightly upturned normals of the quads of the tree. I then switched to Blinn-Phong in an attempt to mitigate the issue using the half-angles. This only helped slightly, so I came up with a new system wherein I reflected the normals over a vector in the XZ plane in order to flip their Y component into the negative. This, combined with Blinn-Phong, meant that the firelight reflected downward - although not directly back at the fire - giving a glow near the base of the trees and a reduced light effect near the tops of the trees, exactly what I wanted.
Lastly, I implemented smooth movement and a virtual camera with pitch and yaw.


Starry Night, Roaring Fire

The moon shines light on the whole scene, and the campfire slightly illuminates the trees, especially from below. The stars in the distance shine bright, brightest when the moon is far away. The moon also casts a large glow in the sky. The smoke drifts off into the wind, but a few embers randomly escape up into the night.


Rainy Night

Some inclement weather obscures the scene as well as the light from the sky. The rain falls down and slightly in the direction of the wind affecting the smoke. The stars are hidden behind dark rainclouds.


Notes

1. Modified in that I reflected the normals over the xz plane to create downward half-angle reflection in the upward-facing quads of the trees.