GalaxyBrain.mp4
This project is a WebGL homage to the galaxy brain meme.
As I was examining the galaxy brain meme template one day, it occurred to me that each of the images in the template featured interesting lighting phenomena. I wondered how I might recreate these visual effects with computer graphics and, thus, this project was born.
For best results, view in a browser with hardware acceleration enabled on a computer with a GPU.
I implemented many of the visual effects by following the techniques described in the following writings.
- Order-independent transparency
- FXAA
- Volumetric lighting AKA crepuscular rays
- Fresnel effect
- More fresnel effect
- GLSL hue shift function
The binary rain in the 4th stage of the meme is courtesy of @ojdom/matrix-rain.
I did not make the 3D models or the lens flare textures featured in this project. I slightly modified some of the models in Blender to reduce the polycount or extract certain parts, but links to the orignals can be found below.
- Redraw the scene properly (instead of reloading the page) when the window resizes.
- Scale brain neurons and laser beam stars when the camera zooms in/out.
- Add settings for toggling lighting effects, anti-aliasing, etc.
- Add keyboard controls for rotating and zooming the camera.
- Add support for automatic scene rotation.