Galaxy Ornament
By Sahana Prabhu→I produced a procedural simulation of a “Galaxy contained within a Glass Ornament”.
1. Galaxy Generation (main.cpp):
- I wrote a procedural generation script that spawns 4000+ objects.
- Stars and Dust Clouds are arranged in logarithmic spirals to mimic the Milky Way arms.
- A central bulge of stars is generated using spherical distribution.
- Objects are sorted by type (Background -> Stars -> Glass) to ensure correct alpha blending.
2. Realistic Glass Shader (showcase.fs):
- I implemented a customized Fresnel effect that transitions from clear transparency in the center to opaque reflection at the edges.
- I added a “Studio Lighting” model: The light side (top-right) reflects a bright white specular highlight, while the shadow side (bottom-left) renders a deep “ombre blue” gradient to simulate volumetric glass shading in the dark.
- Chromatic Aberration is simulated by subtly shifting the color based on the view angle.
3. Volatile Star Simulation (showcase.fs / showcase.tes):
- The stars inside the galaxy (“Solaris Stars”) use Domain Warping (noise-distorting-noise) to create a swirling, fluid plasma surface.
- They follow a life-cycle animation: Main Sequence (Yellow) -> Red Giant (Expanding Red) -> White Dwarf (Collapsing Blue), changing color, size, and pulse speed over 24 seconds.
4. Ornament Geometry (showcase.tes):
- I implemented a Geometry Shader logic that squashes a sphere to create the Gold Cap.
- I stretched another sphere to create the hanging String.
- I rotate the galaxy contents over time while keeping the outer glass shell stationary.
Acknowledgements:
- Base noise functions and pipeline structure derived from CSC317 course labs.
- Fresnel equations based on “Fundamentals of Computer Graphics”.
- Domain Warping concept adapted from Inigo Quilez.