Need some help solving a lantern lighting problem


I have this magical lantern here:

And I’m trying to make it a light source.
First thing I thought - emissive light. It worked but… kinda janky. The lighting was uneven and weird. But the bigger problem - it does not illuminate dynamic objects passing by. So this method won’t do.

Next thing I tried is putting a point light inside. Which obviously gives ugly shadows:

Then I fixed it by adding some extra geometry to block the parts where the metal is:

It worked, but I don’t like the result… Even after baking the static light the shadows are ugly.

Ok, next idea - I’ll just leave the bottom covered, and remove the rest of the light blocking geometry:

That’s more like what I want! And after baking the light it looks great! I set the light source to have lenghts of 10 and radius of 8, so the shadow becomes soft after baking.

HOWEVER. This part bothers me to no end:

I don’t know how to fix that. I tried to block the light from underneath, but it results in additional shadows on the surroundings:

And I want to avoid that, if possible.

I tried a spot light and rectangle lights… but didn’t get satisfying results.

So my question is, how can I get rid of this self-illumination issue ?

Maybe you can try separating your mesh into two pieces: bottom with cast shadows true (in order to keep intersting shadows) and top with cast shadows false? Maybe this can solve the raytracing problem coming from above.

When I disable shadows from the mesh, self-shadowing is completely gone. That’s what causing illumination of the top part, since those surfaces are facing the light source inside of the lantern.
As I mentioned above, if I block the light for the top part, or if I separate it from the rest of the mesh and enable shadows for it, then I get big shadow circles on the ceiling and walls, and pillars. And I’d like to avoid that for aesthetical reason.

There has to be some solution…

I understand your issue, very much a perfectionist.
Its never perfect, there is always a give-and-take in these situations.
Question: How important is the lamp to you, and how important is it to the player :slight_smile:
Most players would just run by and not think about it at all.
There is somewhat of a medium solution here, have a one sided circle plate in the top facing the light with a semi-transparant surface that you tweak until it’s to your satisfaction.
But that can be very costly for just a lamp. especially if you place allot of these throughout your scene. At some point you will have to compromise on something, games are allot of smoke and mirrors. :wink:

I understand. It’s just the glowing top is so jarring, that it looks completely weird and out of place. I don’t think players won’t notice it.

One solution that comes to mind is to tweak the mesh - remove lid and handle from the top and make another glowing surface there. But I don’t really want to resort to that…


If you achieve it with static lighting like this, you’ll run into the same problem as with the emissive before: it won’t illuminate the dynamic objects!!
BUT it’s only with the default lightmass settings!! Since Unreal is working with lighting samples you CAN have as perfect lighting on dynamic objects as on the static ones!! You just have to lower the Volumetric Lightmap Detail Cell Size!!! It’s in cms and the default is 200, which is every 2 meters!!
With the lamp… Are you using 2 sided material for the opaque parts? Or do they have thickness or just made up of planes?

The mesh is one-sided without thickness.

As for volumetric lightmap samples… They are such a headache! They never work as I want them to. I can’t control them - the engine just does whatever it wants. I lowered samples cell size down to 75 even, and it’s still not working properly. I have lightmass importance volume around the area where I need proper lighting. But the engine still places a lot of samples above my interior, where they are not needed, and doesn’t place enough samples in another areas inside the level.

See how it simply refuses to put any samples in this area for some reason? Between the end of the stairs and where the camera is.

Or this tile completely lacking any samples.

But I had a separate thread about this exact issue : How to prevent character and movable objects from being highlighted through walls? - #17 by Kligan

I was looking for a solution myself for something similar, and I came up with one solution.
At least in unreal engine 5.3 you can select up to three Light Channels, 0 1 or 2. By default everything is channel 0.
You will need the lantern static mesh, two point lights, and small geometry to fake lantern shadows if needed.
One point light, inside the lantern, and the geometry for the shadows, will be on light channel 0.
The static mesh will be on light channel 1, but since it would be complete darkness and appear just as black, you will need that second point light, set it on light channel 1 too, and use it give ambient/color to the lamp itself.

It works when using lumen/global illumination, , and it works when I did “production” lighting build, but when I did “preview” lighting build it looked terrible.
If you are unsure, do a “production” light build and see if it works for you, then you can continue your project with preview build knowing if it works or not and trusting the system until it’s time to ship it.