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 DanaScully · Jun 07, 2017 at 12:05 PM · unity 5camera

Camera projection matrix parameters unit

I am currently working with unity camera and getting the camera projection matrix parameters. But I don't know what those numbers mean. Or more precisely what is the unit of those numbers e.g. cm, m ...(pixels if it makes sense?). Could someone please explain?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by AtGfx · Jun 07, 2017 at 12:22 PM

The projection matrix is a combination of translation, rotation and non-linear projection on screen... for the perspective projection. For orthographic projection it is much simpler.

Your projection matrix can be anything you want, depending on what you want to achieve. This matrix is used to map a vertex position on a position on the screen, so your question seem a bit wide ^^

Maybe you can provide more detail on what you want to do, and if you need a little help on math, feel free to ask ;)

Comment
Add comment · Show 5 · 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 DanaScully · Jun 07, 2017 at 12:26 PM 0
Share

Well actually I am not setting any thing there. All I do is writing the parameters to a file as scene info. like m00 = x , m01 = y and so on. But then I was asked about the unit of these parameters and I didn't know.

avatar image AtGfx DanaScully · Jun 07, 2017 at 12:53 PM 0
Share

These paramaters does not represent something simple like the width and height of your image or the distance to the far plane, etc. As I said this matrix is a combination of several matrices. To go a little a bit in details it is a combination of 3 matrices :

  • The first one will put your object from a reference space to the world space.

  • The second one will rotate your object to be aligned with a conventionnal view (for example looking in -z direction).

  • The third one will project your vertex to the screen, according to perspective or not.

Then you understand that when you multiply these different matrices, it is not really possible to give a meaning to m00 for example.

If you want more details you can browse the web (google "viewport projection") and try to find a video or webpage that describes it. If you can get it, the book "Fundamentals of Computer Graphics" (the one with the tiger head on cover page) contains a chapter dedicated to the viewport projection and is really well explained !

Hope it helps !

avatar image DanaScully AtGfx · Jun 07, 2017 at 01:01 PM 0
Share

Thanks for the help. This sounds very similar to $$anonymous$$VP (model-view projection) matrix in OpenGL. Are they the same?

Show more comments

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

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

Related Questions

Enabeling components 1 Answer

Unity 5.2 camera not recognised 1 Answer

Switching camera to follow object 0 Answers

RenderTexture.Create failed: format unsupported 0 Answers

I cannot see button on camera preview 1 Answer


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