You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
Performance issues occur due to imported materials from 3D scenes often using Disabled cull mode as a default. This comes from either glTF or Blender materials being configured this way by default (I haven't checked thoroughly).
This is particularly the case when using the Mobile rendering method, which doesn't use a depth prepass.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add cull mode option to materials in the Advanced Import Settings dialog. Additionally, ignore the default Disabled cull mode to avoid performance issues that are difficult to diagnose for new and returning users alike. It's generally hard to notice that you're using double-shaded rendering in Godot, unless you make the camera enter solid geometry somehow.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I suggest defaulting imported 3D scenes to backface culling, and ignoring double-sided hints that are set by default by 3D DCCs. If you want to use Disabled cull mode, you'd have to pick a 4th option from the Cull Mode enum:
Default (Back if Disabled on source)
Back
Front
Disabled (Force)
The second change unfortunately breaks visual compatibility (existing scenes may have a changed appearance), but given the glTF/Blender default is ill-suited for real-time rendering, it makes sense to do so. We could print a warning in the editor when importing such materials for the first time.
If this enhancement will not be used often, can it be worked around with a few lines of script?
In some cases, yes, by assigning this script to a MeshInstance3D node. Example for forcing the Back cull mode on all materials:
Describe the project you are working on
Describe the problem or limitation you are having in your project
Performance issues occur due to imported materials from 3D scenes often using Disabled cull mode as a default. This comes from either glTF or Blender materials being configured this way by default (I haven't checked thoroughly).
This is particularly the case when using the Mobile rendering method, which doesn't use a depth prepass.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add cull mode option to materials in the Advanced Import Settings dialog. Additionally, ignore the default Disabled cull mode to avoid performance issues that are difficult to diagnose for new and returning users alike. It's generally hard to notice that you're using double-shaded rendering in Godot, unless you make the camera enter solid geometry somehow.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The second change unfortunately breaks visual compatibility (existing scenes may have a changed appearance), but given the glTF/Blender default is ill-suited for real-time rendering, it makes sense to do so. We could print a warning in the editor when importing such materials for the first time.
If this enhancement will not be used often, can it be worked around with a few lines of script?
In some cases, yes, by assigning this script to a MeshInstance3D node. Example for forcing the Back cull mode on all materials:
Is there a reason why this should be core and not an add-on in the asset library?
This is about improving 3D rendering performance by optimizing the asset pipeline's output.
The text was updated successfully, but these errors were encountered: