File size: 3,248 Bytes
d8ab1df |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
UsdAppUtils module — pxr-usd-api 105.1 documentation
pxr-usd-api
»
Modules »
UsdAppUtils module
# UsdAppUtils module
Summary: The UsdAppUtils module contains a number of utilities and common functionality for applications that view and/or record images of USD stages.
Classes:
FrameRecorder
A utility class for recording images of USD stages.
class pxr.UsdAppUtils.FrameRecorder
A utility class for recording images of USD stages.
UsdAppUtilsFrameRecorder uses Hydra to produce recorded images of a
USD stage looking through a particular UsdGeomCamera on that stage at
a particular UsdTimeCode. The images generated will be effectively the
same as what you would see in the viewer in usdview.
Note that it is assumed that an OpenGL context has already been setup.
Methods:
GetCurrentRendererId()
Gets the ID of the Hydra renderer plugin that will be used for recording.
Record(stage, usdCamera, timeCode, ...)
Records an image and writes the result to outputImagePath .
SetColorCorrectionMode(colorCorrectionMode)
Sets the color correction mode to be used for recording.
SetComplexity(complexity)
Sets the level of refinement complexity.
SetImageWidth(imageWidth)
Sets the width of the recorded image.
SetIncludedPurposes(purposes)
Sets the UsdGeomImageable purposes to be used for rendering.
SetRendererPlugin(id)
Sets the Hydra renderer plugin to be used for recording.
GetCurrentRendererId() → str
Gets the ID of the Hydra renderer plugin that will be used for
recording.
Record(stage, usdCamera, timeCode, outputImagePath) → bool
Records an image and writes the result to outputImagePath .
The recorded image will represent the view from usdCamera looking
at the imageable prims on USD stage stage at time timeCode .
If usdCamera is not a valid camera, a camera will be computed to
automatically frame the stage geometry.
Returns true if the image was generated and written successfully, or
false otherwise.
Parameters
stage (Stage) –
usdCamera (Camera) –
timeCode (TimeCode) –
outputImagePath (str) –
SetColorCorrectionMode(colorCorrectionMode) → None
Sets the color correction mode to be used for recording.
By default, color correction is disabled.
Parameters
colorCorrectionMode (str) –
SetComplexity(complexity) → None
Sets the level of refinement complexity.
The default complexity is”low”(1.0).
Parameters
complexity (float) –
SetImageWidth(imageWidth) → None
Sets the width of the recorded image.
The height of the recorded image will be computed using this value and
the aspect ratio of the camera used for recording.
The default image width is 960 pixels.
Parameters
imageWidth (int) –
SetIncludedPurposes(purposes) → None
Sets the UsdGeomImageable purposes to be used for rendering.
We will always include”default”purpose, and by default, we will
also include UsdGeomTokens->proxy. Use this method to explicitly
enumerate an alternate set of purposes to be included along
with”default”.
Parameters
purposes (list[TfToken]) –
SetRendererPlugin(id) → bool
Sets the Hydra renderer plugin to be used for recording.
Parameters
id (str) –
© Copyright 2019-2023, NVIDIA.
Last updated on Nov 14, 2023.
|