Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physical Cameras for USD #41

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

meshula
Copy link
Member

@meshula meshula commented Mar 19, 2024

Physical Cameras for USD

On behalf of the Cameras in USD Working Group:

This schema usefully bridges the description of physical cameras to USD scenes.

rendered link:

https://github.com/usd-wg/OpenUSD-proposals/blob/physical-camera/proposals/physical-cameras/README.md

The physical camera is a primitive meant to be a target for construction of
a physical camera model through applied, and multiply applied schemas.

The physical camera is a GeomXformable, and thus inherits the transform
schema.  The physical camera also inherits the UsdGeomImageable schema,
which provides facilities for controlling visibility and rendering of the
camera.

The physical camera provides a number of attributes that are meant to be
authored by a user or by a DCC import process.  These attributes are
generally meant to be authored once, and then left alone.

The concept is that the PhysicalCamera is just like a real camera that may
be used and measure on a real life stage, and it's attributes recorded in
a usd file. A real camera is a body, with a lens, and a film back, all
interchangeable, and these concepts are reflected in the proposed schema.

Supporting Materials

n/a

Contributing

meshula and others added 5 commits December 12, 2023 13:55
This adds the PhysicalCameraExposure and PhysicalCameraSensorSensitivity schema. Both are single-apply schema intended to be applied to a PhysicalCamera or UsdGeomCamera. Exposure adds iso, shutter speed etc, and SensorSensitivity adds spectral sensitivity curves in the spirit of Wetas physLight
add schema for exposure and sensitivity
- Rename Sensitivity to Responsivity per latest lingo
- Include RGB in camera responsivity schema name to indicate it's an RGB camera rather than something else
float2 aperture = (36.0, 24.0) (
doc = '''aperture in millimeters'''
)
float handedness = 1.0 (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a float type for this value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That follows GfMatrix where we see


    /// Returns the sign of the determinant of the matrix, i.e. 1 for a
    /// right-handed matrix, -1 for a left-handed matrix, and 0 for a
    /// singular matrix.
    GF_API
    double GetHandedness() const;

    /// Returns true if the vectors in the matrix form a right-handed
    /// coordinate system.
    bool IsRightHanded() const {
        return GetHandedness() == 1.0;
    }

    /// Returns true if the vectors in matrix form a left-handed
    /// coordinate system.
    bool IsLeftHanded() const {
        return GetHandedness() == -1.0;
    }

we find code like this throughout OpenUSD:

        // negate the angles
        *thetaSw *= -handedness;
        *thetaFB *= -handedness;
        *thetaTw *= -handedness;

usd files have it as a token

        uniform token orientation = "leftHanded" (
            hidden = true
        )

I agree that instead of a handedness float, we should match the orientation token usage.

@dgovil
Copy link
Contributor

dgovil commented Apr 5, 2024

Link to Rendered Proposal for convenience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Published
Development

Successfully merging this pull request may close these issues.

4 participants