Download

Fade off paper2d sprites?

I think this is coming, or possibly already has been patched in (?), but I’d like to know if there’s a way currently to make a paper2d sprite fade in and out?

Thanks!

Hi RumbleMonk,

If you are using a translucent material on the sprite, you can adjust the sprite color alpha value up and down to fade them out. The default material is masked (binary 0/1 translucency), so it won’t fade out, it’ll stay solid until the alpha value drops below the threshold (0.33) and then disappear instantly.

Cheers,
Michael Noland

Hey, thanks for the reply Michael. I can get a partly transparent material yup, but since this is a paper2d sprite I’m not sure how to access its alpha in blueprint? Normal materials have graphs and you can access things by name etc but I’m struggling to find info about how to do this with a sprite… if anyone could nudge me in the right direction that’d be most awesome!

Thanks again!

Hi RumbleMonk,

Not sure I’m following what you’re asking. Blueprints and Materials are two completely different things. To fade a sprite you don’t need a custom material as the built-in ones already use the Sprite Color (passed in as Vertex Color) to multiply with the sprite texture read. If you’ve made a custom material and aren’t using the Vertex color, you’ll want to (see

&d=1405029970 for an example).

If you have the sprite set to a translucent material (not a masked one), you can just call SetSpriteColor, passing in a value below 1 for Alpha in order to fade it. To test, drop a sprite into the level and edit the sprite color, using the drop-down to expose the alpha value. It should be see-thru.

Cheers,
Michael Noland

Oh… things are slowly dropping into place in my brain now. I double clicked some materials in the default ‘materials’ folder and doing so instantly brings up graphs, the ‘TranslucentUnlitSpriteMaterial’ gave me nothing first making me think the shader works completely differently - but I see now it’s referencing ‘DefaultSpriteMaterial’ as an instance parent.

I also had no idea about the SetSpriteColor which works wonders!

Thank you a whole lot, really appreciated!
Goran

I just fade it out in a sprite, using photoshop. Works well.