slowly disappearing sprite doesn't work

I tried to make a slowly diappearing sprite creating a specific material:

And then making a blueprint to gradually change the opacity from 1 to 0:

The problem is that it works only with sprite that normally have uniform opacity, if I have some sprite with full opaque parts (opacity=1) and translucent (opacity=0.3/4) parts the last one are instantly brought to a opacity value of 1 and have a terrible appearance…

How can I let a sprite slowly fade on triggerbox overlap without changing opacity or at least without increasing transparent parts’ opacity??

Hey ale929,

I would like to clarify what you are attempting to do so I can run some tests on my end. You have a sprite that has different opacity levels on it, and you would like to only fade out parts of the sprite along a timeline?

Thank you,

I have a sprite with different opacity, yes, and i would like to make it fade completely. My fade value (in the fading timeline) vary from 1 to 0… bringing every part of the sprite to opacity one.

Would you mind providing me with the sprite asset you are using so I can test exactly the same set up you are using? A screenshot of the sprite and how you have it fading out would be helpful as well.

In what way are you applying this approach in your game or what is the purpose of this feature?

I ask so I can perhaps find a better or different way to approach this issue as far as practical usage and functionality within your project.

Cheers,

This is the sprite i’d like to fade:

As you can see the windows have some transparency… but when i add the Custom material to let it fade it become full opaque:

With full opaque sprites (with shrink wrapped rendering) this method works perfectly but if i cannot use the shrink wrapped rendering or if the sprite has some transparency it doesnt work.
I set a scalar parameter of 1 in material’s opacity and then, in the blueprint, i use “set scalar parameter value” to slowly bring it to 0 using a timeline.
My purpose is to let a sprite slowly disappear whenever a character enter a triggerbox and let it slowly appear when the character get out of it. So i created a blueprint with the sprite and the triggerbox and i give it the custom material that has a scalar parameter linked to the opacity node.

Hey ale929,

I managed to get a working prototype of what you are attempting to do and my steps and content are listed below. I set up my approach a bit differently as far as calling on the timeline, but I will do my best to point out the differences as well as make it clear on the important parts to take note.

Blueprint Components

Here you can see I created a simple ‘Actor Blueprint’ with a PaperSprite component and a Box collision. Take note of the component variables as well. I only had to create one variable since it will be referencing itself there is no need for a target variable.

Blueprint Event Graph

My set up is similar to yours except for the extra variables and nodes.

Fading Sprite Material

Here I have set the material properties of the Dynamic Material created within the blueprint. Still using the DefaultLitSpriteMaterial as its parent class.

Timeline Curve

I started at the value of 1.0 since that is the ‘Opacity’ the sprite will fade out from, and gradually fade to 0.0 along a linear curve over 5.0 seconds.

Sprite Fading in Scene

Finally we test to see the sprite fade upon overlapping the collision box. If you are still having trouble please let me know, but hopefully this gets you on the right path!

Cheers,

The problem remains… the texture has the window completely opaque and the blank part of the texture got fulfilled with grey lines:

Would you mind sharing the Sprite asset with me so I can test it?

https://drive.google.com/open?id=0BwmPd-rNtaDNflp5M2xyeUZYV3BsMkI4c1JEMXFhZDluNFV0ZklTYWhYVC02QllyUlI2RW8&authuser=0

Here is a project with the disappearing sprite problem, just load “Livello_1” from “Livelli” folder and you’ll see the problem.

if the link doesnt work try with this one:

https://drive.google.com/folderview?id=0BwmPd-rNtaDNflp5M2xyeUZYV3BsMkI4c1JEMXFhZDluNFV0ZklTYWhYVC02QllyUlI2RW8&usp=sharing

Hey ale929,

I am pretty sure I got what you needed to work. It was a simple fix, and hopefully this is what you are looking for when fading the sprite.

Open up your ‘Dis_Material’ and set it up how I have below. Be sure your set up matches mine own, and your fading should work as expected.

Fading Translucent Sprite

Let me know if you are still having some trouble.

Thanks,

It was exactly what i was tring to do… Thanks a lot! It was so simple :slight_smile:

Could you please take a look to this problem http://cdn.teamskeetimages.com/design/tour/exs/tube/images/hover.png i had?

If you are experiencing a different issue we ask that you please make a new answerhub post. This is done for others who might be experiencing the same problem so they can find the correct solution to their issue.