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.Camera3Dplaced in it (design D6, render_modernization.md). The rendered colour buffer is published as a bindless texture index via- attr:
RenderView.texture, sampled exactly like a SubViewport feed: pass the node asMaterial(albedo_map=render_view)for a security-monitor slab, or readrender_view.texturedirectly.
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¶
Renders the main scene from |
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.nodes_3d.node3d.Node3DRenders the main scene from
camerainto an offscreen texture.Unlike
SubViewportthis 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 theCamera3Dthatcamerapoints at. The referenced camera does not need to be (and normally is not) the scene’s active camera.Properties: camera: Node path to the
Camera3Dto 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 asSubViewport’s property for the same dial (the plainupdate_modeof design D6 is taken: everyNodecarries the pause-processingupdate_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
cameraat 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).Initialization
- camera¶
‘NodePath(…)’
- size¶
‘Property(…)’
- render_target_update_mode¶
‘Property(…)’
- use_occlusion¶
‘Property(…)’
- resolve_camera() simvx.core.nodes_3d.camera.Camera3D | None[source]¶
Resolve :attr:
camerato a liveCamera3D, caching the result.Mirrors
RemoteTransform3D: re-resolves when the path changes or the cached node leaves the tree; warns once per distinct invalid path.
- 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)¶
- strict_errors: ClassVar[bool]¶
True
- script_error_raised¶
‘Signal(…)’
- dynamic: bool¶
False
- classmethod __init_subclass__(**kwargs)¶
- property name: str¶
- property update_mode: simvx.core.descriptors.UpdateMode¶
- property visible: bool¶
- reset_error() None¶
- add_child(node: simvx.core.node.Node) simvx.core.node.Node¶
- remove_child(node: simvx.core.node.Node)¶
- reparent(new_parent: simvx.core.node.Node)¶
- get_node(path: str) simvx.core.node.Node¶
- get_node_or_none(path: str) simvx.core.node.Node | None¶
- find(target, *, direct: bool = False)¶
- find_all(target, *, direct: bool = False)¶
- walk(*, include_self: bool = True) collections.abc.Iterator[simvx.core.node.Node]¶
- property path: str¶
- 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()¶
- 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__()¶