Rendering Worlds with Two Triangles

CS 184 Final Project Proposal

Grace Lightner (SID: 25140690)

Kasra Ferdowsifard (SID: 3033238080)

Yuxi Feng (SID: 3033533533)

Summary

In this project we are going to render scenes with only two triangles. Concretely, we are going to (1) represent geometries using distance fields, and (2) render the scenes in real time in a fragment shader.

Problem Description

All the assignment projects we have done so far are based on the model of traditional ray tracing, where the scenes are defined by explicit geometries, and where we do a series of geometric intersection tests to obtain the intersection between a ray and the scene. This method has following deficiencies:

Thus, in this project, we are going to follow Inigo Quilez’s method to render worlds using distance fields. This method is easy to set up, has compact code, and does not have the deficiencies listed above. The core challenging parts might be:

Goals and Deliverables

Baseline Plan

At minimum, we plan to render a real time scene in two triangles using the method of distance fields. It should:

  1. include basic primitives and operations,
  2. support surface normals computation,
  3. support moving the camera.

We should also provide a performance comparison between rendering a scene with the same geometries using this method and using the traditional ray tracing method.

Below are some example scenes that we should be able to render after achieving this.

This baseline plan is achievable since there are established tutorials and source codes that we will be able to refer to.

Our final deliverables for this baseline will be:

Aspirational Plan

Apart from the baseline plan, we can further:

  1. Create a desktop application as in previous projects using OpenGL.
  2. Add support for bump mapping, soft shadows, ambient occlusion. These lighting methods can add more details to our scene. We should be able to render the scene below after doing this.
  3. Add sound effects, as in this project. Note that this might be easier on shadertoy compared with on the local framework–in case we are doing all the stuff on the local framework and want to exploit some of Shadertoy’s features, we can simply create another shader on shadertoy since the code there should be a subset of the local code.
  4. Be artistic! Create new and beautiful scenes, as in this project.

In addition to all the deliverables in the baseline plan, deliverables we should achieve our aspirational plan will be:

Tentative Schedule

Week 1 (Mon. 4/2 – Sun. 4/8)

Baseline:

  • Set up the framework.
  • Support geometric primitives and operations.

Aspirational:

  • Set up the framework.
  • Support geometric primitives and operations.
  • Support normal estimation and moving camera.
  • Compare the performance between rendering with our method and with the traditional one.

Week 2 (Mon. 4/9 – Sun. 4/15)

Baseline:

  • Support normal estimation and moving camera.

Aspirational:

  • Support bump mapping.
  • Support soft shadows.
  • Support ambient occlusion.

Week 3 (Mon. 4/16 – Sun. 4/22)

Baseline:

  • Compare the performance between rendering with our method and with the traditional one.

Aspirational:

  • Add sound effects.
  • Create an artistic scene.

Week 4 (Mon. 4/23 – Sun. 4/29)

Baseline:

  • Polish things.

Aspirational:

  • Polish things.

Notes:

Resources

References:

Computing platform, hardware/software resources: