The Reddit Gold Universe - Hanyu Liu (liuhanyu)

Inspiration

Live Demo Link

https://helenl9098.github.io/hw02-raymarching-sdfs/

Implementation Details

  • Geometry: The Reddit robot and its surrounding orbits are made up of SDFs, combined together using Intersection, Union, Smooth Blend, and Difference operations.

  • Animation: The robot is animated to bob up and down using a modified sin function. The scaling of the rings is animated using a modified sin function. The positional changes of the orbiting sphere is animated using a mod function on polar coordinates.

  • Texture / Shading: The gold texture / shading of the robot is made from cosine color curves determined from the normals of the SDF

  • Optimization: The scene is optimized using bounding volumes: the robot and the rings are each bound by their own bounding sphere. If the ray doesn't intersect with the bounding sphere, then it won't compute the SDF. If it intersects the bounding sphere, then it looks at the SDF of that sphere.

Modifiable Features

  • Sphere Stickiness: The blend factor of the spheres can be adjusted, making them look either softer or more solid

  • Bounce Speed: The bobbing speed of the Reddit robot can be adjusted, making him bounce faster or slower

External Resources