playMaker

Author Topic: [SOLVED] How do you fade in (dissolve in) a object?  (Read 4893 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
[SOLVED] How do you fade in (dissolve in) a object?
« on: January 13, 2015, 02:48:04 AM »
So I have a tank, plane and mech.  Whichever the player is gets activated.  This means it just cuts (pops up) onscreen.  I want to dissolve it in.  I'm gonna guess and say I have to start the alpha at 0 and bring it up to 1 using a curve.  SOund right?  or is there a action that does this?  (If not, then that would be a good thing to make).

BTW:  the animation curves are buggy as I have previously posted (but have not proven as I have not uploaded anything about them).

BTW:  A fade is a dissolve using black.  Therefore the fade in and fade out actions are really dissolved.  if no black is involved, it is a dissolve.
« Last Edit: January 13, 2015, 02:48:31 PM by Lane »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How do you fade in (dissolve in) a object?
« Reply #1 on: January 13, 2015, 02:52:39 AM »
Hi,

 What is the link to your thread on this curve bug?

use a third parties tween if you want, have you tried that?

 Bye,

 Jean

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: How do you fade in (dissolve in) a object?
« Reply #2 on: January 13, 2015, 02:56:49 AM »
I don't know the link.  I'll probably do some research and send up some pics in the next few days.  I'm trying to get the tank to dissolve in so I'll be messing with it some more.  It has a material on it so not sure how to do this.  Anyone?

What third party tween?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How do you fade in (dissolve in) a object?
« Reply #3 on: January 13, 2015, 07:02:28 AM »
Dissolve effect requires a special shader. For simple fading you can basically use Set Material Color and Set Color Value actions to fading things in and out.

For actually blending the Alpha, I can't remember off the top of my head if it will work with tweens as its on a Color value but you could strip the color down and rebuild it every frame, even though thats pretty clunky.

I've used these before, and they're really useful.
http://hutonggames.com/playmakerforum/index.php?topic=5305.msg25387#msg25387
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

LogLady

  • Full Member
  • ***
  • Posts: 150
Re: How do you fade in (dissolve in) a object?
« Reply #4 on: January 13, 2015, 09:08:56 AM »
Just to add, to fade in/out (I know it is about dissolve but maybe it follows the same principle) you must use a transparent shader. If you don't use it maybe you will spend hours trying to figure out why it don't disappear/appear while you modify the alpha value.

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: How do you fade in (dissolve in) a object?
« Reply #5 on: January 13, 2015, 02:04:26 PM »
"you must use a transparent shader."

That's good advice.  I looked that up on google and found someone saying the same thing. Does anyone know of a transparent shader like diffuse that is solid that I could dissolve in and out?  I did see some  one the asset store but they were effects like fire.

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: How do you fade in (dissolve in) a object?
« Reply #6 on: January 13, 2015, 02:16:27 PM »
"Set Material Color and Set Color Value actions "

Don't they also change the color and alpha?  I just want to change the alpha from 0 to 1 over 1 sec leaving the RGB alone.

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: How do you fade in (dissolve in) a object?
« Reply #7 on: January 13, 2015, 02:46:35 PM »
I figured it out (see pic)
1) set a transparent shader like transparent-diffuse.
2) Set alpha to 0
3) activate object
4) bring 0 to 1 over 2 secs

BYW:  Animate curve just doesn't work at all.  I used v2

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: [SOLVED] How do you fade in (dissolve in) a object?
« Reply #8 on: January 13, 2015, 02:55:36 PM »
So now I got 1 more question.  Which shader to use.  The transparent-diffuse is semi transparent at alpha 100.  Anyone know which one would be solid at 1?