SimplestGodRay3D
R

Publisher

relo

SimplestGodRay3D

Misc
Light Effects Rendering Shader Performance Visibility Graphics Fog

A custom Node3D for Godot 4 that creates efficient, stylized light shafts (aka god rays) using a single QuadMesh and a shader. It provides an artistic alternative to volumetric fog with much better performance and visual control.

SimplestGodRay3D

Preview

SimplestGodRay3D is a custom Node3D for Godot 4 that creates efficient, stylized light shafts (aka god rays) using a single QuadMesh and a shader. It provides an artistic alternative to volumetric fog with much better performance and visual control.


๐Ÿš€ Features

  • Stylized 3D light shaft using QuadMesh + ShaderMaterial
  • Simulates a trapezoidal volumetric beam using vertex distortion
  • Full editor exposure: control width, height, spread, intensity, transparency, fade distance, and color
  • Visibility layer support (cull mask compatibility)
  • Lightweight and GPU-friendly
  • Editor-visible with @tool support

โœ… Requirements

  • Godot 4.4+
  • Forward+ rendering mode

๐Ÿงช How to Use

  1. Download the simplest_god_ray_3d folder from the Godot assetLib or from gitHub
  2. โš ๏ธONLY IF DOWNLOADED FROM GITHUB In the addons folder of your project(if you don't have one, create it), paste the simplest_god_ray_3d folder
  3. Enable the addon from Project > Project Settings > Plugins
  4. Add a new SimplestGodRay3D node to your scene
  5. Adjust the exposed parameters in the Inspector:
    • width, height: size of the beam
    • spread: controls the trapezoidal shape
    • intensity, transparency: affects color and opacity
    • fade_distance: controls fade-out over distance
    • visibility_layers: limit visibility to selected cameras

โš ๏ธ Limitations

  • No dynamic shadows.
  • Transparent overlap artifacts may occur when multiple beams cross or when mixed with other alpha-based geometry (like Sprite3D).
  • Not physically accurate โ€” this is a stylized, artistic effect, so it does not interact with the geometry of the scene.
  • You will have to be really careful positioning the god ray meshes if your camera can move freely, this addon is better suited for fixed view cameras like top down, side-scrolling...

๐Ÿ”ญ What's Next

Planned improvements for future versions of SimplestGodRay3D:

  • โœจ Dust Particles

    • Add optional projected dust motes inside the god ray.
  • ๐ŸŒซ๏ธ Embedded Fog Layer

    • Add support for internal fog/brume projection inside the god ray to simulate light scattering in humid or dense air.

โœจ Author

Developed by Re_Lo.
If you use this in a project, feel free to share it with me!


๐Ÿ“„ License

MIT License

Copyright (c) 2025 Re_Lo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.