A downloadable shader example

This project shows a few examples of a simple method to add collision-like effects to 3D particles in Godot 3, using an orthogonal viewport depth buffer. Created with Godot 3.4.2 Stable.


It is perhaps more accurate to describe the process as 3D particle occlusion, hence the name. While Godot 4 features physics-enabled particles, this shader method works off of visibility and render layers. Because of this, no collision shapes are necessary, but "collisions" will not occur on transparent surfaces, and particles will act as if they've collided if they pass behind a surface.

I first developed this technique because I simply wanted rain particles not to enter indoor/sheltered spaces. Such a use case is ideal for this method, because it primarily involves vertical occlusion.

Please see my GitHub page for more details on how this shader is implemented.

License
This project uses the MIT License with no copyright.

StatusReleased
CategoryAssets
AuthorWolfe
Made withGodot
Tags3D, collision, Effects, Godot, particle, Shaders
Code licenseMIT License
Average sessionA few minutes
LanguagesEnglish
InputsKeyboard, Mouse

Download

Download
3D Particle Occlusion.zip 36 kB

Leave a comment

Log in with itch.io to leave a comment.