top of page
  • Writer's pictureFloney Yang

Ray Marching

Updated: Apr 19, 2021

This week I implemented a ray marching method using a shader that can easily manipulate the mesh renderer of different geometries. According to the concept of ray tracing, by computing and implementing the distance function for geometries, the ray marching method calculates the ray intersection for the camera to render 3D objects according to mapping pixels.

Following this interpretation, I added a 4th-dimensional variable w to the 3D coordinate system for each object and alternate the distance function for each object, so ideally it can fit with variables/rotation in the fourth dimension.

This technical experiment on shader programming with raymarching has boosted my confidence in reaching the research objective. My goal for this tech experiment is to find a way that visualizes and manipulates 4D shapes efficiently. I think based on this week's exploration of shaders, I believe this approach is more accessible for Unity game developers compared to procedurally generating tetrahedrons(which is the method used by Miegakura).

This video is showing a torus I implemented in Unity using the ray marching method. The torus is alternating shapes(showing different slices in 3D space) based on changes in the w variable.

Engine: Unity

Languages: C#, HLSL

Next steps:

1. Implementing distance function for 4D objects

2. Hyperbolic space

Learning resources:

bottom of page