{"repo":"Wolfe2x7/3D-particle-occlusion-collision-for-Godot-3","free":true,"listed":false,"github":"https://github.com/Wolfe2x7/3D-particle-occlusion-collision-for-Godot-3","clone":"git clone https://github.com/Wolfe2x7/3D-particle-occlusion-collision-for-Godot-3.git","description":"Example of \"collision\"-enabled particle effects for Godot 3 using viewport depth buffers and shader logic","language":"GDShader","stars":25,"topics":["buffer","godot","particle-collisions","particle-physics","particles","shader","viewport"],"license":"MIT","category":"game-templates","readme_excerpt":"3D Particle Occlusion/Collision for Godot 3 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 repository 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. How is it implemented? The way it is set up in the project, particles are expected to be emitted in the direction of the Particles node's negative Y basis, like rain. The RemoteTransform passes a rotated transform to the Camera, which is monitoring the depth map on a specific render layer. The particle shader retrieves the depth map from the Viewport. I recommend creating your own shader file from a ParticlesMaterial with the following instructions: 1. Create and configure a ParticlesMaterial; it is easier to set up the built-in behaviors this way. 2. Convert it to a ShaderMaterial (drop-down on the right). 3. Add these uniforms to the list: 4. Insert thi","default_branch":null,"files":null,"tree":[],"storefront":"/r/Wolfe2x7","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Wolfe2x7/3D-particle-occlusion-collision-for-Godot-3/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}