Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make decals contribute to global illumination #1162

Open
Tracked by #57284
novemberist opened this issue Jul 5, 2020 · 3 comments
Open
Tracked by #57284

Make decals contribute to global illumination #1162

novemberist opened this issue Jul 5, 2020 · 3 comments

Comments

@novemberist
Copy link

novemberist commented Jul 5, 2020

Describe the project you are working on:

a 3d game that makes heavy use of emissive lights and global illumination

Describe the problem or limitation you are having in your project:

decals that use emissive textures currently don't contribute to global illumination

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

when decals with emissive textures are applied to an object that is set to contribute to GI, the decals should too, this would be great for easily placing light panels, neon signs etc.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

unfortunately i don't know the intricacies of the engine code for GI, so I have no solution to offer here

If this enhancement will not be used often, can it be worked around with a few lines of script?:

it can only be worked around by not using decals as light emitters, if you want them to contribute to GI

Is there a reason why this should be core and not an add-on in the asset library?:

it's a rendering feature and thus needs changes in the core engine

Bugsquad edit: Reopened from godotengine/godot#40125.

@clayjohn
Copy link
Member

clayjohn commented Jul 5, 2020

Thanks for re-opening this! :)

@Calinou Calinou changed the title make decals contribute to GI Make decals contribute to GI Jul 5, 2020
@Calinou
Copy link
Member

Calinou commented Jul 5, 2020

In the meantime, you could add a OmniLight or SpotLight as a child of the Decal node.

@Calinou Calinou changed the title Make decals contribute to GI Make decals contribute to global illumination when using GIProbe May 1, 2021
@Calinou Calinou changed the title Make decals contribute to global illumination when using GIProbe Make decals contribute to global illumination May 1, 2021
@Calinou
Copy link
Member

Calinou commented Mar 22, 2022

See also godotengine/godot#51299, which is impacted by a similar limitation. With VoxelGI or SDFGI, it may not be feasible to implement this without adding a lot of complexity and reducing performance.

If you need lightmaps to work with GI, you can add lights with their bake mode set to Static near the emissive decals in question, then bake lightmaps again. This will not have much of a performance cost as the light will be fully baked (both direct and indirect light).

However, there's still some good news. In 4.0alpha, you can now use screen-space indirect lighting (SSIL) which reads the viewport's emission buffer, and therefore decals' emission channel 🙂
This works in real-time, so it updates instantly when a decal is changed.

SSIL disabled

2022-03-22_14 15 56

SSIL enabled

2022-03-22_14 15 42

Testing project (master): test_decal_ssil.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants