NyxCameraOptions#
- class gs_nyx_plugin.nyx_camera_options.NyxCameraOptions(*args, **kwargs)[source]#
Bases:
NyxCameraSensorOptions for the Nyx Camera Sensor plugin.
Inherits from BaseCameraOptions which provides: - res, pos, lookat, up, fov, lights, offset_T (from BaseCameraOptions) - entity_idx, link_idx_local, pos_offset, euler_offset (from RigidSensorOptionsMixin)
Nyx-specific parameters are defined below.
- Parameters:
model (Literal) – Camera model: “pinhole”. Default is “pinhole”.
spp (PositiveInt) – Samples per pixel for path tracing. Default is 16.
denoise (bool) – Whether to apply denoising. Default is True.
near (PositiveFloat) – Near clipping plane distance. Default is 0.1.
far (PositiveFloat) – Far clipping plane distance. Default is 100.0.
render_mode (ERenderMode) – Rendering mode for Nyx. Default is
FastPathTracer.debug_view (EDebugView) – Debug view mode for Nyx. Default is
Meshlet.anti_aliasing (EAntiAliasing) – Anti-aliasing technique. Default is
SMAA.camera_profile (str, optional) – Path of a camera profile file (lens, sensor and tone mapping). When
None(default) a profile is built fromfovwith Reinhard tone mapping; when provided,fovis ignored since it lives in the profile.open_window (bool) – Whether to open a GUI window. Default is False.
window_size (PositiveVec2IType) – Window size if open_window is enabled. Default is (1920, 1080).
gpu_vendor (EGPUVendor, optional) – Vendor of the GPU Nyx renders on, for machines with several GPUs. The compute side (CUDA or HIP torch) is paired with that GPU, so it must be one torch can drive.
None(default) picks the GPU with the most memory.args (Any)
kwargs (Any)
- Return type:
Any
Methods
Attributes
Subpixel Morphological Anti-Aliasing.
Per-meshlet color.
Real-time biased path tracer.
Example
A Nyx camera is declared with the same fields as a Genesis camera plus the
renderer-specific ones. Two of them are new in gs-nyx-plugin 0.1.10:
gpu_vendor selects which GPU the shared renderer runs on (it must be one
your CUDA or ROCm torch build can drive), and camera_profile replaces the
former tone_mapper field with a full lens / sensor / colour profile:
import gs_nyx.nyx_py_renderer as npr
import gs_nyx.nyx_py_sdk as nps
from gs_nyx_plugin.nyx_camera_options import NyxCameraOptions
cam = scene.add_sensor(NyxCameraOptions(
res = (1280, 720),
pos = (-1.0, 1.0, 1.2),
lookat = (0.0, 0.0, 0.1),
spp = 32,
denoise = True,
render_mode = npr.ERenderMode.FastPathTracer,
anti_aliasing = nps.EAntiAliasing.SMAA,
gpu_vendor = nps.EGPUVendor.AMD, # render on the AMD GPU (ROCm torch)
camera_profile = "profiles/sony_a7_r5_24mm.json",
))
Note
gpu_vendor is read from the first Nyx sensor added to the scene and
applies to every Nyx camera, since they share one renderer. None (the
default) picks the GPU with the most memory. When camera_profile is
set, fov is ignored and a warning is printed if both are given.