NVIDIAGameWorks / kaolin-wisp

NVIDIA Kaolin Wisp is a PyTorch library powered by NVIDIA Kaolin Core to work with neural fields (including NeRFs, NGLOD, instant-ngp and VQAD).
Other
1.46k stars 131 forks source link

Default RayTracedRenderer #103

Closed orperel closed 1 year ago

orperel commented 1 year ago

In Wisp, objects displayed on the interactive visualizer canvas are represented by BottomLevelRenderer instances. For neural fields, this means a BottomLevelRenderer represents a pair of neural field & tracer.

NeuralRadianceFieldPackedRenderer, for example, registers @field_renderer(BaseNeuralField, PackedRFTracer), so any neural field traceable by PackedRFTracer is supported by it. Before this PR, adding a new subclass of BaseTracer (not a subclass of PackedRFTracer) would mean one had to also implement a corresponding BottomLevelRenderer to display that object.

With this PR, any BaseNeuralField + BaseTracer subclasses combo that did not register a @field_renderer would automatically use the default renderer:RayTracedRenderer.

Note that specialized Renderers may still be required for:

  1. Defining optimal conditions of when the object should be refreshed / redrawn
  2. Painting additional data layers
  3. Defining custom behavior for interactive mode / pre-render / post-render.

Signed-off-by: operel operel@nvidia.com