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 RyanSpicer · Aug 12, 2013 at 01:26 AM · renderingcamerasdepthportal

Rendering when 'moving a character controller through a "portal"'

I'm writing some scripts to support fixed-location portals in Unity Pro. The portals are being rendered using RenderTextures and cameras with appropriately-set off-axis frustums. The view is first-person. The challenge is making the transition from "standing on one side of the "portal" looking at the render object to "teleported to new position." The smoothest transition I've been able to create involves creating a trigger with the same radius as the camera's near clip plane distance, and triggering the teleport behavior when the triggers intersect. The problem here is that the player's physics collider is significantly larger than the near clip plane. If the portal plane is up against a wall, the player controller can't get close enough for the trigger to intersect the portal trigger. Any thoughts on other potential solutions? I'm more concerned with the first-person view

Any thoughts on how to do this better/differently to achieve better results?

Comment
Add comment · Show 2
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 RyanSpicer · Aug 12, 2013 at 06:55 PM 0
Share

The question is less about how to actually move the character and more how to set up the transition to be as seamless as possible. Right now, you walk up to a portal, and the rtt surface is at (eye camera's near-clip plane) distance. $$anonymous$$y teleport script moves the character (and the camera) to somewhere on the surface of the "exit" portal. This means your view jumps at least the near clip distance, which is noticeable. I'd like to avoid that jump.

avatar image Benproductions1 · Aug 13, 2013 at 12:14 AM 0
Share

ok, that makes more sense now :)

From sitting there trying to come up with a solution, I have come to the conclusion that a little jump is unavoidable, but here are some tips for $$anonymous$$imising the effect:

  1. Have the near clip plane as low as possible (pretty obvious XD)

  2. Add a little velocity to the object (or make sure it has a $$anonymous$$imum) before teleporting. That will make the "jump" seem less obvious

  3. $$anonymous$$aybe add a "tiny" little bit of image blur for a couple frames "during" teleportation

AFAI$$anonymous$$ there is no way to avoid the issue, but It might be good to get some input from others ;)

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by RyanSpicer · Aug 13, 2013 at 06:36 PM

I've been thinking about this further. One thing I'm considering is making the "portals" 5-walled rooms with RTT on all 5 faces, rather than a single face in a door frame. The character would be teleported while standing in the middle of the "entrance" portal -- in the 'exit' portal, the wall ahead would be open, the surfaces behind/beside/above would be RTT. This ought to let me get closer to seamless. Since I'm not allowing portals to be moved, the level geometry can be designed to accommodate this.

Comment
Add comment · Show 1 · 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 DaveA · Aug 13, 2013 at 06:44 PM 0
Share

I recall from long ago, using Unreal, they had a 'portal zone' or something, my guess is it was a way to do this type of thing. You would have to make a little room behind your portal to go into, and having done that, would snap you to the destination. I think you're on to something with this.

avatar image
0

Answer by DaveA · Aug 13, 2013 at 06:44 PM

Could you not 'arrive' at the destination offset back (that is -transform.forward) from where you currently end up?

Comment
Add comment · Show 1 · 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 Benproductions1 · Aug 13, 2013 at 11:20 PM 0
Share

That could cause problems, think of what would happen if the player only just goes through the portal and then turns around. He would see through the wall/teleport

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

17 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

Related Questions

Need some help with portal rendering 2 Answers

Multiple cameras assigned different depths 2 Answers

Camera layering : UI shader is cleared by second camera with Depth Only flag 1 Answer

Does the projection matrix calculation affect the shader? 1 Answer

HDRP shader and code for depth maps 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