13#ifndef vtkOSPRayRendererNode_h
14#define vtkOSPRayRendererNode_h
21#include "vtkRenderingRayTracingModule.h"
25#ifdef VTKOSPRAY_ENABLE_DENOISER
26#include <OpenImageDenoise/oidn.hpp>
29VTK_ABI_NAMESPACE_BEGIN
36class vtkOSPRayRendererNodeInternals;
49 void Build(
bool prepass)
override;
64 virtual void WriteLayer(
unsigned char* buffer,
float* zbuffer,
int buffx,
int buffy,
int layer);
313 virtual void*
GetBuffer() {
return this->Buffer.data(); }
415 bool UseBackplate{
true };
424#ifdef VTKOSPRAY_ENABLE_DENOISER
425 oidn::DeviceRef DenoiserDevice;
426 oidn::FilterRef DenoiserFilter;
428 bool DenoiserDirty{
true };
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
temporal cache ospray structures to speed flipbooks
a collection of materials for vtk apps to draw from
links vtkRenderers to OSPRay
static void SetMaxFrames(int, vtkRenderer *renderer)
When present on renderer, controls the number of ospray render calls for each refresh.
static double GetVarianceThreshold(vtkRenderer *renderer)
Convenience method to set/get VARIANCE_THRESHOLD on a vtkRenderer.
static void SetRendererType(std::string name, vtkRenderer *renderer)
Set the OSPRay renderer type to use (e.g.
static vtkOSPRayRendererNode * GetRendererNode(vtkViewNode *)
Convenience method to get and downcast renderable.
std::vector< osp::vec3f > NormalBuffer
std::vector< float > Buffer
RTW::Backend * GetBackend()
static void SetAmbientSamples(int, vtkRenderer *renderer)
Convenience method to set/get AMBIENT_SAMPLES on a vtkRenderer.
virtual float * GetZBuffer()
Get the last rendered ZBuffer.
static int GetRouletteDepth(vtkRenderer *renderer)
Convenience method to set/get ROULETTE_DEPTH on a vtkRenderer.
void Build(bool prepass) override
Builds myself.
static void SetCompositeOnGL(int, vtkRenderer *renderer)
Convenience method to set/get COMPOSITE_ON_GL on a vtkRenderer.
static void SetVolumeSamplingRate(double, vtkRenderer *renderer)
Convenience method VOLUME_SAMPLING_RATE on a vtkRenderer.
~vtkOSPRayRendererNode() override
virtual int GetColorBufferTextureGL()
OSPRenderer GetORenderer()
Methods for other nodes to access.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::vector< OSPVolumetricModel > VolumetricModels
std::vector< OSPInstance > Instances
static int GetAmbientSamples(vtkRenderer *renderer)
Convenience method to set/get AMBIENT_SAMPLES on a vtkRenderer.
static void SetMaterialLibrary(vtkOSPRayMaterialLibrary *, vtkRenderer *renderer)
Convenience method to set/get Material library on a renderer.
static void SetVarianceThreshold(double, vtkRenderer *renderer)
Convenience method to set/get VARIANCE_THRESHOLD on a vtkRenderer.
static void SetEastPole(double *, vtkRenderer *renderer)
Convenience method to set/get EAST_POLE on a vtkRenderer.
static void SetMaxContribution(double, vtkRenderer *renderer)
Convenience method to set/get MAX_CONTRIBUTION on a vtkRenderer.
static void SetMaxDepth(int, vtkRenderer *renderer)
Convenience method to set/get MAX_DEPTH on a vtkRenderer.
static double GetMaxContribution(vtkRenderer *renderer)
Convenience method to set/get MAX_CONTRIBUTION on a vtkRenderer.
vtkOSPRayRendererNodeInternals * Internal
static int GetTimeCacheSize(vtkRenderer *renderer)
Convenience method to set/get TIME_CACHE_SIZE on a vtkRenderer.
static void SetMinContribution(double, vtkRenderer *renderer)
Convenience method to set/get MIN_CONTRIBUTION on a vtkRenderer.
static int GetMaxFrames(vtkRenderer *renderer)
When present on renderer, controls the number of ospray render calls for each refresh.
std::vector< float > ODepthBuffer
static int GetMaxDepth(vtkRenderer *renderer)
Convenience method to set/get MAX_DEPTH on a vtkRenderer.
static vtkInformationIntegerKey * BACKGROUND_MODE()
Control use of the path tracer backplate and environmental background.
static BackgroundMode GetBackgroundMode(vtkRenderer *renderer)
Control use of the path tracer backplate and environmental background.
static double GetViewTime(vtkRenderer *renderer)
Convenience method to set/get VIEW_TIME on a vtkRenderer.
static double * GetEastPole(vtkRenderer *renderer)
Convenience method to set/get EAST_POLE on a vtkRenderer.
std::vector< OSPLight > Lights
static std::string GetRendererType(vtkRenderer *renderer)
Set the OSPRay renderer type to use (e.g.
vtkOSPRayCache< vtkOSPRayCacheItemObject > * Cache
static void SetDenoiserThreshold(int, vtkRenderer *renderer)
Convenience method to set/get DENOISER_THRESHOLD on a vtkRenderer.
static double GetVolumeSamplingRate(vtkRenderer *renderer)
Convenience method VOLUME_SAMPLING_RATE on a vtkRenderer.
std::vector< float > ZBuffer
virtual void WriteLayer(unsigned char *buffer, float *zbuffer, int buffx, int buffy, int layer)
Put my results into the correct place in the provided pixel buffer.
virtual void * GetBuffer()
Get the last rendered ColorBuffer.
static double GetMinContribution(vtkRenderer *renderer)
Convenience method to set/get MIN_CONTRIBUTION on a vtkRenderer.
std::set< OSPWorld > CacheContents
virtual int GetDepthBufferTextureGL()
std::vector< osp::vec3f > AlbedoBuffer
void AddLight(OSPLight light)
void Render(bool prepass) override
Traverse graph in ospray's preferred order and render.
static vtkOSPRayMaterialLibrary * GetMaterialLibrary(vtkRenderer *renderer)
Convenience method to set/get Material library on a renderer.
vtkMTimeType AccumulateTime
static int GetSamplesPerPixel(vtkRenderer *renderer)
Convenience method to set/get SAMPLES_PER_PIXEL on a vtkRenderer.
std::vector< osp::vec4f > ColorBuffer
static void SetNorthPole(double *, vtkRenderer *renderer)
Convenience method to set/get NORTH_POLE on a vtkRenderer.
static double * GetNorthPole(vtkRenderer *renderer)
Convenience method to set/get NORTH_POLE on a vtkRenderer.
static void SetRouletteDepth(int, vtkRenderer *renderer)
Convenience method to set/get ROULETTE_DEPTH on a vtkRenderer.
static int GetCompositeOnGL(vtkRenderer *renderer)
Convenience method to set/get COMPOSITE_ON_GL on a vtkRenderer.
void Traverse(int operation) override
static vtkOSPRayRendererNode * New()
static void SetViewTime(double, vtkRenderer *renderer)
Convenience method to set/get VIEW_TIME on a vtkRenderer.
void Invalidate(bool prepass) override
Invalidates cached rendering data.
static void SetSamplesPerPixel(int, vtkRenderer *renderer)
Convenience method to set/get SAMPLES_PER_PIXEL on a vtkRenderer.
std::vector< osp::vec4f > DenoisedBuffer
void Denoise()
Denoise the colors stored in ColorBuffer and put into Buffer.
std::vector< OSPGeometricModel > GeometricModels
static int GetDenoiserThreshold(vtkRenderer *renderer)
Convenience method to set/get DENOISER_THRESHOLD on a vtkRenderer.
static void SetTimeCacheSize(int, vtkRenderer *renderer)
Convenience method to set/get TIME_CACHE_SIZE on a vtkRenderer.
vtkMatrix4x4 * AccumulateMatrix
vtkRenderer * GetRenderer()
static void SetBackgroundMode(BackgroundMode, vtkRenderer *renderer)
Control use of the path tracer backplate and environmental background.
vtkViewNode specialized for vtkRenderers
abstract specification for renderers
a node within a VTK scene graph
vtkTypeUInt32 vtkMTimeType