hi!!!
¿It is possible that the “Dynamic.Update Environment ()” is completed at various frames as when a “for” loop it is done within a corroutine ???
regards
hi!!!
¿It is possible that the “Dynamic.Update Environment ()” is completed at various frames as when a “for” loop it is done within a corroutine ???
regards
hi again.
Someone can help me with this ??
regards
You need to post the script or be significantly more specific.
hi
I want to cycle day / night and the ambientLight is based on Skybox.
When the function is used “DynamicGI.UpdateEnvironment ()” to update the ambient light, much performance is lost.
I thought update every 2 seconds because each frame update, it is a very bad idea for all you consume. But in the frame in which you must update, performance much too low and in that frame shows that the gameplay becomes abrupt.
The next thing that occurred to me is that the “DynamicGI.UpdateEnvironment ()” function to complete its work in several frames to soften the loss of performance, but can not access the script containing the function … I guess it’s part of the internal code Unity and will need the source code to modify it. And as I have the free version I can not access it.
Hence comes my question: Any idea how to get the “DynamicGI.UpdateEnvironment ()” is complete in several frames, rather than have do all the work in 1fps?
regards
I’ve never done this, but try playing around with the functions found here. Particularly, the BakeAsync function and possibly the BakeSelectedAsync or BakeLightProbesOnlyAsync functions. Be sure to have BakedGI in the scene turned off and have nothing that’s “lightmap static” in the scene, so you’re only redoing the ambient light.
Thanks for answering
Forgive my ignorance but
BakeGI is to make the lighting Baked? So this would not serve a cycle Day / Night dynamic?
I looked at the manual Unity on the link you put me but I can not clarify
I’m a little confused …
regards
Don’t you need to call that when you completely change the material of the skybox only? Why do you need to call it all the time?
(edit: I was wrong, I guess it doesn’t update. That’s a little weird. Lightprobes do though, so maybe use lightprobes?)
The light from the sun (for instance) changes all of the shadows in the scene, so I assume you’re not using baked lighting on objects in the scene anywhere or it would just look weird. The “Bake” and “BakeAsyc” functions are essentially just that “Build” button in the Lighting window I think, so if Baked GI is turned off for the scene, it should only update the ambient light how you want. If it isn’t updating itself automatically and requires input and time to generate the change in light, it would be technically be baked lighting right? That’s my assumption anyways, as I haven’t tried it out- you’re in a better situation to try it that I am.
LightProbes and avoiding all of this would likely be better, as AcidArrow mentioned.
I’m sorry I took too long to answer.
BakeAsyc does not work in play mode or runtime.
In another thread of the forum I found this in which they mention from Unity that they will introduce it, but I do not know when
regards
https://forum.unity3d.com/threads/dynamicgi-updateenvironment-is-really-slow.416798/