|
|
|
|
Reply From: |
eons |
For simple things like footprints, trails, the particle node may be enough (turn emission when moving, use motionless particles), for more complex trails search the Q&A, there is a nice plugin not present in the asset lib.
For objects with more complex behaviour (blood splats, debris) I don’t know how are the regular implementations for decal systems.
If there will be just a few, the node origin of the decal may be enough to control the remains before being freed (just make it instance the effect scene as a child while removing the normal behaviour).
If there will be tons of stuff on screen, I may look at it the same as a bullet hell system, you can make a generic global decal manager that works as your particle/decal control system, each time you generate one, register it on the manager and make it control the time, apply tweens, change shader values (for fading, disintegrate, and other effects) and remove, for all the registered items at once.
The manager can generate the decals too, allowing to control/limit the number and recycle items.
Weren’t decals planned for 3.0?
Zylann | 2017-04-09 14:19
Thanks!
So it is (currently) not possible to paint on some kind of layer / surface / canvas with the option of keeping the painted. So there is no access to such function like:
.clear(Color)
# actually not calling clear() would keep the content of the painting
Is there any chance this may be in Godot 3.0 ?
The particle approach may be sufficient for what I need currently. It’s maybe possible to make some complex behavior when animating the particles once. You can animate them, right?
sparks | 2017-04-09 14:40
Yes, you can “paint” pixels on screen (search docs about custom drawing in 2D), even create and/or edit Image
resources used on textures.
Note that I was not talking about “decal” proper but persistent particles-like effect painted on screen.
I don’t know about decals, for now the only thing I have seen is the shaders and meshes on particles that can work to make better trails (not sure how that will work on 2D without meshes there).
Physics on particles I’ve thought were for 3.1, that may help to create things like blood splats with shaders but I need to know how that works first and I have less than no idea.
Ooooops I misread the post, I thought it was for 3D (because I never seen the term “decal” being used in 2D lol).
Zylann | 2017-04-09 15:14
@zylann yes, is used for splats and the like (I don’t think it have a name), and may be correctly used on another engine ™, I believe GM may not use real decals.
Sorry about the confusion about 2D or 3D. I edited the original question while you @Zylann answered, so you didn’t misread it in the first place, I actually missed to mention the the 2D part, but now that’s clarified.
And yeah, “decal” may not be the most appropriate word, but it’s more universal than just “blood splatter” I guess.
@eons
Not sure, what you are heading for when you mention “paint pixels on screen”? Wouldn’t this end in many draw calls, which are to be avoided? And creating textures on the fly and updating them every frame, does this work well? Again, not sure if I understood you here.
sparks | 2017-04-09 15:49
That’s very cool stuff, thanks !
sparks | 2017-04-10 13:14