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: object

All 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_path()

Get full output path for video mode only.

is_capturing_frame()

Determines if capture is based on frame range.

is_capturing_nth_frames()

Determines if capturing every nth frame is enabled.

is_capturing_pathtracing_single_frame()

Determines if capturing a single frame in Path Tracing mode.

is_capturing_rt_with_render_resolve_waiting()

Checks if capturing real time with render resolve waiting is enabled.

is_capturing_single_frame()

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_FPS

animation_fps

Gets the animation frames per second.

app_level_capture

Gets the flag to capture all scene elements.

camera

Gets the camera used for capture.

capture_every_Nth_frames

Gets the capture_every_Nth_frames property.

debug_material_type

Gets debug material type.

early_quit_time_limit_per_frame_in_minutes

Gets the capture time limitation for a single frame.

end_frame

Capture end frame number, only available with CaptureRangeType.FRAMES.

end_time

Capture end time, only available with CaptureRangeType.SECONDS.

exr_compression_method

Gets the compression method for EXR files.

file_name

Gets the file name.

file_name_num_pattern

Gets the file name number pattern.

file_type

Gets the file type.

fps

Gets the fps property.

hdr_output

Gets the hdr output flag.

movie_type

Gets the movie type.

mp4_encoding_bitrate

Gets mp4_encoding_bitrate.

mp4_encoding_iframe_interval

Gets mp4_encoding_iframe_interval.

mp4_encoding_preset

Gets the mp4 encoding preset.

mp4_encoding_profile

Gets the mp4 encoding profile.

mp4_encoding_rc_mode

Gets the mp4 encoding rate control mode.

mp4_encoding_rc_target_quality

Gets the mp4 encoding rate control target quality.

mp4_encoding_video_full_range_flag

Gets the mp4 encoding video full range flag.

output_folder

Gets output folder.

overwrite_existing_frames

Gets the overwrite existing frame images flag.

path_trace_spp

Gets the number of Path Tracing samples per pixel.

preroll_frames

Gets the number of preroll frames.

ptmb_fsc

Gets the Path Tracing motion blur frame shutter close.

ptmb_fso

Gets the Path Tracing motion blur frame shutter open.

ptmb_subframes_per_frame

Gets the number of Path Tracing motion blur subframes per frame.

range_type

Gets the range_type property.

real_time_settle_latency_frames

Gets the number of real time settle latency frames.

render_preset

Gets render preset.

render_product

Gets the render product used for capture.

renumber_negative_frame_number_from_0

Gets the flag to renumber negative frame numbers from 0.

res_height

Gets resolution height.

res_width

Gets resolution width.

rt_wait_for_render_resolve_in_seconds

Gets the number of seconds to wait for render resolve.

save_alpha

Gets the save alpha flag.

show_pathtracing_single_frame_progress

Gets the show Path Tracing single frame progress flag.

spp_per_iteration

Gets the number of samples per pixel per iteration.

start_frame

Capture start frame number, only available with CaptureRangeType.FRAMES.

start_time

Capture start time, only available with CaptureRangeType.SECONDS.

sunstudy_current_time

Gets the current time of the sunstudy.

sunstudy_end_time

Gets the end time of the sunstudy.

sunstudy_movie_length_in_seconds

Gets the length of the sunstudy movie in seconds.

sunstudy_player

Gets the sunstudy player object.

sunstudy_start_time

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:

CaptureOptions

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:

CaptureDebugMaterialType

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:

CaptureMovieType

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:

CaptureRangeType

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:

CaptureRenderPreset

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