Brain Dump

Naive Ray Tracing

Tags
computer-graphics

A form of ray-tracing which for each incident ray recursively produces one (or more) output rays (that recursively produce more rays when meeting subsequent objects) until some recursive limit is reached.

This [see page 2, only] works between specular to specular light interaction. I.E. reflective surfaces.

See [see page 17, stages] and [see page 29, final-algorithm]. Requires:

  1. Initial ray direction
  2. Hidden surface removal
  3. Reflected and refracted rays
  4. Lighting model
  5. Shadows
  6. Recursion

The number of recursive steps alters the [see page 30, depth] to which reflected surfaces are perceivable. Note: The figure above and [see page 34, here] shows the affect of increasing the recursive depth on the final render.

Note: Reflected objects have no color, they simply bounce back any colors incident on them.

Warn: This form doesn't work with diffuse-to-diffuse reflection (only local diffuse) because we're only following a single reflection raw in the perfect mirror direction. It doesn't work with objects where intersected light is reflected in every direction.

Reflection and Refraction

Each time a ray is incident on an object it's both [see page 18, reflected] and [see page 20, refracted] depending on the medium.

Note: We [see page 22, disregard] the contribution of wavelength to the degree to which light is refracted is irrelevant.

Calculating a Final Lighting Value

For each intersection point we [see page 23, calculate]:

  1. A local light value using phong shading.
  2. A global light value based on the results of repeating this process on both the reflected and refracted rays.

We then return a weighted-sum of these values to calculate a final light value for an intersection point.

Note: The [see page 26, mix] of local and global components leads blurred-specular highlight (from the local-component) and perfect specular-reflection (from the global-component).

Shadows

Naive ray-tracing can use the same approach as Visible Surface Ray Tracing for shadows however you must account for a shadow produced by a translucent object (which still allows some light through).

Base Case

There're two general [see page 33, considerations]:

  1. When we've reached a certain number of recursive calls.
  2. When the contribution of the next recursive calls falls below a certain threshold.