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
0
Question by Harry64 · May 17, 2013 at 05:36 PM · camerarender

Display 2 Cameras at the same time 50/50 opacity?

I want to create a dizzy effect like when you drank too much alcohol so that your eyes cannot focus correctly and you see all a bit double.

I think it would work if I use 2 cameras that render at the same time and every camera renders with 50% visibility.

is that somehow possible?

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

Answer by bfowle · May 17, 2013 at 07:01 PM

There are quite a few examples of camera controllers on Unify Community. One in specific being CrossFade.

Comment
Add comment · Show 4 · 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 Harry64 · May 17, 2013 at 07:27 PM 0
Share

I found that too but it fades from one into another camera. I want this to stay at 50% opacity for both cameras... I picked the code out for the fade but.... I dont get it what happens in the code. can you tell me?

 function CrossFadePro (cam1 : Camera, cam2 : Camera, time : float) {
     if (!renderTex) {
         renderTex = new RenderTexture(Screen.width, Screen.height, 24);
     }
     cam1.targetTexture = renderTex;
     tex = renderTex;
     CameraSetup (cam1, cam2, true, true);
  
     yield AlphaTimer(time);
  
     cam1.targetTexture = null;
     renderTex.Release();
     CameraCleanup (cam1, cam2);
 }
avatar image bfowle · May 17, 2013 at 07:35 PM 0
Share

CrossFade fades entirely from cam1 to cam2. Assu$$anonymous$$g you have cam1 at 1.0 opacity and cam2 at 0 opacity during gameplay, you would fade cam1 from 1.0 to 0.5, cam2 from 0 to 0.5. Or using CrossFade, ins$$anonymous$$d of fading to 100% from cam1->cam2, just fade to 50% of cam2. Then you would perform your dizzying effects on the camera(s).

avatar image Harry64 · May 17, 2013 at 11:11 PM 0
Share

I meant what does the parts of the script do like cam1.targetTexture = renderTex; but thanks anyway If I find some time I will try to create a script that does that.

avatar image bfowle · May 18, 2013 at 03:34 AM 0
Share

The CrossFadePro script creates a runtime texture (RenderTexture) to generate the effect. This is a Pro only feature. I would suggest reading up on it on Unity's RenderTexture documentation, as all the info is compiled there already.

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

13 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

Related Questions

Set renderable objects on camera without Layers 2 Answers

Can i render a camera to a gui texture? 1 Answer

Detailed render for far away objects? 1 Answer

Masking camera from rectangular to arbitrary shape 0 Answers

Light glitch when not in camera's view 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