The visibility of any 3D object can be turned on and off using <node3d>.visible. An invisible object isn't removed from the scene, but can be revealed by again calling <node3d>.visible. You can also vary the transparency of an object by adjusting its alpha level with <node3d>.alpha . The lower the alpha level, the more light that will pass through the object. If you want to permanently remove an object entirely from the scene, use <node3d>.remove.
Here is a simple example showing how to toggle the visibility of a node using the space key:
When a node is invisible it will not take part in any scene graph operations, such as rendering, picking, intersection tests, and collisions. All children nodes will also be invisible. You can apply more fine grained control over the scene graph participation of a node using the various commands below.
If you would like disable the rendering of a node, but still have it participate in other operations (picking, collisions, etc..), you can disable viz.RENDERING:
You can even control whether the node renders to the left or right eye when running in stereo by using the viz.RENDER_RIGHT or viz.RENDER_LEFT flags:
or
You can prevent a node from participating in pick operations ( <window>.pick ), by disabling viz.PICKING:
You can prevent a node from participating in intersect tests ( <scene>.intersect ) or viewpoint collisions ( <view>.collision ), by disabling viz.INTERSECTION:
To prevent a node from participating in the physics simulation, disable viz.PHYSICS:
Disabling physics will have no effect if physics geometry has not been defined for the node.
In certain advanced cases you might want to disable a node from being rendered to the OpenGL color buffer or depth buffer. You can use the viz.COLOR_WRITE and viz.DEPTH_WRITE flags to control this behavior.
If you have created sub-windows with the <viz>.addWindow command, you can prevent a node from appearing in the window or have a node only appear in that window.
The <node3d>.renderToAllWindowsExcept command is used to specify a set of windows the node should not be rendered to:
Inversely, you can have the node only render to a specific set of windows using the <node3d>.renderOnlyToWindows command:
The same restrictions can be applied to render nodes by using the <node3d>.renderToAllRenderNodesExcept and <node3d>.renderOnlyToRenderNodes commands.
Texture appearance and filtering
Appearance & texturing command table