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

Change the default Global Illumination Mode from Disabled to Static on GeometryInstance3D #4515

Closed
Calinou opened this issue May 8, 2022 · 1 comment · Fixed by godotengine/godot#60935
Labels
breaks compat Proposal will inevitably break compatibility topic:rendering topic:3d
Milestone

Comments

@Calinou
Copy link
Member

Calinou commented May 8, 2022

Describe the project you are working on

The Godot editor 🙂

Describe the problem or limitation you are having in your project

By default, imported 3D scenes (glTF/Collada/FBX) use the Static global illumination mode for the meshes contained within the imported scene.

However, when you create MeshInstance3D nodes yourself, their default global illumination mode is set to Disabled. This is desired for dynamic objects, but for static objects, it will result in them not contributing to global illumination as expected.

For VoxelGI and SDFGI to work on those meshes, you need to go to the inspector and change the GI mode property on each node:

image

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

For consistency between primitive/OBJ meshes and imported 3D scenes, change the default Global Illumination mode on GeometryInstance3D from Disabled to Static.

Benefits:

  • VoxelGI/SDFGI will work correctly on primitive/OBJ meshes and CSG nodes out of the box. No more fiddling with properties is required.
    • LightmapGI will still not work for those out of the box unless UV2 is generated for those meshes. That said, changing the default global illumination mode still removes one step from the process, making it slightly more straightforward.

Drawbacks:

  • Dynamic objects will look incorrect until you change the global illumination mode on them.

godotengine/godot#59293 implements this proposal for CSG nodes only, but I wonder if it should be even more general, given how much confusion there is around global illumination modes.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

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

No.

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

This is about changing a default property for better usability out of the box, especially for beginners.

@marstaik
Copy link

marstaik commented May 8, 2022

+1

I'll add that this is more inline with other game engine default behaviors too - IIRC everything in Unreal is set to static by default - although there is no "none" setting, I think you have to manually set a mesh as not contributing to lighting which would be similar.

Dynamic objects will look incorrect until you change the global illumination mode on them.

I don't see this really as a drawback either way - dynamic objects are usually in the minority anyways and their lighting needs special consideration anyways. Changing all objects to be static by default shouldn't change much in practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaks compat Proposal will inevitably break compatibility topic:rendering topic:3d
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants