Hi guys,
I am creating a tools that involves bake lightmaps with script,and now my problem is i need to access the values of Indirect Intensity and Bounce Boost in the General GI rollout from the Unity’s Lighting panel.
it seems like they are used to be stored in LightmapEditorSettings, but get obsolete after Unity 5
it should be a simple problem, but weird enough, i can’t find it anywhere in internet, maybe i didn’t do it in the right way…?
thanks !
jason
Use Lightmapping.BounceBoost and Lightmapping.indirectOutputScale instead (I can’t remember if this was exposed in 5.2 or later, but I did expose the API some time ago). They were moved away from the Editor only settings because GI can be realtime in Unity 5.
Hi Engelstoft, thanks for your reply!
I have unity 5.0 and 5.2, and I checked Lightmapping in 5.2 and I found bounceBoost as a internal API as following:
internal static extern float bounceBoost
internal static extern float indirectOutputScale
so I guess… is it possible to make them public?
Good day!
Jason
Yes. I already made them public in Unity 5.3, you can try the beta now.
A follow up question on this issue:
I want to be able to change IndirectOutputScale and BounceBoost in my build based on some logic.
I find that I can’t build using Lightmapping, since it’s under UnityEditor.
How can I set bounce boost and indirect lighting in a way which will allow me to change it at runtime, while not using UnityEditor?
Thanks,
Yoni.
Oh, we have to move those into the DynamicGI before you can change it at runtime. I have added this task to our backlog.
Thank you for your prompt reply.
My solution depends on being able to change those fields, so I have to ask:
Can I expect that to happen sometime soon, or should I reconsider my direction?
Yoni
I’m looking the manual,
I wish to change the float “bounceBoost” that is in Lighting tab → General GI → bounceBoost.
How can I do this? Can you pass me a small C# example, please? I’m using Unity 5.5.1