Our goal is to implement a ray marching shader to render primitive shapes as well as more complex scenes (such as landscapes) in real time. Ray marching is a technique for rendering that is somewhat like an accelerated version of ray tracing in which rays are iteratively traversed, where step size is the minimum distance between a given point on a ray to the nearest surface. Our end goal is to create a fully generative terrain with objects such as trees and clouds, inspired by Inigo Quilez’ youtube video.
Here are some example scenes that we would like to attempt to recreate, in particular the generative geometry.
How can we render 3D scenes in real-time using ray marching on the GPU? How can we use math equations to generate geometry and shapes in 3D, as opposed to using vertex data?
What we plan to deliver:
Rendering simple shapes using Signed Distance Functions
Implementing materials/textures to make everything look not grayscale
Rendering some sorta landscape (mountains with trees, clouds, a desert)
Fog
Ambient occlusion
What we hope to deliver (stretch goals):
Multiple large scenes/terrains of different types
Ray marched fractals?
Measurement for quality/performance: FPS, testing balance between render speed and ray marching quality (max iterations, minimum distance, etc)
Week 1: implement basic ray marching engine for primitive shapes with signed distance functions
Week 2: Test more advanced techniques, such as boolean operations (subtract, intersect, smooth union, etc), as well as materials
Week 3: Begin modeling small objects (trees?), as well as larger scenes (terrain), clouds
Week 4: Finish creating the final world. Optionally play around with fractals, if there’s time
Resources:
Shader toy (web) (GLSL)
The art of coding: Ray marching for dummies https://youtu.be/PGtv-dBi2wE?si=eq6fHAPdJxOGGiHY
Fractals: https://iquilezles.org/articles/menger/
Sebastian Lague: raymarching https://youtu.be/Cp5WWtMoeKg?si=B6GKcSBoAsbXe1sa
Book of shaders for tutorials on shaders https://thebookofshaders.com/