x


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?

more ▼

asked Nov 24 '11 at 01:31 AM

Youngapprentice gravatar image

Youngapprentice
108 21 26 27

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?

Nov 24 '11 at 01:38 AM Julien.Lynge

2 cameras is exactly what I meant, actually. How would I go about doing this?

Nov 24 '11 at 01:51 AM Youngapprentice

http://www.youtube.com/watch?v=te-EHxxBGmw is that what you mean? (Skip to around 20 seconds) The fade between two cameras?

Nov 24 '11 at 06:07 AM OrangeLightning

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?

Nov 24 '11 at 05:11 PM Youngapprentice

Oh, I see. Hope some one can help you with that!

Nov 24 '11 at 06:49 PM OrangeLightning
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Nov 24 '11 at 06:34 PM

tiagomelobr gravatar image

tiagomelobr
71 4 4 5

Is this possible in Unity Free?

Nov 24 '11 at 07:53 PM Youngapprentice
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3694
x719
x535
x189

asked: Nov 24 '11 at 01:31 AM

Seen: 1168 times

Last Updated: Nov 24 '11 at 07:53 PM