All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdEmbreeRenderer Class Referencefinal

HdEmbreeRenderer implements a renderer on top of Embree's raycasting abilities. More...

Public Member Functions

 HdEmbreeRenderer ()
 Renderer constructor. More...
 
 ~HdEmbreeRenderer ()
 Renderer destructor. More...
 
void SetScene (RTCScene scene)
 Set the embree scene that this renderer should raycast into. More...
 
void SetViewport (unsigned int width, unsigned int height)
 Specify a new viewport size for the sample/color buffer. More...
 
void SetCamera (const GfMatrix4d &viewMatrix, const GfMatrix4d &projMatrix)
 Set the camera to use for rendering. More...
 
void SetAovBindings (HdRenderPassAovBindingVector const &aovBindings)
 Set the aov bindings to use for rendering. More...
 
HdRenderPassAovBindingVector
const & 
GetAovBindings () const
 Get the aov bindings being used for rendering. More...
 
void SetSamplesToConvergence (int samplesToConvergence)
 Set how many samples to render before considering an image converged. More...
 
void SetAmbientOcclusionSamples (int ambientOcclusionSamples)
 Set how many samples to use for ambient occlusion. More...
 
void SetEnableSceneColors (bool enableSceneColors)
 Sets whether to use scene colors while rendering. More...
 
void Render (HdRenderThread *renderThread)
 Rendering entrypoint: add one sample per pixel to the whole sample buffer, and then loop until the image is converged. More...
 
void Clear ()
 Clear the bound aov buffers (typically before rendering). More...
 
void MarkAovBuffersUnconverged ()
 Mark the aov buffers as unconverged. More...
 
int GetCompletedSamples () const
 Get the number of samples completed so far. More...
 

Detailed Description

HdEmbreeRenderer implements a renderer on top of Embree's raycasting abilities.

This is currently a very simple renderer. It breaks the framebuffer into tiles for multithreading; sends out jittered camera rays; and implements the following shading:

  • Colors via the "color" primvar.
  • Lighting via N dot Camera-ray, simulating a point light at the camera origin.
  • Ambient occlusion.

Definition at line 54 of file renderer.h.

Constructor & Destructor Documentation

Renderer constructor.

Renderer destructor.

Member Function Documentation

void Clear ( )

Clear the bound aov buffers (typically before rendering).

HdRenderPassAovBindingVector const& GetAovBindings ( ) const
inline

Get the aov bindings being used for rendering.

Returns
the current aov bindings.

Definition at line 82 of file renderer.h.

int GetCompletedSamples ( ) const

Get the number of samples completed so far.

void MarkAovBuffersUnconverged ( )

Mark the aov buffers as unconverged.

void Render ( HdRenderThread renderThread)

Rendering entrypoint: add one sample per pixel to the whole sample buffer, and then loop until the image is converged.

After each pass, the image will be resolved into a color buffer.

Parameters
renderThreadA handle to the render thread, used for checking for cancellation and locking the color buffer.
void SetAmbientOcclusionSamples ( int  ambientOcclusionSamples)

Set how many samples to use for ambient occlusion.

Parameters
ambientOcclusionSamplesHow many samples are needed for ambient occlusion? 0 = disable.
void SetAovBindings ( HdRenderPassAovBindingVector const &  aovBindings)

Set the aov bindings to use for rendering.

Parameters
aovBindingsA list of aov bindings.
void SetCamera ( const GfMatrix4d viewMatrix,
const GfMatrix4d projMatrix 
)

Set the camera to use for rendering.

Parameters
viewMatrixThe camera's world-to-view matrix.
projMatrixThe camera's view-to-NDC projection matrix.
void SetEnableSceneColors ( bool  enableSceneColors)

Sets whether to use scene colors while rendering.

Parameters
enableSceneColorsWhether drawing should sample color, or draw everything as white.
void SetSamplesToConvergence ( int  samplesToConvergence)

Set how many samples to render before considering an image converged.

Parameters
samplesToConvergenceHow many samples are needed, per-pixel, before the image is considered finished.
void SetScene ( RTCScene  scene)

Set the embree scene that this renderer should raycast into.

Parameters
sceneThe embree scene to use.
void SetViewport ( unsigned int  width,
unsigned int  height 
)

Specify a new viewport size for the sample/color buffer.

Parameters
widthThe new viewport width.
heightThe new viewport height.

The documentation for this class was generated from the following file: