Loading...
Searching...
No Matches
HdPrmanCamera Class Referencefinal

A representation for cameras that pulls on camera parameters used by Riley cameras. More...

#include <camera.h>

+ Inheritance diagram for HdPrmanCamera:

Classes

struct  ShutterCurve
 See GetShutterCurve() below for a description of what these values represent. More...
 

Public Member Functions

HDPRMAN_API HdPrmanCamera (SdfPath const &id)
 
HDPRMAN_API void Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
 Synchronizes state from the delegate to this object.
 
HDPRMAN_API HdTimeSampleArray< GfMatrix4d, HDPRMAN_MAX_TIME_SAMPLES > const & GetTimeSampleXforms () const
 Returns the time sampled xforms that were queried during Sync.
 
float GetLensDistortionK1 () const
 
float GetLensDistortionK2 () const
 
const GfVec2fGetLensDistortionCenter () const
 
float GetLensDistortionAnaSq () const
 
const GfVec2fGetLensDistortionAsym () const
 
float GetLensDistortionScale () const
 
const ShutterCurveGetShutterCurve () const
 Get the shutter curve of the camera.
 
float GetApertureAngle () const
 
float GetApertureDensity () const
 
float GetApertureNSides () const
 
float GetApertureRoundness () const
 
- Public Member Functions inherited from HdCamera
HD_API HdCamera (SdfPath const &id)
 
HD_API void Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
 Sprim API.
 
HD_API HdDirtyBits GetInitialDirtyBitsMask () const override
 Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of this prim.
 
GfMatrix4d const & GetTransform () const
 Camera parameters accessor API.
 
Projection GetProjection () const
 Returns whether camera is orthographic and perspective.
 
float GetHorizontalAperture () const
 Returns horizontal aperture in world units.
 
float GetVerticalAperture () const
 Returns vertical aperture in world units.
 
float GetHorizontalApertureOffset () const
 Returns horizontal aperture offset in world units.
 
float GetVerticalApertureOffset () const
 Returns vertical aperture offset in world units.
 
float GetFocalLength () const
 Returns focal length in world units.
 
GfRange1f const & GetClippingRange () const
 Returns near and far plane in world units.
 
std::vector< GfVec4d > const & GetClipPlanes () const
 Returns any additional clipping planes defined in camera space.
 
float GetFStop () const
 Returns fstop of camera.
 
float GetFocusDistance () const
 Returns focus distance in world units.
 
bool GetFocusOn () const
 
float GetDofAspect () const
 
int GetSplitDiopterCount () const
 
float GetSplitDiopterAngle () const
 
float GetSplitDiopterOffset1 () const
 
float GetSplitDiopterWidth1 () const
 
float GetSplitDiopterFocusDistance1 () const
 
float GetSplitDiopterOffset2 () const
 
float GetSplitDiopterWidth2 () const
 
float GetSplitDiopterFocusDistance2 () const
 
double GetShutterOpen () const
 
double GetShutterClose () const
 
float GetExposure () const
 
TfToken GetLensDistortionType () const
 
float GetLensDistortionK1 () const
 
float GetLensDistortionK2 () const
 
const GfVec2fGetLensDistortionCenter () const
 
float GetLensDistortionAnaSq () const
 
const GfVec2fGetLensDistortionAsym () const
 
float GetLensDistortionScale () const
 
float GetLensDistortionIor () const
 
const CameraUtilConformWindowPolicy & GetWindowPolicy () const
 Returns the window policy of the camera.
 
HD_API GfMatrix4d ComputeProjectionMatrix () const
 Convenience API for rasterizers.
 
- Public Member Functions inherited from HdSprim
HD_API HdSprim (SdfPath const &id)
 
SdfPath const & GetId () const
 Returns the identifier by which this state is known.
 
virtual void Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits)=0
 Synchronizes state from the delegate to this object.
 
virtual HD_API void Finalize (HdRenderParam *renderParam)
 Finalizes object resources.
 
virtual HdDirtyBits GetInitialDirtyBitsMask () const =0
 Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of this prim.
 

Additional Inherited Members

- Public Types inherited from HdCamera
enum  DirtyBits : HdDirtyBits {
  Clean = 0 , DirtyTransform = 1 << 0 , DirtyParams = 1 << 1 , DirtyClipPlanes = 1 << 2 ,
  DirtyWindowPolicy = 1 << 3 , AllDirty
}
 
enum  Projection { Perspective = 0 , Orthographic }
 
using ClipPlanesVector = std::vector< GfVec4d >
 
- Protected Attributes inherited from HdCamera
GfMatrix4d _transform
 
Projection _projection
 
float _horizontalAperture
 
float _verticalAperture
 
float _horizontalApertureOffset
 
float _verticalApertureOffset
 
float _focalLength
 
GfRange1f _clippingRange
 
std::vector< GfVec4d_clipPlanes
 
float _fStop
 
float _focusDistance
 
bool _focusOn
 
float _dofAspect
 
int _splitDiopterCount
 
float _splitDiopterAngle
 
float _splitDiopterOffset1
 
float _splitDiopterWidth1
 
float _splitDiopterFocusDistance1
 
float _splitDiopterOffset2
 
float _splitDiopterWidth2
 
float _splitDiopterFocusDistance2
 
double _shutterOpen
 
double _shutterClose
 
float _exposure
 
TfToken _lensDistortionType
 
float _lensDistortionK1
 
float _lensDistortionK2
 
GfVec2f _lensDistortionCenter
 
float _lensDistortionAnaSq
 
GfVec2f _lensDistortionAsym
 
float _lensDistortionScale
 
float _lensDistortionIor
 
CameraUtilConformWindowPolicy _windowPolicy
 

Detailed Description

A representation for cameras that pulls on camera parameters used by Riley cameras.

Note: We do not create a Riley camera per HdCamera because in PRman 22, it'd require a render target to be created and bound (per camera), which would be prohibitively expensive in Prman 22.

Definition at line 47 of file camera.h.


Class Documentation

◆ HdPrmanCamera::ShutterCurve

struct HdPrmanCamera::ShutterCurve

See GetShutterCurve() below for a description of what these values represent.

Definition at line 53 of file camera.h.

Class Members
float shutterCloseTime
VtArray< float > shutteropening
float shutterOpenTime

Member Function Documentation

◆ GetApertureAngle()

float GetApertureAngle ( ) const
inline

Definition at line 142 of file camera.h.

◆ GetApertureDensity()

float GetApertureDensity ( ) const
inline

Definition at line 146 of file camera.h.

◆ GetApertureNSides()

float GetApertureNSides ( ) const
inline

Definition at line 150 of file camera.h.

◆ GetApertureRoundness()

float GetApertureRoundness ( ) const
inline

Definition at line 154 of file camera.h.

◆ GetLensDistortionAnaSq()

float GetLensDistortionAnaSq ( ) const
inline

Definition at line 92 of file camera.h.

◆ GetLensDistortionAsym()

const GfVec2f & GetLensDistortionAsym ( ) const
inline

Definition at line 96 of file camera.h.

◆ GetLensDistortionCenter()

const GfVec2f & GetLensDistortionCenter ( ) const
inline

Definition at line 88 of file camera.h.

◆ GetLensDistortionK1()

float GetLensDistortionK1 ( ) const
inline

Definition at line 80 of file camera.h.

◆ GetLensDistortionK2()

float GetLensDistortionK2 ( ) const
inline

Definition at line 84 of file camera.h.

◆ GetLensDistortionScale()

float GetLensDistortionScale ( ) const
inline

Definition at line 100 of file camera.h.

◆ GetShutterCurve()

const ShutterCurve & GetShutterCurve ( ) const
inline

Get the shutter curve of the camera.

This curve determines the transparency of the shutter as a function of (normalized) time.

Note that the times returned here are relative to the shutter interval.

Some more explanation:

The values given here are passed to the Riley camera as options RixStr.k_shutterOpenTime, k_shutterCloseTime and k_shutteropening.

(where as the shutter interval is set through the global Riley options using Ri:Shutter).

RenderMan computes the shutter curve using constant pieces and cubic Bezier interpolation between the following points

(0, 0), (t1, y1), (t2,y2), (t3, 1), (t4, 1), (t5, y5), (t6, y6), (1, 0)

which are encoded as: t3 is the shutterOpenTime t4 is the shutterCloseTime [t1, y1, t2, y2, t5, y5, t6, y6] is the shutteropening array.

Note
The shutter:open and shutter:close attributes of UsdGeomCamera represent the (frame-relative) time the shutter begins to open and is fully closed respectively.

The Riley shutterOpenTime and shutterCloseTime represent the (riley shutter-interval relative) time the shutter is fully open and begins to close respectively.

Definition at line 138 of file camera.h.

◆ GetTimeSampleXforms()

HDPRMAN_API HdTimeSampleArray< GfMatrix4d, HDPRMAN_MAX_TIME_SAMPLES > const & GetTimeSampleXforms ( ) const
inline

Returns the time sampled xforms that were queried during Sync.

Definition at line 75 of file camera.h.

◆ Sync()

HDPRMAN_API void Sync ( HdSceneDelegate sceneDelegate,
HdRenderParam renderParam,
HdDirtyBits *  dirtyBits 
)
overridevirtual

Synchronizes state from the delegate to this object.

Reimplemented from HdCamera.


The documentation for this class was generated from the following file: