Skip to content

Latest commit

 

History

History
90 lines (72 loc) · 4.32 KB

README.md

File metadata and controls

90 lines (72 loc) · 4.32 KB

Polaris

Polaris is a path-tracer. All tooling is written in go while the actual path-tracing is performing using an opencl-based backend.

Feature list:

  • Read scene data from wavefront object and material files
    • Scenes can also be compiled into GPU-optimized format and stored as a compressed zip archive
  • Two-level BVH for intersection tests
    • separate BVH for each scene object
    • global BVH for the scene
  • Mesh instancing
  • Ray packet traversal for primary rays (based on this paper)
  • Layered materials
    • BxDF models: diffuse, conductor, dielectric, roughConductor, roughDielectric
    • Light dispersion
  • Manual texture management; texture size only limited by device memory
    • Bilinear filtering for texture samples
    • Support for most common image formats including openEXR and HDR/RGBE
  • Multiple importance sampling (MIS)
  • Russian roulette for path termination
  • HDR rendering
    • Simple Reinhard tone-mapping post-processing filter
  • Pluggable rendering backends
    • Opencl backend split into multiple kernels allowing quick implementation of new features (eg. better camera or MIS/RIS for light selection)
    • Allows implementation of network backend to support multi-node multi-gpu rendering
  • Multi-device rendering
    • Single frame rendering
    • Interactive opengl-based renderer
    • Pluggable block scheduling algorithms (naive, perfect)

Getting started

Download and build polaris

go get -v github.com/achilleasa/polaris
cd $GOPATH/github.com/achilleasa/polaris
go build

For a single frame render run:

./polaris render single -width 512 -height 512 -spp 128 -out frame.png https://raw.githubusercontent.com/achilleasa/polaris-example-scenes/master/sphere/sphere.obj

For an interactive render run:

./polaris render interactive -width 512 -height 512 -blacklist CPU https://raw.githubusercontent.com/achilleasa/polaris-example-scenes/master/sphere/sphere.obj

While in interactive mode you can:

  • Click and drag mouse to pan camera
  • Use the arrow keys to move around (press shift to double your move speed)
  • Press TAB to display information about the block allocations between the available opencl devices.

If polaris cannot find any opencl devices it can use it will fail with an error message. In that case you can still run the above examples by removing the -blacklist CPU argument. For the complete list of CLI commands type polaris -h or check the CLI docs.

Here is an example of polaris running in interactive mode:

interactive rendering demo

Example renders

You can find some example test scenes at the polaris-example-scenes repo. You can either checkout the repo locally or just pass a raw GH URL to the scene .obj file when invoking polaris. In the latter case, polaris will detect that the scene is being served by a remote host and adjust all relative resource paths accordingly.

Here are some example materials rendered by polaris. The mitsuba and cornell box models were obtained from McGuire2011.

example renders

License

polaris is distributed under the MIT license.

Resources