Ray Marching

Ray marched motion capture animations.

Motion capture data rendered with a custom raymarching shader that allows nearby geometry to blend and deform.

Key Features

  • Ray marching
  • Ambient, diffuse and specular shading
  • Motion capture animation

Description

This was my submission for a class project in CSCI 4611: Programming Graphics and Games. The goal of this project was to animate characters (originally ants, now "amorphous humanoid blobs") using motion capture data. I expanded on this by developing a custom raymarching shader that could be used to render the characters and their environment such that their forms merge and deform as they make contact with each other and the ground.

Process

To render each "bone" of the motion capture skeleton data, I passed the bone's transformation matrix to the raymarching shader, and used that matrix to transform the SDF for a primitive shape such as a capsule or a rounded cone.

The bumpy ground plane was created by offsetting the SDF for a plane with sin and cosine values varying over time.

I then applied the smooth min operation to combine the SDF of each primitive and create the merge/deform effect that appears when objects collide with one another.

Ambient, diffuse and specular lighting was calculated by deriving the normal information of surfaces from the SDF using a simple forward difference.

Tools Used

Languages: C++, GLSL

Software: MinGfx