• 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 fighder · Jan 20, 2016 at 05:38 PM · camerarotationquaternionportalportals

True Portal Effect

So I did a small portal project from this tutorial: https://www.youtube.com/watch?v=sK9Qf8ElFHo

Only problem I had is that the use of render texture is not as realistic as Portal. I am not looking to make it as realistic as Portal in terms of texture (but if you know how than that is much better).

Basically in Portal when you move closer or further from a portal, you see more or less. When you move around, what you see through the portal is different depending on the direction between you and the portal.

I get that the camera rotates and change its field of view to create the realism, but I just don't really get the math behind it, like how much rotation around what axis and how much field of view increment/reduction is needed.

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
0

Answer by Eno-Khaon · Jan 20, 2016 at 06:16 PM

I would recommend starting with this Reflection script and shader combo. It calculates an oblique matrix for the camera in order to properly begin its rendering area along an angled wall. If you modify it a little to remove the reflection aspect of it, you should be able to get results along the lines of what you're working towards.

A note regarding this, as well, is that Portal includes an option for how many layers of depth it's willing to generate. For every layer of depth you use, you would create a new camera system based on each camera system in the line, so that when you can see from one portal through another and back into the first, you have that proper perspective of depth (up the your own specified limit).

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

44 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

Related Questions

How to force camera rotation? 1 Answer

How to make camera rotation relative to target. 3 Answers

Rotation, my script shouldn't work but does. 0 Answers

Problem restoring proper camera rotation 1 Answer

Creating portal camera view with render textur 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges