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.

asked Jul 3, 2017 in Engine by jeff (51 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.

answered Jul 3, 2017 by timoschwarzer (700 points)
selected Jul 3, 2017 by jeff

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 How to use this Q&A? before posting your first questions.