CaptureOptions#
- class omni.kit.capture.viewport.CaptureOptions(
- camera='camera',
- range_type=CaptureRangeType.FRAMES,
- capture_every_nth_frames=-1,
- fps=24,
- start_frame=1,
- end_frame=48,
- start_time=0,
- end_time=2,
- res_width=1920,
- res_height=1080,
- render_preset=CaptureRenderPreset.PATH_TRACE,
- debug_material_type=CaptureDebugMaterialType.SHADED,
- spp_per_iteration=1,
- path_trace_spp=1,
- ptmb_subframes_per_frame=1,
- ptmb_fso=0.0,
- ptmb_fsc=1.0,
- output_folder='',
- file_name='Capture',
- file_name_num_pattern='.####',
- file_type='.png',
- save_alpha=False,
- hdr_output=False,
- show_pathtracing_single_frame_progress=False,
- preroll_frames=0,
- overwrite_existing_frames=False,
- movie_type=CaptureMovieType.SEQUENCE,
- sunstudy_start_time=0.0,
- sunstudy_current_time=0.0,
- sunstudy_end_time=0.0,
- sunstudy_movie_length_in_seconds=2,
- sunstudy_player=None,
- real_time_settle_latency_frames=0,
- renumber_negative_frame_number_from_0=False,
- render_product='',
- exr_compression_method='zips',
- mp4_encoding_bitrate=16777216,
- mp4_encoding_iframe_interval=60,
- mp4_encoding_preset='PRESET_DEFAULT',
- mp4_encoding_profile='H264_PROFILE_HIGH',
- mp4_encoding_rc_mode='RC_VBR',
- mp4_encoding_rc_target_quality=0,
- mp4_encoding_video_full_range_flag=False,
- app_level_capture=False,
- animation_fps=-1,
- rt_wait_for_render_resolve_in_seconds=-1,
- early_quit_time_limit_per_frame_in_minutes=-1,
Bases:
objectAll Capture options that will be used when capturing.
Note: When adding an attribute, make sure it is exposed via the constructor. Not doing so will cause errors when serializing and deserializing this object.
- Parameters:
camera (str) – The camera used for capture. Default goes to “camera”.
range_type (CaptureRangeType) – The capture range type. Default goes to CaptureRangeType.FRAMES.
capture_every_nth_frames (int) – The number of frames to capture every nth frame. Default goes to -1.
fps (int) – The frames per second to capture. Default goes to 24.
start_frame (int) – The start frame number, only available with CaptureRangeType.FRAMES. Default goes to 1.
end_frame (int) – The end frame number, only available with CaptureRangeType.FRAMES. Default goes to 48.
start_time (float) – The start time, only available with CaptureRangeType.SECONDS. Default goes to 0.
end_time (float) – The end time, only available with CaptureRangeType.SECONDS. Default goes to 2.
res_width (int) – The width of the capture resolution. Default goes to 1920.
res_height (int) – The height of the capture resolution. Default goes to 1080.
render_preset (CaptureRenderPreset) – The render preset to use. Default goes to CaptureRenderPreset.PATH_TRACE.
debug_material_type (CaptureDebugMaterialType) – The debug material type to use. Default goes to CaptureDebugMaterialType.SHADED.
spp_per_iteration (int) – The number of samples per pixel per iteration. Default goes to 1.
path_trace_spp (int) – The number of Path Tracing samples per pixel. Default goes to 1.
ptmb_subframes_per_frame (int) – The number of Path Tracing motion blur subframes per frame. Default goes to 1.
ptmb_fso (float) – The Path Tracing motion blur frame shutter open. Default goes to 0.0.
ptmb_fsc (float) – The Path Tracing motion blur frame shutter close. Default goes to 1.0.
output_folder (str) – The output folder. Default goes to “”.
file_name (str) – The file name. Default goes to “Capture”.
file_name_num_pattern (str) – The file name number pattern. Default goes to “.####”.
file_type (str) – The file type. Default goes to “.png”.
save_alpha (bool) – Whether to save the alpha channel. Default goes to False.
hdr_output (bool) – Whether to output an HDR image. Default goes to False.
show_pathtracing_single_frame_progress (bool) – Whether to show the Path Tracing single frame progress. Default goes to False.
preroll_frames (int) – The number of preroll frames. Default goes to 0.
overwrite_existing_frames (bool) – Whether to overwrite existing frame images. Default goes to False.
movie_type (CaptureMovieType) – The movie type. Default goes to CaptureMovieType.SEQUENCE.
sunstudy_start_time (float) – The start time of the sun study. Default goes to 0.0.
sunstudy_current_time (float) – The current time of the sun study. Default goes to 0.0.
sunstudy_end_time (float) – The end time of the sun study. Default goes to 0.0.
sunstudy_movie_length_in_seconds (float) – The length of the sun study movie. Default goes to 2.0.
sunstudy_player – The sun study player. Default goes to None.
real_time_settle_latency_frames (int) – The number of real time settle latency frames. Default goes to 0.
renumber_negative_frame_number_from_0 (bool) – Whether to renumber negative frame numbers from 0. Default goes to False.
render_product (str) – The render product used for capture. Default goes to “”.
exr_compression_method (str) – The compression method for EXR files. Default goes to “zips”.
mp4_encoding_bitrate (int) – The bitrate for MP4 encoding. Default goes to 16777216.
mp4_encoding_iframe_interval (int) – The interval for MP4 encoding. Default goes to 60.
mp4_encoding_preset (str) – The preset for MP4 encoding. Default goes to “PRESET_DEFAULT”.
mp4_encoding_profile (str) – The profile for MP4 encoding. Default goes to “H264_PROFILE_HIGH”.
mp4_encoding_rc_mode (str) – The rate control mode for MP4 encoding. Default goes to “RC_VBR”.
mp4_encoding_rc_target_quality (int) – The target quality for MP4 encoding. Default goes to 0.
mp4_encoding_video_full_range_flag (bool) – Whether to use full range video. Default goes to False.
app_level_capture (bool) – Whether to capture all scene elements. Default goes to False.
animation_fps (float) – The animation frames per second. Default goes to -1.
rt_wait_for_render_resolve_in_seconds (int) – The number of seconds to wait for the render resolve. Default goes to -1.
early_quit_time_limit_per_frame_in_minutes (int) – Capture time limitation for a single frame. Quit application if reached. Default goes to -1.
Methods
__init__([camera, range_type, ...])Initializes a new CaptureOptions instance with default capture properties.
from_dict(options)Creates a CaptureOptions instance from a dictionary.
Get full output path for video mode only.
Determines if capture is based on frame range.
Determines if capturing every nth frame is enabled.
Determines if capturing a single frame in Path Tracing mode.
Checks if capturing real time with render resolve waiting is enabled.
Determines if capturing a single frame is active, meaning video mode is off and nth frame capture is disabled.
is_valid()Check if the capture options are valid to start a capture.
is_video()Determines if the capture option is set to video mode.
to_dict()Converts the CaptureOptions to a dictionary of attribute names and values.
Attributes
INVALID_ANIMATION_FPSGets the animation frames per second.
Gets the flag to capture all scene elements.
Gets the camera used for capture.
Gets the capture_every_Nth_frames property.
Gets debug material type.
Gets the capture time limitation for a single frame.
Capture end frame number, only available with CaptureRangeType.FRAMES.
Capture end time, only available with CaptureRangeType.SECONDS.
Gets the compression method for EXR files.
Gets the file name.
Gets the file name number pattern.
Gets the file type.
Gets the fps property.
Gets the hdr output flag.
Gets the movie type.
Gets mp4_encoding_bitrate.
Gets mp4_encoding_iframe_interval.
Gets the mp4 encoding preset.
Gets the mp4 encoding profile.
Gets the mp4 encoding rate control mode.
Gets the mp4 encoding rate control target quality.
Gets the mp4 encoding video full range flag.
Gets output folder.
Gets the overwrite existing frame images flag.
Gets the number of Path Tracing samples per pixel.
Gets the number of preroll frames.
Gets the Path Tracing motion blur frame shutter close.
Gets the Path Tracing motion blur frame shutter open.
Gets the number of Path Tracing motion blur subframes per frame.
Gets the range_type property.
Gets the number of real time settle latency frames.
Gets render preset.
Gets the render product used for capture.
Gets the flag to renumber negative frame numbers from 0.
Gets resolution height.
Gets resolution width.
Gets the number of seconds to wait for render resolve.
Gets the save alpha flag.
Gets the show Path Tracing single frame progress flag.
Gets the number of samples per pixel per iteration.
Capture start frame number, only available with CaptureRangeType.FRAMES.
Capture start time, only available with CaptureRangeType.SECONDS.
Gets the current time of the sunstudy.
Gets the end time of the sunstudy.
Gets the length of the sunstudy movie in seconds.
Gets the sunstudy player object.
Gets the sunstudy start time.
- __init__(
- camera='camera',
- range_type=CaptureRangeType.FRAMES,
- capture_every_nth_frames=-1,
- fps=24,
- start_frame=1,
- end_frame=48,
- start_time=0,
- end_time=2,
- res_width=1920,
- res_height=1080,
- render_preset=CaptureRenderPreset.PATH_TRACE,
- debug_material_type=CaptureDebugMaterialType.SHADED,
- spp_per_iteration=1,
- path_trace_spp=1,
- ptmb_subframes_per_frame=1,
- ptmb_fso=0.0,
- ptmb_fsc=1.0,
- output_folder='',
- file_name='Capture',
- file_name_num_pattern='.####',
- file_type='.png',
- save_alpha=False,
- hdr_output=False,
- show_pathtracing_single_frame_progress=False,
- preroll_frames=0,
- overwrite_existing_frames=False,
- movie_type=CaptureMovieType.SEQUENCE,
- sunstudy_start_time=0.0,
- sunstudy_current_time=0.0,
- sunstudy_end_time=0.0,
- sunstudy_movie_length_in_seconds=2,
- sunstudy_player=None,
- real_time_settle_latency_frames=0,
- renumber_negative_frame_number_from_0=False,
- render_product='',
- exr_compression_method='zips',
- mp4_encoding_bitrate=16777216,
- mp4_encoding_iframe_interval=60,
- mp4_encoding_preset='PRESET_DEFAULT',
- mp4_encoding_profile='H264_PROFILE_HIGH',
- mp4_encoding_rc_mode='RC_VBR',
- mp4_encoding_rc_target_quality=0,
- mp4_encoding_video_full_range_flag=False,
- app_level_capture=False,
- animation_fps=-1,
- rt_wait_for_render_resolve_in_seconds=-1,
- early_quit_time_limit_per_frame_in_minutes=-1,
Initializes a new CaptureOptions instance with default capture properties.
- classmethod from_dict(options)#
Creates a CaptureOptions instance from a dictionary.
- Parameters:
cls (type) – Reference to the CaptureOptions class.
options (dict) – Dictionary containing capture option attributes.
- Returns:
New capture options instance.
- Return type:
- get_full_path() str#
Get full output path for video mode only.
- Returns:
Full output path if in video mode, or an empty string if not.
- Return type:
str
- is_capturing_frame() bool#
Determines if capture is based on frame range.
- Returns:
True if the range type is FRAMES, False otherwise.
- Return type:
bool
- is_capturing_nth_frames() bool#
Determines if capturing every nth frame is enabled.
- Returns:
True if capturing every nth frame is enabled, False otherwise.
- Return type:
bool
- is_capturing_pathtracing_single_frame() bool#
Determines if capturing a single frame in Path Tracing mode.
- Returns:
True if capturing a single frame in Path Tracing mode, False otherwise.
- Return type:
bool
- is_capturing_rt_with_render_resolve_waiting() bool#
Checks if capturing real time with render resolve waiting is enabled. It confirms that render preset is RAY_TRACE and waiting seconds is greater than 0.
- Returns:
True if render resolve waiting is active with real time capture, False otherwise.
- Return type:
bool
- is_capturing_single_frame() bool#
Determines if capturing a single frame is active, meaning video mode is off and nth frame capture is disabled.
- Returns:
True if capturing a single frame is active, False otherwise.
- Return type:
bool
- is_valid() bool#
Check if the capture options are valid to start a capture. * output folder and file name will NOT be fully checked here, as its hard to check things like permission at this time, thus we defer the check to them when we prepare folders for the capture and report errors for failures.
- Returns:
True if the capture options are valid, False otherwise.
- Return type:
bool
- is_video() bool#
Determines if the capture option is set to video mode.
- Returns:
True if file type is “.mp4”, False otherwise.
- Return type:
bool
- to_dict()#
Converts the CaptureOptions to a dictionary of attribute names and values.
- Returns:
Dictionary representation of capture options.
- Return type:
dict
- property animation_fps: float#
Gets the animation frames per second.
- Returns:
The current animation frames per second.
- Return type:
float
- property app_level_capture: bool#
Gets the flag to capture all scene elements.
- Returns:
The current flag to capture all scene elements.
- Return type:
bool
- property camera: str#
Gets the camera used for capture.
- Returns:
The camera value.
- Return type:
str
- property capture_every_Nth_frames: int#
Gets the capture_every_Nth_frames property.
- Returns:
The capture every nth frames value.
- Return type:
int
- property debug_material_type: CaptureDebugMaterialType#
Gets debug material type.
- Returns:
The current debug material type.
- Return type:
- property early_quit_time_limit_per_frame_in_minutes: int#
Gets the capture time limitation for a single frame.
- Returns:
The current capture time limitation for a single frame.
- Return type:
int
- property end_frame: int#
Capture end frame number, only available with CaptureRangeType.FRAMES.
- Returns:
Capture end frame number.
- Return type:
int
- property end_time: float#
Capture end time, only available with CaptureRangeType.SECONDS.
- Returns:
Capture end time.
- Return type:
float
- property exr_compression_method: str#
Gets the compression method for EXR files.
- Returns:
The current exr_compression_method.
- Return type:
str
- property file_name: str#
Gets the file name.
- Returns:
The file name.
- Return type:
str
- property file_name_num_pattern: str#
Gets the file name number pattern.
- Returns:
The file name number pattern.
- Return type:
str
- property file_type: str#
Gets the file type.
- Returns:
The file type.
- Return type:
str
- property fps: float#
Gets the fps property.
- Returns:
The fps value.
- Return type:
float
- property hdr_output: bool#
Gets the hdr output flag.
- Returns:
The current hdr output flag.
- Return type:
bool
- property movie_type: CaptureMovieType#
Gets the movie type.
- Returns:
The current movie type.
- Return type:
- property mp4_encoding_bitrate: int#
Gets mp4_encoding_bitrate.
- Returns:
The current mp4_encoding_bitrate.
- Return type:
int
- property mp4_encoding_iframe_interval: int#
Gets mp4_encoding_iframe_interval.
- Returns:
The current mp4_encoding_iframe_interval.
- Return type:
int
- property mp4_encoding_preset: str#
Gets the mp4 encoding preset.
- Returns:
The current mp4 encoding preset.
- Return type:
str
- property mp4_encoding_profile: str#
Gets the mp4 encoding profile.
- Returns:
The current mp4 encoding profile.
- Return type:
str
- property mp4_encoding_rc_mode: str#
Gets the mp4 encoding rate control mode.
- Returns:
The current mp4 encoding rate control mode.
- Return type:
str
- property mp4_encoding_rc_target_quality: int#
Gets the mp4 encoding rate control target quality.
- Returns:
The current mp4 encoding rate control target quality.
- Return type:
int
- property mp4_encoding_video_full_range_flag: bool#
Gets the mp4 encoding video full range flag.
- Returns:
The current state of the full range flag.
- Return type:
bool
- property output_folder: str#
Gets output folder.
- Returns:
The current output folder.
- Return type:
str
- property overwrite_existing_frames: bool#
Gets the overwrite existing frame images flag.
- Returns:
The current state of overwrite existing frame images flag.
- Return type:
bool
- property path_trace_spp: int#
Gets the number of Path Tracing samples per pixel.
- Returns:
The current path trace samples per pixel.
- Return type:
int
- property preroll_frames: int#
Gets the number of preroll frames.
- Returns:
The number of preroll frames.
- Return type:
int
- property ptmb_fsc: float#
Gets the Path Tracing motion blur frame shutter close.
- Returns:
The current Path Tracing motion blur frame shutter close.
- Return type:
float
- property ptmb_fso: float#
Gets the Path Tracing motion blur frame shutter open.
- Returns:
The current Path Tracing motion blur frame shutter open.
- Return type:
float
- property ptmb_subframes_per_frame: int#
Gets the number of Path Tracing motion blur subframes per frame.
- Returns:
The number of Path Tracing motion blur subframes per frame.
- Return type:
int
- property range_type: CaptureRangeType#
Gets the range_type property.
- Returns:
The range type.
- Return type:
- property real_time_settle_latency_frames: int#
Gets the number of real time settle latency frames.
- Returns:
The current number of real time settle latency frames.
- Return type:
int
- property render_preset: CaptureRenderPreset#
Gets render preset.
- Returns:
The current render preset.
- Return type:
- property render_product: str#
Gets the render product used for capture.
- Returns:
The current render product used for capture.
- Return type:
str
- property renumber_negative_frame_number_from_0: bool#
Gets the flag to renumber negative frame numbers from 0.
- Returns:
The current flag to renumber negative frame numbers from 0.
- Return type:
bool
- property res_height: int#
Gets resolution height.
- Returns:
The resolution height.
- Return type:
int
- property res_width: int#
Gets resolution width.
- Returns:
The resolution width.
- Return type:
int
- property rt_wait_for_render_resolve_in_seconds: int#
Gets the number of seconds to wait for render resolve.
- Returns:
The current number of seconds to wait for render resolve.
- Return type:
int
- property save_alpha: bool#
Gets the save alpha flag.
- Returns:
The current save alpha flag.
- Return type:
bool
- property show_pathtracing_single_frame_progress: bool#
Gets the show Path Tracing single frame progress flag.
- Returns:
The current state of Path Tracing single frame progress flag.
- Return type:
bool
- property spp_per_iteration: int#
Gets the number of samples per pixel per iteration.
- Returns:
The current samples per iteration.
- Return type:
int
- property start_frame: int#
Capture start frame number, only available with CaptureRangeType.FRAMES.
- Returns:
Capture start frame number.
- Return type:
int
- property start_time: float#
Capture start time, only available with CaptureRangeType.SECONDS.
- Returns:
Capture start time.
- Return type:
float
- property sunstudy_current_time: float#
Gets the current time of the sunstudy.
- Returns:
The current current time of the sunstudy.
- Return type:
float
- property sunstudy_end_time: float#
Gets the end time of the sunstudy.
- Returns:
The current end time of the sunstudy.
- Return type:
float
- property sunstudy_movie_length_in_seconds: float#
Gets the length of the sunstudy movie in seconds.
- Returns:
The current length of the sunstudy movie in seconds.
- Return type:
float
- property sunstudy_player#
Gets the sunstudy player object.
- Returns:
The current sunstudy player object.
- Return type:
any
- property sunstudy_start_time: float#
Gets the sunstudy start time.
- Returns:
The current sunstudy start time.
- Return type:
float