Skip to content

neraulgraphics 0.3.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 21:38
· 25 commits to main since this release

Triangle meshes and dynamic scenes.

Added

  • Apache-2.0 license.
  • Triangle meshes. Mesh is geometry, built into a BVH once; Instance places a
    mesh with its own Transform and Material. The number of instances is not
    capped, unlike spheres. Pass them to Renderer(..., meshes, instances).
  • Renderer::set_instance_transforms() (Python: an (N, 3, 4) array or a list of
    Transform) moves instances without touching the meshes. The tree over
    instances is refitted in place and rebuilt only when it has loosened too far.
  • make_transform (position, (x, y, z, w) quaternion, scale), make_box and
    make_icosphere, in C++ and Python.
  • make raytracer builds the viewer and links it as ./raytracer; make run
    and make test do the obvious. The viewer takes --instances N to spawn
    spinning shapes.

Known limits

  • Triangles are shaded flat, with no vertex normals or textures.
  • Updating instances runs on the CPU: about 9 ms for 10,000 and 90 ms for 100,000.
  • Ray-triangle tests are not watertight along an exact shared edge.