Hi all.
I just got an idea while playing some egypt-like map with lightmaps calculated with bouncing rays.
My idea is to make players light up their environment while standing in a bright light. It would require just spawning a dynamic light in the center of a player object and calculating it's colour and brightnes. That wouldn't be too expansive for resources, but may look really cool.
Those images should view my idea:
http://www.mediafire.com/imageview.php?q...mwm3mdzkgm
http://www.mediafire.com/imageview.php?q...ggnuujmxwj
http://www.mediafire.com/imageview.php?q...aivtnyjqqj
There is another idea that would work much better and for all objects, but may slow down the game:
A light may be given the parameter IL (Indirect Ligting). The IL number is an amount of dynamic lights that are generated for this light:
IL = 0 - no indirect lighting for this light object
IL = 1 - one ray is being casted (for spotlights) and a dynamic omni light is being placed where the ray hits (with energy being calculated upon the hit distance)
IL = 8 - eight rays and eight dynamic lights (each carry the 1/8 of energy) are casted
and so on.
For sun lights this would generate a grid of lights that are covering the whole map. Some system to reduce their number would be required (where no one is moving)
For omni lights that would make a spherical grid.
I just got an idea while playing some egypt-like map with lightmaps calculated with bouncing rays.
My idea is to make players light up their environment while standing in a bright light. It would require just spawning a dynamic light in the center of a player object and calculating it's colour and brightnes. That wouldn't be too expansive for resources, but may look really cool.
Those images should view my idea:
http://www.mediafire.com/imageview.php?q...mwm3mdzkgm
http://www.mediafire.com/imageview.php?q...ggnuujmxwj
http://www.mediafire.com/imageview.php?q...aivtnyjqqj
There is another idea that would work much better and for all objects, but may slow down the game:
A light may be given the parameter IL (Indirect Ligting). The IL number is an amount of dynamic lights that are generated for this light:
IL = 0 - no indirect lighting for this light object
IL = 1 - one ray is being casted (for spotlights) and a dynamic omni light is being placed where the ray hits (with energy being calculated upon the hit distance)
IL = 8 - eight rays and eight dynamic lights (each carry the 1/8 of energy) are casted
and so on.
For sun lights this would generate a grid of lights that are covering the whole map. Some system to reduce their number would be required (where no one is moving)
For omni lights that would make a spherical grid.
I'm making Liblast - a FOSS online FPS game made with Godot 4 and a 100% open-source toolchain