playMaker

Author Topic: Fade & Cut Camera not working as expected...  (Read 4362 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Fade & Cut Camera not working as expected...
« on: December 04, 2015, 05:22:58 AM »
Hi,
Im having trouble with my main gui camera. When I click a button to load a level, I want the camera to fade out before loading. It does this, but for a second before the new scene loads I see a glimpse of the scene as it was before the fade to black.
I tried to force this to work so a created a new camera thats pointing at black and just after the fade Id switch to this camera using CutCamera, and change level so any glimpse would just be of black...
However, merely introducing this camera makes it become the default camera, and my GUI doesn't show, so I made a dummy Game Object with a cut camera action on it that simply should cut to the correct camera when the scene loads, but it doesn't...

Anyone know why or how to do this without such a botch job?

Mark

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Fade & Cut Camera not working as expected...
« Reply #1 on: December 08, 2015, 12:46:31 AM »
Hi,

 I think I recall something like that on a project I worked on, if I recall properly, the trick was that the scene you load must be blacked out in the editor so that when it starts it's black, and it lets the time for everything to be set up.

anyway, I would strongly advice you use the new uGUI for this, as this fading system uses the old Unity UI and will likely soon start to break here and there as Unity 5 will evolve.

 Bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Fade & Cut Camera not working as expected...
« Reply #2 on: December 08, 2015, 02:43:44 AM »
Hi,

 I think I recall something like that on a project I worked on, if I recall properly, the trick was that the scene you load must be blacked out in the editor so that when it starts it's black, and it lets the time for everything to be set up.

Ill check but Im pretty sure the "glimpse" I'm getting is of the old scene, the one we are transitioning FROM.
anyway, I would strongly advice you use the new uGUI for this, as this fading system uses the old Unity UI and will likely soon start to break here and there as Unity 5 will evolve.

 Bye,

 Jean

OK, but how do I do this? Are there whole new actions to work with this? I like that theres simply an action that says Fade Camera...

Incidentally,  I have been using the awesome plugin "Adventure Creator" for many other projects (thats why you haven't seem me for a while). This is for a a particulary kind of game (not multi-player) but the reason I like it is that it has some fantastic built in actions, that I really wish I could use alone, without needing all the package. Like the saving and Loading system, the pathfinding, and the interaction control, that could be used on anything.

I PARTICULARLY like the crossfade camera trick they do. but it IS a trick, thys seem to somehow "take a screenshot" of the outgoing screen and fade THAT with a new camera position in a new scene (or camera within the same scene).
I wonder if THIS kind of transition is possible with only PlayMaker, or would it need some scripting...?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Fade & Cut Camera not working as expected...
« Reply #3 on: December 09, 2015, 02:01:33 PM »
Hi,

 It's very easily achieved with uGui, simply import the full package from the Ecosystem and you'll have everything you need.

 use "set graphic alpha" combine with a float animate action and you are good to go for easy fade in and out.

 The trick remains identical to avoid glitches, always have the black image turned on in your scene so that when you load it it's there by default.

As for Adventure Creatore, make use of it, why whishing for a subset, embrace it, especially if it supports PlayMaker so well.

 Bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Fade & Cut Camera not working as expected...
« Reply #4 on: December 11, 2015, 09:50:54 AM »

As for Adventure Creatore, make use of it, why whishing for a subset, embrace it, especially if it supports PlayMaker so well.


Ah I would but it doesnt support multi player... it complains if you dont set a player, and as Im spawning this is hard to do.. but I might give it a go so see if I can find a workaround... Im just fed up with workarounds, I have often have workarounds within my workarounds...

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Fade & Cut Camera not working as expected...
« Reply #5 on: December 11, 2015, 10:45:11 AM »
@markfrancombe

Have you tried to fade trick?

You could use the 'Take camera screenshot' action and then load the png/jpeg from the resource or wherever it was saved in the next scene and fade from that to the current scene?

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Fade & Cut Camera not working as expected...
« Reply #6 on: December 14, 2015, 04:33:24 AM »
@markfrancombe

Have you tried to fade trick?

You could use the 'Take camera screenshot' action and then load the png/jpeg from the resource or wherever it was saved in the next scene and fade from that to the current scene?

No I havent tried it, but I guess its possible, I was amazed at the ingenuity of the technique when i figured out what the AC (Adventure Creator) guys had done... A bit "low tech", but it mostly works, although I sussed it when I was crossfading 2 cameras that were both pointing to the same NPC who was walking.. and I went.. huh, as the first one froze and the the fading in camera was "live"--- then I figured it out... face palm it was so simple...

Im about to import AC into my project now and see how little of it I can use... where needed, this is NOT a really ideal project for AC, but I´ve gotten used to so many of the built in methods, it just works, and if it doesn't you link things to PlayMaker FSMs and make your own solutions.. they work together OUTSTANDINGLY! Just that my current thing is multiplayer, I tell ya, feels like going back to the beginning... trying to work WITHOUT AC.
« Last Edit: December 14, 2015, 04:35:49 AM by markfrancombe »