Jump to content

Gaia Bug - Ambient and Directional Light colors don't change with time of day when snow or rain is active


Go to solution Solved by Peter,

Recommended Posts

I've been playing around with Gaia's weather system, and while I really like it and plan to use it in my current project, I've noticed that the ambient lighting and directional light colors don't change as the time changes when snow or rain is active. Instead, they stay whatever color is defined in the relevant weather gradient at the time of day that snow or ran became active. However, stopping rain or snow allows ambient and directional light colors to update based on what's set in PW Sky Standalone gradients, as expected.

Light color updating works as expected and the gradients set in PW Sky Standalone are respected when neither snow or rain is active, but the colors just seem stuck if either weathers are active. Basically, if snow or rain is started at 12pm, the sky will update as usual, but all of the lighting will stay as it is for 12pm. If snow or rain is started at 3am, lighting will stay as it is at 3am, etc.

I've done a bunch of testing to make sure I didn't break anything (I noticed this issue when I was modifying Gaia's lighting color gradients via script), but I'm encountering the issue no matter what, so I think it's a Gaia bug. I've re-tested in a brand new scene with nothing but a very small Gaia terrain and the Gaia Runtime. I've also re-imported Gaia with all default settings to see if something I changed may have caused the issue. I've disabled my script and ensured it's not in the scene, commented out the relevant code, etc. Nothing seems to make a difference.

I'm using Unity 2022.3.20f1 with URP and the latest version of Gaia Pro 2023 (4.0.8-c5). I'm testing in VR on an Oculus Quest 2 with OpenXR, but this issue is occurring whether my headset is connected or not, so I don't think that's relevant. 

See the attached screenshots. The color values shown here never change as time progresses, only if snow or rain are enabled.

Capture.thumb.PNG.6af8f01733bfcbd3c472f375f1d20f48.PNG

Your help is much appreciated.

Thanks!

Link to comment
Share on other sites

I've also just noticed that after snow or rain is enabled, once the sun or moon sets, they never reappear until the weather is disabled again.

Link to comment
Share on other sites

@Bryan - Thanks for the response. Yes, Time of day is enabled, though it's not on a child of PWSky, but on the gameobject itself. Time of day works fine as long as it's not raining or snowing. 

Also, the lighting won't update correctly whether I'm manually updating the slider in the inspector, or automatically with TOD enabled. 

Note that my night time ambient lighting is set to be completely black, thus the complete darkness in the game view. 

This screenshot shows Rain enabled, with TOD set to 16:00, so there should be daylight visible. However, you can see that night time lighting is being shown:

TOD1.thumb.PNG.0e78e110fb44d42b723c07470e0eb5aa.PNG

This screenshot just shows Rain enabled in Gaia Weather:

TOD2.thumb.PNG.4aecac82d0f504df4f477ccb4364d390.PNG

As soon as I turn Rain off, the lighting goes back to being accurate for the actual TOD. I haven't changed the TOD between the previous screenshot and this one:TOD3.thumb.PNG.05c1c1fdd8c5e8ce86904e365d30a092.PNG

The behaviour is strange though. Everything seems to continue to kind of work until the current day or night cycle ends, and then the sun and moon are completely absent from the sky. Lighting color breaks immediately when snow or rain is enabled, sampling the lighting gradient for the time of day when rain/snow was activated, but never really updating it again until rain/snow is disabled. 

See this video as well (It's unlisted, so won't show up in searches for Gaia Pro on Youtube). The start of the video shows lighting behaving as expected, then the issues begin when I enable weather. You can ignore the error in the inspector. I've verified that this issue occurs in brand new scenes with only Gaia.  

 

Link to comment
Share on other sites

I want to say this is because of the cloud and fog settings that would be the cause / result of this. You may want to adjust these two parts of the profile which would allow it to come through a lot more. 

I will message the team as well and see if there is a potential bug that could be coming as well its hard to really tell. 
 

Link to comment
Share on other sites

  • Solution

Hi @JEJoll

I looked more into this from the development side and this was indeed a bug in Gaia, the overrides from the weather effects have not been applied properly to the lighting. This was probably not discovered as it is not as noticeable if the rain kicks in during day or night for 5-10 minutes and then goes away again, but when you have a weather effect on and a fast time of day progression it is quite noticeable. 


I made a patch that fixes this issue, please find it here:

GaiaWeatherUpdateFix.zip
 

You can install the contained unitypackage via Assets > Import Package > Custom Package in the Unity Editor. This fix will be added to the next regular Gaia update as well as this issue would affect everyone.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...