As captured. We now have a checkbox to turn on/off “Use Emissive for Static Lighting” in component detail panel, and if I check that, there will be a static light in the color of build-time material and won’t change. That is to say, if I create a component with red emissive material and build light, the environment around it will become under red light. But when I trigger something to change it to blue, the environment light is still red.
What I wanna have is an emissive light change when material change, or so-called dynamic emissive light. Dunno if there’s anyway to achieve that yet?
You can achieve that effect by implementing the LPV system. You will need to add ‘r.LightPropagationVolume=1’ to your consolevariables.ini file (in the Engine \ Config directory). This will require you restart your project. Then you can go into the material (not the mesh as in static) and in the Material Attributes check Emissive (Dynamic Area Light) to true.
Hi Eric, I’ve followed your suggestion and checked “Emissive (Dynamic Area Light)” to true, but when I updated the emissive material to blue one, the light cast was still the original red color. The update was during play so I was not able to click “Build” again. Did I miss any setting so that there was not in game dynamic light?
Have you enabled LPVs in your engine’s ConsoleVariables.ini file? I have included a sample project that renders correctly and changes a cube emissive material from green to red on pressing “k” on the keyboard. Look at my settings in this project to help you out. BUT, you will need to enable LPV’s in the engine before it will work correctly.
Hi Eric, maybe I didn’t make things clear… I am able to change the color of emissive material, just like in your test project, but I cannot change the light color it casts on environment walls, as stated in above picture.
When the origin of light - the emissive material, turns from red to blue, the light it casts is still red and not changed. I used a new feature called “Use Emissive for Static Lighting”, which you can find in detail panel of material blueprint. As it is named as “static”, I think it perhaps can only cast static light without change over time? But now I need some function to make environment light change once emissive material color changes. Is there any way to achieve that now?
You are correct the only way to dynamically change the light from an emissive material is using the LPV method in my test bed above. Using the Emissive as Static option will only work (change) at build time and cannot be changed at runtime. To change the environment color, you can have the Skylight in your level be Stationary or Movable and then use a blueprint change to adjust the light color at runtime which will result in a change to the total environment color (I would also suggest un-checking Lower Hemisphere is black.), but that will not overwrite the backed lighting generated by the emissive material.
Hopefully that clears up the confusion, my apologies for not understanding your question up front -
Love the Light Propogation Volume solution, but I’m having problems getting it to work. I’m using build 4.7.5.
I’ve modified the .ini file and your content example works perfectly (thanks!). But when I create a new project, even if I migrate the material and the material instance, the effect doesn’t seem to work. I’ve set up the post process volume and turned on the LPV settings to match the settings you had in your example. No avail.
I tried it in the reverse, and my static mesh that I migrated to your example file from my project also lit up perfectly, so it’s not the mesh. I applied the material instance to it directly, it works just fine.
I’m probably missing something obvious, but it’s driving me crazy.
Currently with LPV only Directional light is supported as a light source. There are plans to add Point and Spot light in a future release as well (UE-3138).
When using the LPV option in a Material for “Emissive (Dynamic Area Light)” enabled will not actually treat the material as a light source, but instead will just inject the emissive color into the bounce generated from the directional light.
Here is an example with LPV enabled for the directional light:
Right now, LPV is still not in a “Production-Ready” state. It’s still a “hidden” feature that needs to be enabled outside of the editor. There are changes coming soon from Lionhead Studios that may be in 4.8, but I’m not entirely sure at the moment if that will be the case.
Hi, Tim Hobson. I followed your way and succeeded in making the dynamic emissive light. But I dragged a cube beside the emissive sphere, I found that there was no shadow behind the cube. Is there any ways to make shadows for other actors? Thank you very much.
The LPV only injects lighting in the scene but doesn’t actually shadow cast. The object, such as your cube, would need to have cast its own shadows from any nearby light sources, such as a point/spot/directional light.
Wow you are absolutely right, i seemed to have posted in wrong section this is what happens when you have a bunch of tabs opened. Sorry about that. This goes in light building section. But ill erase my post here.