godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.11k stars 69 forks source link

Implement per-surface visual layers #10261

Open RadiantUwU opened 1 month ago

RadiantUwU commented 1 month ago

Describe the project you are working on

3D sci-fi game with high-end VFX

Describe the problem or limitation you are having in your project

I have a mesh with a smooth and a rough material. I want a reflection probe to only apply to the rough material and not the smooth one.

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

It would allow me to change the view layers for the surface, making it only apply to the rough material.

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

This could work by adding a new method inside GeometryInstance3D to allow setting surface based view layers. Changing the whole instance's view layers results in changing it on all surfaces.

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

It could be separated into two MeshInstance3D with different view layers.

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

This should be core since it would help users set up their reflection probes better.

Calinou commented 1 month ago