User Tools

Site Tools


DzRenderer

Base class for all offline renderers.

More...

Inherits :

Inherited By : DzDelightRenderer, DzIrayRenderer and DzScriptedRenderer

Methods

Signals

voidaboutToRender ( DzRenderer renderer )
voidimagePrepared ( DzTexture img, String filename )
voidIPRRenderHandlerChanged ( DzRenderer renderer, iprrenderhandler_dz handler )
voidrendererModeChanged ( DzRenderer renderer )
voidrenderFinished ( DzRenderer renderer )
voidshapeRenderBeginning ( DzShape shape )
voidshapeRenderFinished ( DzShape shape )

Detailed Description

Implements a standard RenderMan interface for the scene to render itself through an offline renderer.

Methods


String : compileShader( String shaderPath )

Compiles the shader at the given path, if necessary, and returns the path to the compiled shader.

Parameter(s):

  • shaderPath - The path to the shader source to compile

Return Value:

  • The path to the compiled shader.

Boolean : customRender( DzRenderHandler handler, DzCamera camera, Array lights, Array nodes, DzRenderOptions opt )

Renders a custom set of items.

Parameter(s):

  • handler - The settings and handler for the render.
  • camera - The camera to render from.
  • lights - The list of lights for the render.
  • nodes - The list of items to be rendered.
  • opt - The options for this render.

Return Value:

  • true if rendering was successful. false if rendering was canceled by user or there were errors during the render.

DzNode : getCurrentNode()

Return Value:

  • The node that is currently being rendered.

iprrenderhandler_dz : getIPRRenderHandler()

Return Value:

  • The handler used for Interactive Progressive Rendering (IPR) on this renderer (if any). NULL if this renderer does not support IPR.

String : getName()

Return Value:

  • The name of this renderer.

DzCamera : getRenderCamera()

Return Value:

  • The camera being used for the render.

Since:

  • 4.11.0.119

DzRendererMode : getRendererMode()

Return Value:

  • The renderer mode (feature set) for this renderer.

String : getShaderCompilerPath()

Return Value:

  • The path to the utility that compiles shaders for the renderer.

String : getShaderExtension()

Return Value:

  • The file extension that this renderer uses for compiled shaders.

String : getShaderFileName( String shaderName )

Parameter(s):

  • shaderName - The shader name to get the filename for (e.g. “metal”).

Return Value:

  • The filename for the shader; the name of the shader with the shader extension for the renderer (e.g. “metal.sdl”).

DzShaderDescription : getShaderInfo( String shaderPath )

Gets the parameter information for the given shader.

Parameter(s):

  • shaderPath - The path to the compiled shader.

String : getShaderPath( String shaderName, Boolean withExtension=true )

Given a shader name (e.g. “metal”), looks in all the shader directories attempting to find the file for it.

Parameter(s):

  • shaderName - The shader name to get the path for.
  • withExtension - If true, the extension for the renderer is included in the return value.

Return Value:

  • The full path of the shader with the specified name (if found), otherwise an empty string.

Array : getShaderSearchPaths()

Return Value:

  • A list of paths which are used to search for shaders while rendering.

See Also:


String : getTextureUtilityPath()

Return Value:

  • The path to the utility that converts textures for the renderer.

Boolean : isRendering()

Return Value:

  • true if the application is currently rendering, otherwise false.

void : killRender()

Stops the render.


void : prepareImage( DzTexture img, String filename )

Called by the framework to prepare/convert an image into a format that this renderer can understand/use when rendering. In derived classes, the function should result in a new image file being generated along with a path that the renderer can use to refer to the file. If the image could not be converted or is not usable by this renderer, the returned string should be empty.

Parameter(s):

  • img - The DzTexture object for which the image is being prepared.
  • filename - The path to the original image file that needs to be processed.

See Also:


String : processShaderName( String shaderName )

Processes the given shader name into a form the renderer can use (i.e. appending file extensions, finding absolute paths, etc.).

Parameter(s):

  • shaderName - The shader name to process.

Boolean : render( DzRenderHandler handler, DzCamera camera, DzRenderOptions opt )

Render the current scene.

Parameter(s):

  • handler - Settings and handler for the render.
  • camera - Camera to render the scene from.
  • opt - Options for this render.

Return Value:

  • true if rendering was successful. false if rendering was canceled by user or there were errors during the render.

void : saveBakeImage( DzBakerOptions opt, Boolean wait )

Converts a .bake file into an image file.

Parameter(s):

  • opt - Shader baker options.
  • wait - If true, this method is exited only when the conversion has ended. If false the method returns immediately after starting conversion; the baker's saveFileFinished() slot will be invoked after the conversion finishes.

See Also:


void : setIPRRenderHandler( iprrenderhandler_dz handler )

Sets the handler used for Interactive Progressive Rendering (IPR) on this renderer.

Parameter(s):

  • handler - The render handler to set.

void : setRenderCamera( DzCamera camera )

Sets the camera being used for the render.

Parameter(s):

  • camera - The camera to set.

Since:

  • 4.11.0.119

void : stopBaking()

Stops an active baking operation, if possible.


Boolean : textureConvert( DzRenderHandler handler, DzCamera camera, textureconvertoroptions_dz opt )

Performs texture conversion.

Parameter(s):

  • handler - The render handler to use for the conversion.
  • camera - The camera to use for the conversion.
  • opt - The options to use in the conversion.

Return Value:

  • true if the conversion succeeds, false if the conversion is cancelled or in case of error.

Signals


void : aboutToRender( DzRenderer renderer )

Signature:“aboutToRender(DzRenderer*)”

Emitted just before the renderer begins rendering.

Parameter(s):

  • renderer - This renderer.

void : imagePrepared( DzTexture img, String filename )

Signature:“imagePrepared(const DzTexture*,const QString&)”

Emitted when the image preparation for img is finished.

Parameter(s):

  • img - The DzTexture object for which image preparation is complete.
  • filename - The path to the prepared image file to be associated with img.

void : IPRRenderHandlerChanged( DzRenderer renderer, iprrenderhandler_dz handler )

Signature:“IPRRenderHandlerChanged(DzRenderer*,DzIPRRenderHandler*)”

Emitted when the handler used for Interactive Progressive Rendering (IPR) on this renderer has changed.

Parameter(s):

  • renderer - The renderer for which the handler has changed.
  • handler - The new IPR render handler.

void : rendererModeChanged( DzRenderer renderer )

Signature:“rendererModeChanged(DzRenderer*)”

Emitted when the mode of this renderer has changed.

Parameter(s):

  • renderer - The renderer for which the mode has changed.

void : renderFinished( DzRenderer renderer )

Signature:“renderFinished(DzRenderer*)”

Emitted just after the renderer finishes rendering.

Parameter(s):

  • renderer - This renderer.

void : shapeRenderBeginning( DzShape shape )

Signature:“shapeRenderBeginning(DzShape*)”

Emitted when the renderer begins rendering a shape.

Parameter(s):

  • shape - The shape that rendering is beginning for.

void : shapeRenderFinished( DzShape shape )

Signature:“shapeRenderFinished(DzShape*)”

Emitted after the renderer finishes rendering a shape.

Parameter(s):

  • shape - The shape that rendering has finished for.