Vizard 8 » Command Index » Vizard objects » node3d » <node3d>.setRenderLimit
8.1

<node3d>.setRenderLimit

Set the render limit mode

<node3d>.setRenderLimit(  
mode  
)  
mode

Limit modes

viz.RENDER_LIMIT_NONE

There is no limit to how many times the node will be rendered. This is the default mode.

viz.RENDER_LIMIT_FRAME

The node will be rendered at most once per frame.

viz.RENDER_LIMIT_WINDOW

The node will be rendered at most once per window.

viz.RENDER_LIMIT_EXCLUDE_MAIN_PASS

The node will be excluded from the main render pass.

viz.RENDER_LIMIT_EXCLUDE_RENDER_NODE

The node will be excluded from render node passes.

Remarks

This command can be used to limit how many times a node is rendered per frame. It is mostly used with certain render to texture nodes to prevent unnecessary duplicate rendering per frame. The default mode is viz.RENDER_LIMIT_NONE.

Return Value

None

Example

import viz
viz.go()

viz.add('lab.osgb')

model = viz.add('beachball.osgb',pos=(0,1.8,2))

window1 = viz.addWindow(pos=(0,1),size=(0.25,0.25))
window2 = viz.addWindow(pos=(0.75,1),size=(0.25,0.25))

viz.MainWindow.stereo(viz.STEREO_HORZ)
window1.stereo(viz.STEREO_HORZ)
window2.stereo(viz.STEREO_HORZ)

import vizact
vizact.onkeydown('1',model.setRenderLimit,viz.RENDER_LIMIT_NONE)
vizact.onkeydown('2',model.setRenderLimit,viz.RENDER_LIMIT_FRAME)
vizact.onkeydown('3',model.setRenderLimit,viz.RENDER_LIMIT_WINDOW)

See also

<node3d>.renderOnlyToRenderNodes
<node3d>.renderOnlyToWindows
<node3d>.renderToAllRenderNodes
<node3d>.renderToAllRenderNodesExcept
<node3d>.renderToAllWindows
<node3d>.renderToAllWindowsExcept
<node3d>.renderToEye