Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by mattegaryDibris · Nov 27, 2013 at 05:20 PM · camerafov

Modify focal distance/image plane withour change FOV

Hi everybody,

i've a question about focal distance and FOV. I know that in Unity is possible to set the FOV that simulate the same effect of changing the focal lenght of the camera.

But i need to do something different.

I need to be able to modify the focal distance without modifing the FOV, and therefore the frustum.

To be clear: with focal distance I mean the distance between the camera and the image plane.

The consequent question is: do you know where is the image plane in Unity? it matches with the near plane? with the far plane? is somewhere in the middle? or there isn't a image plane at all?

Thank you very much.

Matteo

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image robertbu · Nov 27, 2013 at 05:22 PM 0
Share

Your question is confusing. I think you need to specify what you are trying to accomplish rather than the method you are trying to use to accomplish the task. The image plane will be at the camera position, but I don't think that is what you need to know. The near and far clip planes just specify the range in front of the camera where objects are seen.

avatar image mattegaryDibris · Nov 27, 2013 at 06:41 PM 0
Share

I'll try to explain my goal: I'm a researcher and in my lab we developed an immersive stereoscopic reality system, using an open source rendering engine. This engine let us do all the stuff we need in order to make our system work at its best, but the quality is quite awful. So we decide to switch to more advanced engine, like unity. Our system rely on a specific 3D visualization technique we patented, and it must modify the frustum of each virtual stereoscopic camera.

For now I'm able to modify the frustum of each camera by modifing the projection matrix, but I need to set the position of the image plane, aka its distance from the camera, aka the focal length. I must not use the tipical trick of changing the focal length by changing the FOV, cause in our system i need to set this two parameters indipendently.

So, back to my first question:

There is any way to directly set the focal length?

In case of negative answer:

Do you know where is positioned in the world the image plane, aka its distance from the camera or from the near plane?

avatar image robertbu · Nov 27, 2013 at 06:53 PM 0
Share

Based on your link, I believe the image plane is at the camera position, but don't take that as gospel. If you don't get an answer here, you might ask on the Unity Forums.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by XinJinXiang · Apr 05, 2015 at 01:34 PM

Hello Matteo I have a sample problem with fov and focal length. From unity forum I can know focalLength = frustumHeight 0.5f / Mathf.Tan(fov 0.5f * Mathf.Rad2Deg) But I don`t know exactly what is frustumHeight in Unity. I know that it is distance between main camera and image plane but I don`t know where is the image plane in Unity. I think you have a same problem with me so if you have a clear solution that please notify me about it.

Kind Regards

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlwaysSunny · Apr 06, 2015 at 05:22 AM 0
Share

In the future, if you insist on resurrecting threads to provide a non-answer, please post it as a comment. Thanks,

avatar image mattegaryDibris · Apr 06, 2015 at 05:27 AM 0
Share

Hi XinJinXiang, I can't find myself in the equation you wrote right now... But I can tell you two thing: 1. In Unity image plane = near plane. All the points in the 3D world will be projected onto the near plane. 2. I solve all my problem using a beta version of Unity, with advanced functionality about 3D stereoscopic visualisation... But is more or less 4 month that I don't work anymore on this project, so I can't really help you...

avatar image XinJinXiang · Apr 06, 2015 at 08:01 AM 0
Share

Thanks for your reply. 1. In Unity image plane = near plane. All the points in the 3D world will be projected onto the near plane. Then focalLength = Distance($$anonymous$$ain Camera Position,Near Plane),right? How do you modify fx and fy in your camera matrix? I wanted know correct camera matrix values for using OpenCV library. Regards

avatar image artwen XinJinXiang · Oct 09, 2015 at 11:17 PM 0
Share

Yes you are right, I actually did an experiment to prove it. This question haunted me for weeks!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Camera movement in a 2D? (like angry birds) 1 Answer

Minimap camera display size. 1 Answer

How to accurately zoom (not dolly) and pan Camera to mouse click position 1 Answer

Is it possible to show only a part of what camera sees 1 Answer

2D is zoomed in/out on different ios devices 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges