Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 catfink · Jan 19, 2018 at 05:01 PM · camera viewportprojection-matrixlens

How to modify the unity camera so that it renders like a GoPro camera

My game needs to have a camera that has the same field of view and camera depth perspective as a GoPro camera. Typically this means a horizontal field of view out at around 150 to 160 degrees. If you try to stretch the default unity camera field of view out to this level the camera image distorts terribly. I did find an asset in the asset store that basically renders larger than your screen resolution and then allows you through render textures expand the field of view out without getting the nasty camera distortion that goes with it.

However, the issue with this solution is that you end up rendering very large screen resolutions and this destroys game frame rate.

I've started to think that maybe I need to do something with camera projection matrices but as a novice in this field I don't know that this is the correct approach.

Simple emulation with fisheye shaders doesn't really do the job, this is just a graphical effect rather than an accurate recreation of a GoPro lens.

So my question comes down to what is the correct approach / methodology to change the default unity camera into a GoPro camera with accurate field of view and distance perspective without unacceptable stretching and distortion of the image?

Comment
Add comment · Show 1
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 diamondagetechnology · Apr 11, 2019 at 12:54 PM 0
Share

Were you able to find a solution for creating a Unity camera that matches the GoPro camera field of view etc?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by BloodMarked · Jan 19, 2018 at 05:32 PM

i want to do the same but there is no simple solution, which is why you dont see it in many games (i only know of kane&lynch2)

is is the same problem that the inverse projection for vr has (magnification in the center, where we rather want detail, more unwanted detail in peripheral vision


it can be done in the vertex shader, but the edges of the polygons will still remain straight, meaning you need a much higher tesselation.

this technique is quite popular for google cardboard apps: https://www.youtube.com/watch?v=yJVkdsZc9YA


in desktop vr it is done by rendering the peripheral vision at a lower resolution (or checkerboard rendering) and the center image at a higher resolution, then combining both. p.e. valves techniques: https://www.youtube.com/watch?v=eIlb688pUu4


i dont think these techniques have been applied to a fisheye lens effect yet, simply because it is too expensive

sadly i myself lack knowledge & skill to port these techniques to a non-vr fisheye shader

Comment
Add comment · 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

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

75 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 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 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 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 avatar image avatar image avatar image

Related Questions

WorldToViewportPoint and ViewportToWorldPoint math 2 Answers

Replicating the Minecraft Acid Mod 1 Answer

Camera from 3dsmax to Unity -> Lens mm 3 Answers

Camera Transition between two cameras 0 Answers

Camera preview only shows skybox 7 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