Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question camera intrinsics

Discussion in 'Virtual Production' started by JJ217791, Jul 24, 2022.

  1. JJ217791

    JJ217791

    Joined:
    Jun 22, 2022
    Posts:
    5
    HI, I'm trying to build a project and I have to use camera properties. The problem I'm having is that I can't find a way to get such information and implementing it in the C# script. Does anyone know how to get the camera intrinsic parameters? like focal length in terms of pixels and principal points (optical center). I attached an image of what I'm explaining here. plz help me with this
     

    Attached Files:

  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I don't know the direct answer to your question, but it makes a difference which render pipeline you are using (e.g. HDRP uses volumetrics) and whether you are using Cinemachine cameras as well (some settings go there instead). (I tend to use "look at" style capabilities, so don't know how to set those numbers directly.)
     
    JJ217791 likes this.
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,905
    FYI Cinemchine just drives the main camera, so if you query the main camera you'll get whatever Cinemachine put there. No need for special CM handling.
     
    JJ217791 likes this.
  4. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    JJ217791 likes this.