- Home /
fade between scenes?
I don't mean fade to black and then to the next scene. I'm talking more about scene masking. Is it possible to layer scenes based on an alpha of a guy texture?
Not sure I understand what you're asking. When you say 'layer scenes,' do you mean that you want to have two scenes loaded simultaneously, with a camera in each scene, and then take the render from each scene and combine them into one image?
Just for clarification, in Unity 'scene' more or less means everything that currently exists (is instantiated). Loading a different scene simply means 'unload everything, then load something else.' So if I understand your question correctly ("can I have two scenes open simultaneously and render each separately"), the answer is no.
If, however, you mean 'scene' in the sense of cameras, where each scene is defined as what a camera can see, then sure, it's definitely possible to have multiple cameras and layer their output.
Can you clarify what you mean?
2 cameras is exactly what I meant, actually. How would I go about doing this?
http://www.youtube.com/watch?v=te-EHxxBGmw is that what you mean? (Skip to around 20 seconds) The fade between two cameras?
No. I am talking about getting an image from one camera, and an image from the other, and putting one on top of the other at the same time via a ramp. for example. If I had the 1st camera looking at a blue plane, and the 2nd one looking at a yellow plane, there would be a gradient from blue to yellow depending on the alpha values of a guy texture. Is that clear enough? Would you like an image example?
Answer by tiagomelobr · Nov 24, 2011 at 06:34 PM
You may want to use render to texture on this.
Make a render to texture image about the same size of your game resolution and make your first camera render to it.
You now may use this image as GUITexture, changing the alpha you'll get your transition. To use an alpha mask in this, I think that you'll need to change the Clear Flags of the first camera.
Hope it helps.
Your answer
Follow this Question
Related Questions
How to fade a scene in/out 1 Answer
Fading scene in unity 3 Answers
Skip to the previous screen without reboot ?? 0 Answers
Does removing scenes from build settings reduce the file size of a game? 2 Answers
I need help with my pause menu 1 Answer