polaris

command module
v0.0.0-...-e791307 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2023 License: MIT Imports: 4 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL