0 votes

Think of like, an acid or a flame eating away at a parchment. What I'm looking for is for a texture to become transparent in increasing bits and chunks.

To me, this sounded like a job for both a masking effect, and particles. The plan was to have a particle node emit white particles with a long lifetime, and somehow, using a shader, ensure that the areas that are opaque from the particles are then rendered transparent in the underlying texture.

As you can tell from this explanation, I barely have a passing understanding of how shaders work, and a brief fiddling with the engine suggests that this method isn't doable with the built in particle engine.

Does anyone have any ideas on how this effect could be achieved?

Currently, I can only think of writing my own particle-lite engine for this effect, but I'm hoping one of you clever folks has an idea.

Thanks for your time.

in Engine by (61 points)

1 Answer

+3 votes
Best answer

Something like this?

This is done with a shader using a mask texture. These textures are easy to create using GIMP (Filters → Render → Clouds → Solid Noise),

The effect gained from this shader can easily be changed by using different textures than plain noise textures.

Here is a working example project. Just start the AnimationPlayer and take a look at the Sprite's CanvasItemMaterial and its corresponding CanvasItemShader.

by (709 points)
selected by

A nice example, thanks for sharing it.

Clean solution, thanks a ton.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.