simvx.core.render_view

RenderView: render the MAIN scene from a second camera into a texture.

Where :class:~simvx.core.SubViewport renders its own subtree with its own camera, a :class:RenderView renders the main scene tree through any

class:

~simvx.core.Camera3D placed in it. The rendered colour buffer is published as a bindless texture index via

attr:

RenderView.texture, sampled exactly like a SubViewport feed: pass the node as Material(albedo_map=render_view) for a security-monitor slab, as Sprite2D(texture=render_view) for a screen-space panel (a rear-view mirror, one half of a split screen), or read render_view.texture directly.

The render-to-texture integration is driven from the graphics backend (simvx.graphics.renderer.render_view.RenderViewManager); core stays rendering-agnostic. RenderViews are scheduled with the SubViewports by the

class:

~simvx.core.scene_target_graph.SceneTargetGraph, so a RenderView that samples another offscreen target (or feeds one) renders in producer-first order within the same frame; genuine cycles degrade to a one-frame lag on the broken edge, never an error.

Pipelined render mode (render_mode="pipelined") defers RenderView capture exactly like reflection-probe capture: the texture slot stays valid but never updates, and the backend logs a one-time warning.

Module Contents

Classes

RenderView

Renders the main scene from camera into an offscreen texture.

Data

API

simvx.core.render_view.log

‘getLogger(…)’

simvx.core.render_view.__all__

[‘RenderView’]

class simvx.core.render_view.RenderView(name='RenderView', **kwargs)[source]

Bases: simvx.core.graphics.texture_slot.TextureSlot, simvx.core.nodes_3d.node3d.Node3D

Renders the main scene from camera into an offscreen texture.

Unlike SubViewport this node has no offscreen subtree: its children (if any) are ordinary main-scene content, and the view it captures is the main world itself, seen from the Camera3D that camera points at. The referenced camera does not need to be (and normally is not) the scene’s active camera.

The capture is of the 3D world alone: 2D overlays are screen-space content that already drew for the main pass, not part of the world a second camera would see. Assign the node wherever a live feed is sampled – an albedo_map for a surface in the world, or Sprite2D.texture for a screen-space panel, which is what makes split screen a pair of RenderViews drawn side by side.

Properties: camera: Node path to the Camera3D to render from, resolved relative to this node (e.g. "../SecurityCam"). Empty or unresolvable paths skip rendering with a one-time warning. size: Offscreen target dimensions in pixels. render_target_update_mode: "always" (default, render every frame), "when_visible" (render only while this node is visible in the hierarchy), "once" (render a single frame then freeze), or "disabled" (never render; the slot stays valid but stale). Same name as SubViewport’s property for the same dial (the plain update_mode is taken: every Node carries the pause-processing update_mode). use_occlusion: Run the two-phase Hi-Z occlusion cull for this view’s own camera (desktop renderer; the web Hi-Z is single-phase and has no per-view hook yet). Off by default: an offscreen view is usually small enough that the occlusion pass costs more than it saves. In the pipelined render mode RenderView capture (and with it this cull) is deferred entirely, like probe capture.

Note: Avoid pointing camera at a surface that displays this RenderView’s own texture: sampling an image while rendering into it is a feedback loop the GPU does not order (the same caveat applies to a SubViewport showing its own feed). A Sprite2D showing the feed cannot cause it, since the capture is of the 3D world only and never of the 2D overlay.

Initialization

camera

‘NodePath(…)’

size

‘Property(…)’

render_target_update_mode

‘Property(…)’

use_occlusion

‘Property(…)’

property texture: int[source]

The rendered texture’s bindless index; -1 until first rendered.

property texture_size: tuple[int, int][source]

Pixel dimensions of the underlying render target.

resolve_camera() simvx.core.nodes_3d.camera.Camera3D | None[source]

Resolve :attr:camera to a live Camera3D, caching the result.

Mirrors RemoteTransform3D: re-resolves when the path changes or the cached node leaves the tree; warns once per distinct invalid path.

property texture_slot: int
publish_texture_slot(slot: int) None
publish_overlay_slot(slot: int) None
strict_errors: ClassVar[bool]

True

dev_checks: ClassVar[bool]

None

script_error_raised

‘Signal(…)’

dynamic: bool

False

visible

‘Property(…)’

update_mode

‘Property(…)’

__properties__: ClassVar[dict[str, simvx.core.descriptors.Property]]

None

classmethod __init_subclass__(**kwargs)
property name: str
property visible_in_tree: bool
reset_error() None
add_child(node: simvx.core.node.T) simvx.core.node.T
remove_child(node: simvx.core.node.Node) None
reparent(new_parent: simvx.core.node.Node)
node_at(path, default=_NO_DEFAULT)
find(target, *, direct: bool = False)
find_all(target, *, direct: bool = False)
expect(target, *, direct: bool = False)
ancestor(target)
walk(*, include_self: bool = True) collections.abc.Iterator[simvx.core.node.Node]
property path: str
property is_scene_root: bool
add_to_group(group: str)
remove_from_group(group: str)
is_in_group(group: str) bool
on_ready() None
on_enter_tree() None
on_exit_tree() None
on_update(dt: float) None
on_fixed_update(dt: float) None
on_draw(renderer) None
on_picked(event: simvx.core.events.InputEvent) None
on_unhandled_input(event: simvx.core.events.TreeInputEvent) None
start_coroutine(gen: simvx.core.descriptors.Coroutine) simvx.core.descriptors.CoroutineHandle
stop_coroutine(gen_or_handle)
queue_redraw() None
property render_dirty: bool
clear_children()
destroy()
property destroying: bool
call_deferred(method: collections.abc.Callable[..., Any], *args: Any) None
property app
property tree: simvx.core.scene_tree.SceneTree
property physics
property physics_2d
__getitem__(key: str)
classmethod get_properties() dict[str, simvx.core.descriptors.Property]
__repr__()
position

‘_SpatialVecProperty(…)’

rotation

‘Property(…)’

scale

‘_SpatialVecProperty(…)’

render_layer

‘Property(…)’

property rotation_degrees: simvx.core.math.types.Vec3
property world_position: simvx.core.math.types.Vec3
property world_rotation: simvx.core.math.types.Quat
property world_scale: simvx.core.math.types.Vec3
property forward: simvx.core.math.types.Vec3
property right: simvx.core.math.types.Vec3
property up: simvx.core.math.types.Vec3
translate(offset: tuple[float, float, float] | numpy.ndarray)
translate_global(offset: tuple[float, float, float] | numpy.ndarray)
rotate(axis: tuple[float, float, float] | numpy.ndarray, angle: float)
rotate_x(angle: float)
rotate_y(angle: float)
rotate_z(angle: float)
look_at(target: tuple[float, float, float] | numpy.ndarray, up=None)
face_along(forward: tuple[float, float, float] | numpy.ndarray, up: tuple[float, float, float] | numpy.ndarray | None = None) None
set_render_layer(index: int, enabled: bool = True) None
is_on_render_layer(index: int) bool
wrap_bounds(bounds: tuple[float, float, float] | numpy.ndarray, margin: float = 1.0)