So I have Unity 5 Beta 13, and have a sphere with high emission. Color red, emission around 20 or so. When I set it to static and other objects around it to static, it gives a nice red glow as it should. But this is entirely baked… How can I make the emission pulse/change color, with the glow on the other objects changing with it?
It seems everything is baked, and not a single thing is realtime. Reflection probes don’t support dynamic objects from what I can tell, and emission is not realtime. Am I doing something wrong?
I watched a Unity 5 Lighting video, where it showed red lights in a very futuristic metal room, pulsing red light dynamically.
Here’s a picture with the sphere set to non-static as well as my lighting tab.
The only things you can change in real time to affect the GI are the position, direction, colour and intensity of regular lights, as well as the intensity and colour of emissive materials on static objects.
If you want your dynamic sphere to emit light, try putting a regular light inside it.
Ok. So in the video unity showed, they were using point lights and not emissive materials?
I have tried changing the intensity and colour of emissive materials on static objects and it will not change the GI. So for this sphere, and it’s set to static, and the game is playing, if I change the color and intensity the bridge stays red.
I think there’s a function you need to call if you want it to update the emissive stuff. Unfortunately I don’t remember what it is off the top of my head. It was in one of the threads on the subject, you might be able to find it if you search for it.
Hmmmm. I searched for it, I don’t think I’ll be able to find it without reading through every single thread. I hope we get Unity 5 Docs up soon. If anyone else remembers the function please let me know.
Hi! I am going to add some performance details here, hope this helps.
SetEmissive is a fast path on the CPU and allows you to specify one emissive color to the GI system for the whole object.
You can change the material and then call DynamicGI.UpdateMaterials. Which reads back albedo & emissive textures from the GPU. Due to the readback it might be questionable for a 60 FPS game or on mobile, but if you want to have albedo / emissive updating with accurate texture information then you can use this function. For optimized games, always author geometry so that Dynamic.SetEmissive with a single color for the whole object can be used.
I’m just trying this - both with DynamicGI.UpdateMaterials(renderer) as well as DynamicGI.SetEmissive(...) but neither seems to work. When I make everything static, emissive lighting seems to work quite well - but with dynamic objects not at all.
I’ve also tried disabling Baked GI, and set DynamicGI.synchronousMode = true - but that also doesn’t seem to make a difference.
When I set the objects receiving the light to static, I do seem to get some white light - but the emissive color is a strong red. Only when the emissive objects are also set to static, it does work and results in the expected effect.
So are there any other things that need to be in place?
Are you using standart shader for your emmisive material?
Note: “currently using the Universal shader doesn’t allow to switch to dynamic emission. To try it out you can use surface shaders with legacy deferred rendering path”