Spotlight inside of Blueprint doesnt make shadows

Hi,

I have a problem with my lights.
There is a blueprint, which shall be a searchlight and it will light a yard, later. Searching for my player.
This blueprint is containing a searchlight (well…).

This searchlight unfortunately doesn’t generate shadows.
When I have a searchlight without a Blueprint, it makes shadows.
When I have a pointlight within the same Blueprint, it makes shadows.

No idea, what I have to look for.

Regards
Christian

That is a easy problem as far as i know.
I had the same error and figured out: There was a directional light that was so bright that every other light was deffected.
Try an remove the direct light one time

Point the spotlight on the no shadow item, still no shadow then?

I switched off the direct light and the skylight. No effect.

@unit23: Sorry, but I don’t understand, what you mean.
The spotlight points to the object, which shall make a shadow.

Try spotlights out wich are not in the blueprint. And maybe the spotlight is disable?
Check for visible status
affect world
and cast shadows.

Und ja warum hat das Objekt an dem das Spotlight ist einen Leuchteffekt? Is da ein anderes licht?

Oh, I bet thats pure German Engineering :stuck_out_tongue:
Germans can make enny Schpotleid schein :smiley:

Yes, we can that. lol :wink:

There is a pointlight inside of the Blueprint too. It shall proof, that making shadows out of Blueprints works generally.
I should have told you, sorry.

The spotlight has every neccessary options on:

  • Affect World
  • Cast Shadows (dynamic and static)

My next idea would be to place the spotlight outside of the Blueprint.
But I’d rather avoid that, as it makes the logic more complex.

Is the type set to static or dynamic? I didn’t see in the screenshot which is odd. Maybe it is attached to a static root ?

Hi,

thank you for your replies.
I got a step further in solving this problem:

The spotlight had a very big attenuation radius.
I changed that for testing and the shadow appeared magically.

I have three images attached to illustrate that. The only thing changed is the attenuation radius of the spotlight.
The images show attenuation radii of 3000, 15000 and 30000 units.
I guess the reason for this is something like the resolution of the shadowmap. Am I guessing right?

Unfortunately, the shadow in far away regions of the map is essential for my game.
Is there a way to increase the resolution of the shadowmap (if my guessing is right)?

One more thing, that disappoints me, is that the shadow disappears, when the camera is standing in far from the object. I understand that this is for kind of LOD and to spare performance.
But I need to see the shadows, even when they are far away.

Is there a way to increase the distance, where the shadows are getting invisible?

You could try enabling ray traced distance field shadows. I’m afraid that with a huge spotlight like that it will be very hard to get good resolution for small shadows with regular shadowing methods since it has to fit your shadowmap over the whole bounds.

You could try typing ‘r.shadows.minresolution 4096’ to see if it helps but I cant remember if that helps spotlights or just the directional light. Cant hurt!

Thanks for your reply.
Raytraced Shadows work fine with static meshes.
Unfortunately my maps consist mainly of landscape, where I have no shadows.
So that doesn’t help.

Can you give me a hint, where I have to type ‘r.shadows.minresolution 4096’ to make that work?

at the console, you can type tilda (~) to bring it up, and also tab works if you are ingame.

Thank you,
I am gonna try that.

And I have decided, not to use the landscape. Instead, I am going to model my maps in blender.
That gives me the nice shadows and the ability to model cliffs, holes, caves and overhangs in one go.
More detailed shadows will be fine.

Hello, I am having the same issue. When I have a spotlight inside of a BP it does not illuminate using VM shadows during game play. While im editing the scene it shows just fine. As soon as I hit simulate to test the scene, they all disappear. :frowning:

However when I have a spotlight in the scene outside of the blueprint, it works as expected.

I have all the setting enabled for the correct rendering. I have built my lighting, the light in the BP is movable, cast dynamic shadows, affects world, cast volumetric shadows. This BP is replicated in my scene a number of times with each light having different properties…

Any insight on how this could be fixed so i can still use my current method using BPs?

Thanks!

try disabling distance fields shadows

2 Likes