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
1
Question by MB_Mugen · Dec 31, 2014 at 07:08 PM · cameraperspectivefield of view

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

Hello, I have a perspective camera but I would only like to show a part of what it sees, like the upper half, or a rectangle part of it. Changing the Field of View is not the solution for me because it affects the perspective. Basically, what I would like is the perspective which I get with FoV 60, and the size of the shot (relative to the world) as if the FoV were something like 30.

Comment
Add comment · Show 6
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 Graham-Dunnett ♦♦ · Dec 31, 2014 at 07:09 PM 0
Share

What part of the documentation did you not understand?

avatar image MB_Mugen · Jan 01, 2015 at 09:21 AM 1
Share

Hi, thanks, but I'm not sure you understood my question. You point me to camera.pixelRect which defines "Where on the screen is the camera rendered" but I don't need to control where the camera is rendered (I want a regular full screen render) - but what part of the camera is rendered. What I need is like having the camera rendered on a plane and then "fil$$anonymous$$g" just a part of that plane with the second camera.

avatar image smoggach MB_Mugen · Dec 31, 2014 at 10:42 PM 0
Share

I think what you're looking for is rendertextures. http://docs.unity3d.com/ScriptReference/RenderTexture.html

Using these you can set up a "projector" to show the rendered texture onto something in your scene which your camera can render a part of.

It always helps to be as specific as possible on this site.

avatar image f4bo · Jan 01, 2015 at 09:44 AM 0
Share

I guess you're talking about the camera Viewport, right? if it is so just change the relative parameters in the inspector named Viewport Rect

avatar image MB_Mugen · Jan 01, 2015 at 11:20 AM 0
Share

Hi, Thanks, again. I'm sorry for not making myself clear. I'll try explaining the problem with example test shots, down below. Smoogach, I know how to do the thing with two cameras, but I'm thinking it is kind of irrational performance-wise to do it that way because I need it throughout the entire game. I was hoping there is another simpler solution. f4bo, again i don't think changing the viewport is what I need.

This is one possible view of my game: alt text

I would like to lose the perspective of the floor, so I move the camera down, and get this (ignore the yellow rectangle for now):

alt text

But then I get (the lower) half of my screen empty and useless so i would only like to crop this yellow rectangle of it and make it full screen. I could get the desired effect of loosing the floor perspective by repositioning all the objects in the world, but then they wouldn't be positioned realistically and that would make the scene confusing to work with in the editor.

example1.png (42.7 kB)
example2.png (44.5 kB)
avatar image MB_Mugen · Jan 01, 2015 at 04:27 PM 0
Share

I will do some more testing, but if I just move the camera closer and rotate it I get too much perspective distortion on high objects - that is why i'm searching for a solution that doesn't involve moving the camera closer (nor changing the Field of view, for similar reasons). If I come to a solution, or a better explanation of the problem I'll post it here. Thanks!

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by f4bo · Jan 01, 2015 at 02:39 PM

ok now it is a bit more clear - so you want the camera will move forward as close as its z axis get closer to 0 - i think you just need to add to the camera movement script, something that, indeed, just change the y value according with the z position in a way that y will be reduced together with z getting closer to 0.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

FOV script does not change camera FOV on executable, but it does in the unity playtest. 0 Answers

Unity3d or Maya-style Camera navigation 5 Answers

Help Please - 2D Game Perspective Camera 2 Answers

Camera follow help? 1 Answer

Is it possible to shake the screen rather than shake the camera? 3 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