Hi
Im trying to set up volumetric fog on a stationary directional light. It it behaves as I expect when Im setting it up but when I relightmap the scene something goes very wrong. If I then switch the light to moveable it works as expected. But switch the light to Stationary (or Static) and it breaks again.
I thought that volumetric fog worked with stationary directional lights?
Replies
Anyway - so, as I said - I'm in the same situation as OP: I get a nice, sharp volumetric fog occlusion / light-shaft effect on the spotlight coming thru my window when it's set to movable:
movable spotlight
....BUT, I want to use it for baked lighting so I can get that nice hot-spot reflection with the shadow from the window frame you can see on the floor (that's the result of a previous bake btw...)
But whenever I set the spotlight to stationary so it contributes to baked lighting and dynamic lighting - this is the result:
stationary spotlight
The light-shaft has more or less vanished. Am I just going to have to do the lighting in two stages at the end? So, when the scene is done I run the final production-quality bake and then switch the stationary lights to movable? It works of course, but I'm wondering if there's a more efficient / permanent solution?
Here's the light setup in context:
Inner and outer cone angles are pretty close to each other....
Each window has two panes of glass (single poly planes, not boxes): one facing outward and one facing in. Outward facing glass has modulated-emissive material to allow light through, inward glass just has emissive material so player can't see out. Neither of the glass materials are set to two-sided. Both inward and outward glass meshes are set to add emissive to static lighting. Wall materials are set to two-sided.
Any ideas?
Thanks in advance for any help, and I hope OP doesn't mind me slightly hijacking the thread...
B.
I'm actually happier with the result I'm getting when I first bake the light set to static - then after the bake, set the same light to movable; much sharper, more defined shadows in the bake.
This is giving a better result than when set to stationary, both before and after baking....
Going to go forward like this unless someone knows of a simpler, one-step way of doing this and getting the same quality?
It was interesting to see your workaround -I havent found a solution but Ive been using a similar way that seems to work for me.
Rather than bake the light then switch it to moveable I duplicated light and set one copy to be a dynamic light (moveable) with the volumetric fog turned on. The other I set as static (with volumetric turned off) and gave it a a very low intensity and a high indirect lighting intensity setting. The idea is to have one light to bake the bounce only light and the other as a dynamic light with the volumetric fog.
TBH your way seems a lot simpler!
Cheers.
I initially tried it your way (two lights in same position; one static, one dynamic) but it seemed to me that the movable light was confusing the bake somehow and ending up at a worse result - shadows weren't so well defined. Also, (I didn't time it, so I may be exaggerating) but I'm fairly sure the bake took significantly longer with the two lights active at the same time.... Maybe give it a shot the other way and post comparisons?
Anyhow - I'm having another minor issue with this and I'm wondering if anyone can help out?
The spotlight is so close to the window that the shadow / hot-spot on the floor is comically huge and distorted - shadows from mid-day sunlight should be about the same size as the object actually creating the shadow....
But whenever I move the light beyond a certain distance from the window, volumetric shadowing from it is disabled....
Current position:
After moving light back:
I can't figure out what is cutting it off - whether it's a setting in the light or in the height fog actor, or maybe even in the window? or the window material? Even when it's moved back, the light is still within the bounds of the lightmass importance volume and everything I want it to hit is within it's attenuation radius. Increasing intensity / attenuation distance / volumetric scattering intensity does nothing - its just cut-off entirely beyond a certain distance from.... I don't know - distance from the particle emitters? the window?
Any ideas? I just want to re-shape that ridiculous shadow without losing volumetric shadowing...
Thanks again, B.
Re: Your first post - just seen that the volumetric scattering intensity of your directional light is at 100 - that's insanely high.
I may be wrong, but when you're setting up a stationary light it effectively behaves as a pure dynamic light with volumetric shadowing, so it'll look ok with those settings before baking.
After baking - for whatever reason - the volumetric shadowing doesn't function the same as before, so that scattering intensity of 100 is going to just totally overwhelm your entire scene.
That could be your answer - the exponential height fog actor doesn't look great by itself in the foreground - you ideally need some particles in there to work with it. Once you do that you can drop the scattering intensity to a sensible level and you should be on your way after that.
Here's my master material setup that I use on particles;
Thanks for posting your fog particle master material. Im very much a beginner with blueprints (Most of my experience is with a proprietary engine) so I havent yet been able to give it a go. But I will when I get a chance. It would be really great to be able to control where the volumetric fog was in my scene rather than a global setting.
Back to my original issue: I found that increasing the volumetric lightmap density (i.e. decreasing the Volumetric Lightmap Detail size in lightmass settings) had no effect on the visible volumetric light shaft. I tried it as low as 25 (default is 200) and there was no difference in my scene.
Increasing the thickness of the walls made no difference.
Static Lighting Level Scale 4