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

Add unshaded mode to volumetric fog rendering #5079

Open
Tracked by #69579
jcarlosrc opened this issue Aug 5, 2022 · 7 comments
Open
Tracked by #69579

Add unshaded mode to volumetric fog rendering #5079

jcarlosrc opened this issue Aug 5, 2022 · 7 comments

Comments

@jcarlosrc
Copy link

Describe the project you are working on

A non-realistic 3d game.

Describe the problem or limitation you are having in your project

I need to port a non realistic fog from Godot 3 to the new Godot 4 as in the picture. However, the current Godot 4 fog volumes only have albedo and emission properties. These can not be ajusted to obtain the required effect. While they are physically accurate, the nature of the game does require a different non realistic look. It could be solved adding more options to fog rendering such as the "unshaded" mode to render only its albedo color.

Captura de Tela (70)

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

Adding an unshaded render mode for fog volumes to achieve a non realistic look, similar to Godot 3. Maybe adding other options to have a more artistic freedom.

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

render_mode unshaded should make fog to render only its albedo color with no light interaction.

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

This is not a simple feature.

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

Fog was used extensively in Godot 3 and Godot 4 can not achieve the same look in some cases.

@jcarlosrc jcarlosrc changed the title Add unshaded and other rendering modes for fog volumes in Godot 4. Unshaded and other rendering modes for fog volumes in Godot 4. Aug 5, 2022
@Calinou
Copy link
Member

Calinou commented Aug 5, 2022

This should already be possible. If you want fog to appear unshaded, set albedo to Color(0, 0, 0) (black) and set the emission color to the color you want to display instead. This will make fog not react to lighting in any way.

(This can also be done with BaseMaterial3D, in case you need features that are disabled when enabling the Unshaded flag.)

@jcarlosrc
Copy link
Author

Setting Albedo= (0, 0, 0) and Emission = Color is not equivalent to an unshaded effect. First, emission creates a light that affect shaded objects. And also, the color result is similar but not actually equal. In the picture rendered with Godot 4 alpha, the "player" is affected by the emission color, and also the result is non uniform. I think fog volumes could have more options similar to BaseMaterial3D to obtain more precise results. Also, the density can not be controllerd with a curve which limits the desired effect.

Captura de Tela (86)
Captura de Tela (88)

@Calinou Calinou changed the title Unshaded and other rendering modes for fog volumes in Godot 4. Add unshaded mode to volumetric fog rendering Aug 6, 2022
@clayjohn
Copy link
Member

clayjohn commented Aug 7, 2022

If your goal is to achieve a simple fog similar to Godot 3, isn't using the non-volumetric fog sufficient? The benefit of volumetric fog is that it interacts realistically with lights while the non-volumetric fog does not

@jcarlosrc
Copy link
Author

If your goal is to achieve a simple fog similar to Godot 3, isn't using the non-volumetric fog sufficient? The benefit of volumetric fog is that it interacts realistically with lights while the non-volumetric fog does not

Fog in Godot 4 does not allow the same level of control as Godot 3 for the non-volumetric fog. Thats why adding more rendering options could make Godot 4 fog to include gone options. The other way is getting back options from Godot 3.

@Calinou
Copy link
Member

Calinou commented Aug 9, 2022

Fog in Godot 4 does not allow the same level of control as Godot 3 for the non-volumetric fog.

See #3429, #4619 and #2643.

@clayjohn
Copy link
Member

clayjohn commented Aug 9, 2022

I wonder if what you are really looking for is #4619 (bringing back some of the control that 3.x has) (Thank you Calinou for digging up the related proposals)

@jcarlosrc
Copy link
Author

I wonder if what you are really looking for is #4619 (bringing back some of the control that 3.x has) (Thank you Calinou for digging up the related proposals)

I posted a request to bring back Godot 3 fog control features. However, with fog shaders coming in Godot 4, I believe they could bring more options for artistic freedom, not only for my specific case.

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