I am a complete unity noob working on an existing unity project as part of something else.
I have a scene on a tabletop with overhead camera and projector - I have calibrated the camera-projector stereo system, and I need to take camera 3D coordinate location of a laser dot on the tabletop and convert it into image location on the projector.
What confuses me is this -
How do I represent real world coordinates from the real camera in the unity world coordinates, and using these, set-up another virtual camera at desired (R,T) from first camera?
How do I attach camera matrices and distortion parameters that I have to these cameras? (It seems unity expects cameras to be orthographic but the standard camera model is perspective matrix)
- Unity units is meant to be meters, but that depends of your modelling and models import settings.
- Unity Cameras can be orthographic, it’s the default if you chose to begin a 2D project, but
- they are perspective based otherwise, and
- if you use the latest version of Unity (2018.2), you get real world cameras presets.
- Although, this solves the FOV for you, but doesn’t add lens distortion, this requires post-effects.
Hopes this helps.