Skip to content

Repository files navigation

Virtual Rendering Engine

A Java ray tracer supporting recursive Phong shading, BVH acceleration, soft shadows, depth of field, and glossy reflection/refraction, with scenes defined declaratively in XML or JSON.

Authors: Matt Kuperwasser and Moshe Hanau.

Gallery

Cornell Box Crystal cluster
Texture showcase Garden patio showcase
Landscape showcase Blur and Gloss showcase

Features

  • Recursive Phong shading (emission, ambient, diffuse, specular, shadows, reflection, refraction)
  • Geometric primitives: sphere, plane, triangle, polygon, cylinder, tube
  • BVH acceleration with SAH-based splitting
  • Anti-aliasing / soft shadows / depth of field via adaptive beam sampling
  • Scene definition via XML or JSON
  • Multi-threaded rendering
  • A simple Swing GUI for launching and viewing renders

Build / test / run

The project builds with Maven (pom.xml).

  • mvn test — compile and run the fast unit/component/integration tests
  • mvn test -Dgroups=render -DexcludedGroups= — run only the slow render/image-generation tests (writes to images/)
  • mvn test -DexcludedGroups= — run everything, including renders
  • mvn compile — compile only
  • mvn exec:java — launch the GUI (gui.RenderApp)

Architecture

  • primitivesPoint, Vector, Ray, Color, Double3, Material, Util
  • geometriesIntersectable, Geometry, and implementations (Sphere, Plane, Triangle, Polygon, Cylinder, Tube, Geometries)
  • lightingLightSource, AmbientLight, DirectionalLight, PointLight, SpotLight
  • sceneScene, SceneLoader, XmlSceneLoader, JsonSceneLoader
  • rendererCamera, ImageWriter, RayTracerBase, SimpleRayTracer, BeamSampler, PixelManager
  • guiRenderApp/RenderWindow, a Swing front end for launching and viewing scenes

Scene definitions live under sceneSourceFiles/{xml,json}/; rendered output is written to images/.

Dependencies

About

Java ray tracer with recursive Phong shading, SAH-based BVH acceleration, soft shadows, depth of field, and glossy reflection/refraction. Scenes defined via XML/JSON, multi-threaded rendering, Swing GUI viewer.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages