Alex's Blog

Version 0.0.4

Edge lines are often used in non-photorealistic art styles such as Cel Shading, but are often generated in post by detecting sharp colour gradients in the colour image.

random edge

The edge line pass of a scene described in Peter Shirley’s Ray Tracing in One Weekend containing randomly generated spheres.

Gaia generates it’s edge lines slightly differently. By using the algorithm outlined in this paper, which was presented at the 2009 International Symposium on Non-Photorealistic Animation and Rendering, gradients in the geometry are detected and drawn to a black and white edge line pass, as seen above, which can be composited with an RGB render to produce a final image.

random colour temp

A composite image of the edge line pass above with an RGB render.

The edge lines are produced by using a ‘ray stencil’, where additional rays are sent in concentric rings around a sample ray, returning the Object ID of the struck piece of geometry. If any of the stencil rays returns an Object ID different to that of the central sample ray, there is an edge present.

By increasing the number of additional rays, the quality of the edge lines will be increased, whereas increasing the radius of the ray stencil results in thicker edge lines being rendered.

Gaia currently does not support edge lines in reflections,  as seen in the composite image above, although this could be something I improve on in the future.

Release 0.0.4

Rendering methods:

  • Distributed (stochastic) path tracing
  • Monte Carlo path tracing (in-progress)
  • Edge Line pass (new)

Objects:

  • Spheres
  • Quads
  • Triangles (unstable)

Material BRDFs:

  • Ideal Lambertian, dielectric, metallic
  • Oren-Nayar reflectance model (buggy)
  • Blinn-Phong shading model (in-progress)
  • Diffuse area lights
  • Gooch shading

Acceleration structures:

  • In-core multithreading support

Output file types:

  • .hdr
  • .ppm

Next Post

Previous Post

© 2024 Alex's Blog

Theme by Anders Norén