-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Split Environment and WorldEnvironment into 2D and 3D versions #4564
Comments
You are all so more eloquent than me ... I agree that WorldEnvironment is a confusing clusterfuck node but what about reacting to the current 2D or 3D use, maybe with a dropdown enum, and hiding invalid options? I often combine 2D and 3D in the same world and I cannot split this into two worlds in two different viewports that use "own_world" setting so two different WorldEnvironment can coexist. |
@smix8 That's certainly a valid option, though I'm still in favor of separate nodes. Note that if WorldEnvironment2D and WorldEnvironment3D were separate, you could have one of each in a scene - it would be silly otherwise. |
The main issue is that WorldEnvironment is for 3D and its used in 2D to do glow and HDR. IMO what we need to implement is HDR 2D viewports that handle this as pure 2D without requiring WorldEnvironment. |
which I think is still very much in alignment with this proposal. whether it's a node that's called WorldEnvironment2D, another Resource that somehow interfaces with the Viewport, or anything else, I'd say that's more of an implementation detail - point is it should be separated from 3D. hopefully it'll be possible to get close to what was available and how the effects looked like in Godot 3. if it were to be implemented purely in 2D, would one or several of the options I marked above likely be lost? |
WorldEnvironment should be changed to WorldLight or LightSettings (because suggested implementation literally deconstructed Environment resource into multiple vertex shaders), that controls light settings within the engine. I partially reposted it from #2196, so for detials on Prep and Post shaders read there. I think its better to approach shader typing is like godot does it with its objects (like we have some Main empty shader class, that have Sky, CanvasItem/2D, 3D, Prep, Post childern that are extending from it with their own uniform hints and also could be converted/extended into your custom shader class for editing, just like objects in godot). the base hierarcy that I thought of:
Each shader will have "next pass" and "prep pass" that allow to construct desired shader using other shaders. this could be more flexible in terms of adding obscure functionality, like drawing 2D elements directly In 3D or the other way around (3D on 3D) without limitation of the SubViewport node. The current system not only makes rendering process much more transparent to the end user, but also will makes "next pass" much more usefull than curently it is, and also solves the problem with post and pre process shaders, and the problems they are causing with transparency. P.S. Im aware thats literally changes the entire underlying rendering system, so Its probably gonna be released in like Godot 5. |
Describe the project you are working on
I'm working on Godot, including helping users learn the engine.
Describe the problem or limitation you are having in your project
The
Environment
resource, and theWorldEnvironment
node, are fairly confusing. Most of the settings are only applicable for 3D, but this node can also be used for 2D. The duality of this node is hinted at by its icon being a split of red and blue, but most users don't seem to know that this node can be used for 2D. Even if they do, it's not at all obvious which of the features ofWorldEnvironment
are applicable to 2D, in a sea of 3D-only options.Describe the feature / enhancement and how it helps to overcome the problem or limitation
The proposal is to split
Environment
andWorldEnvironment
into 2D and 3D versions.Environment2D
andWorldEnvironment2D
would only have features that are applicable to 2D.Environment3D
andWorldEnvironment3D
would only have features that are applicable to 3D.This would likely also involve splitting
CameraEffects
intoCameraEffects2D
andCameraEffects3D
, and adding aCameraEffects2D
property toCamera2D
just like how we already haveCameraEffects
onCamera3D
.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This will involve a lot of refactoring.
If this enhancement will not be used often, can it be worked around with a few lines of script?
This will be used very often. The workaround is to just deal with how it's confusing.
Is there a reason why this should be core and not an add-on in the asset library?
Environment
andWorldEnvironment
are already in core.The text was updated successfully, but these errors were encountered: