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 a property to control VoxelGI sky contribution #4812

Open
WickedInsignia opened this issue Jul 5, 2022 · 5 comments
Open

Add a property to control VoxelGI sky contribution #4812

WickedInsignia opened this issue Jul 5, 2022 · 5 comments

Comments

@WickedInsignia
Copy link

Describe the project you are working on

Artistic explorations with Godot's rendering capabilities, with the goal for clean high-grade graphics.

Describe the problem or limitation you are having in your project

SDFGI exhibits more sky indirect contribution than VoxelGI.
VoxelGI does not seem to take the sky into account much, and even less so when two bounces are used. This results in an overly warm appearance to the scene.
Sky energy can be increased, but will result in the sky appearing brighter which may not be desirable.

SDFGI at default settings. Plenty of sky contribution that results in an accurate scene.
SkyContribution_SDFGI

VoxelGI at default settings. Sky contribution is considerably lessened.
SkyContribution_VoxelGI

VoxelGI at defaults w/ two bounces. Sky contribution is lessened even further, resulting in an overly warm appearance.
SkyContribution_VoxelGI2Bounces

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

Allow the user to define (and in some cases, over-emphasize) sky indirect contribution in the VoxelGI settings, without affecting the brightness of the sky itself.
At the absolute least, this would offer more artistic control.

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

I'm an artist and not a programmer, so all I can propose is a slider in the VoxelGI settings.

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

See above.

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

VoxelGI is a core graphics component of Godot.

@Calinou
Copy link
Member

Calinou commented Jul 5, 2022

Related to godotengine/godot#55104 and godotengine/godot#54681.

I think this is more of a bug than a feature proposal. Can you test this with a pure bright red sky?

Note that the Energy property in VoxelGIData only affects the amount of visible indirect light, not environment lighting. I'd argue this is done by design, as you can adjust the environment's ambient lighting instead (and VoxelGI should update accordingly, even if you don't bake it again).

@Calinou Calinou changed the title VoxelGI Sky Contribution Control Add a property to control VoxelGI sky contribution Jul 5, 2022
@Calinou
Copy link
Member

Calinou commented Jul 6, 2022

I've done testing in a scene with no lights. Notice how SDFGI's environment lighting is brighter than the others, including when no GI is used at all. On the other hand, VoxelGI's environment lighting seems a tad too dark – but not that much if you compare it to when no GI is used at all.

SDFGI has Bounce Feedback decreased to 0. (Environment lighting is even brighter if you increase Bounce Feedback, which may be a bug.)

VoxelGI has Energy set to 0, Use Two Bounces enabled and Propagation set to 0, but these settings have no effect when there are no lights in the scene.

Testing project: test_fallback_material_1.zip

Default sky

No GI VoxelGI SDFGI
2022-07-06_02 31 59 2022-07-06_02 31 47 2022-07-06_02 30 47

Pure red sky

No GI VoxelGI SDFGI
2022-07-06_22 29 14 2022-07-06_22 29 29 2022-07-06_22 29 46

Pure red sky (ProceduralSkyMaterial's Top Color set to pure green)

This hints at a sRGB/linear color conversion issue, or not enough samples are taken by SDFGI when sampling environment lighting (i.e. it just samples the top spot of the sky, which is pure green). See also godotengine/godot#61504.

No GI VoxelGI SDFGI
2022-07-06_22 30 14 2022-07-06_22 30 31 2022-07-06_22 30 40

Edit: I stumbled upon godotengine/godot#62793 while creating the pure red/green screenshots.

@WickedInsignia
Copy link
Author

Ooooh interesting, I didn't know that Energy and Propagation wouldn't have any effect. Nice to have confirmation that two bounces wasn't affecting skylight contribution either.
I may have to run some tests with Blender to see whether SDFGI's brightness is "physically accurate", but that's always tricky to determine with rasterized graphics. Still, would be nice to have a raytraced reference point that uses the same or closest configuration. I'll have a look at the VoxelGI situation closer as well, including the pure red sky you mentioned above.

I guess at any rate, VoxelGI's results have always been softer/softened so there'll inevitably be a difference between the two. I also noticed SDFGI sends stronger directional light intensity to normal maps, VoxelGI is far softer in the way it affects maps.

@clayjohn
Copy link
Member

clayjohn commented Jul 6, 2022

@WickedInsignia if you could put together a testing project that runs in Blender and Godot and post it here we would be very grateful. One of our priorities as we approach release will be validating the results of any of our new features (shadows, GI, etc). The best way to do that is to compare the same scene between Blender and Godot, but we haven't had the time and resources to do so yet. It would be a huge help if someone artistically-minded put something together (and shared it with us).

@WickedInsignia
Copy link
Author

@clayjohn Perfect, I can do that. I'll pull together some scenes to test a few scenarios, match them across the software and put the files + my findings here.

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