x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Shadows on SpotLightComponent

I'm not sure if I'm doing something wrong or what, but I can't seem to get a dynamic spotlight component attached to an actor (the player's camera in this case) to cause any shadows. I have cast shadows, cast static shadows, and cast dynamic shadows all turned on on the light, and the mesh I've been aiming at has cast shadows and cast dynamic shadows turned on. Additionally, shadows aren't cast by BSP brushes.

On the other hand, attaching a point light component works as expected.

Any help would be much appreciated. Thanks!

Product Version: Not Selected
Tags:
more ▼

asked Dec 23 '14 at 05:36 AM in Rendering

avatar image

redxdev
68 4 10 21

avatar image RomanL Dec 23 '14 at 10:04 AM

Hi!

If I get you right - you got Spot Light attached to the player camera without any offset and some kind of a mesh in front of camera attached to a pawn? If this is true, than you wouldn't actually see a shadow, since Point of View position is the same as light's position. If you will add some kind of an offset to the light's position you should be able to see the shadow.

If you still see no shadow, please tell me whether your project is intended for mobile or for PC/consoles? In case if this is mobile you won't get shadows. Check this out to get more info on this: https://docs.unrealengine.com/latest/INT/Platforms/Mobile/Lighting/index.html

If this is for PC/consoles please attach a screen from your blueprint picturing options both for mesh and light

avatar image redxdev Dec 23 '14 at 05:51 PM

I don't have a mesh in front of the camera (I don't have a mesh on the player at all right now), and I've tried adding different offsets to the spotlight. The project is configured for PC, and I've also made sure point light components will cast shadows (they do).

details

Here's how the component is attached:

EDIT: Also, the light itself works fine, it just doesn't cast dynamic shadows.

Here's the hierarchy of components (FlashlightComponent is the spotlight):

hierarchy

light-settings.png (28.8 kB)
hierarchy.png (9.2 kB)
avatar image sourabhhamigi Jun 21 '16 at 03:10 PM

Has anyone found a solution to this? I have the same problem

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Hi!

So after some research I got this setup working:

alt text

I should admit, that this one didn't start working properly, until I raised Engine Scalability Settings (no shadow, no even dynamic lighting on the static objects with Low level setup).

That is where it is located:

alt text

So basically I think you just need to check this options, since your project is intended for PC and I just did the same setup as yours.

setup_result.jpg (348.0 kB)
scale_settings.jpg (269.7 kB)
more ▼

answered Jan 12 '15 at 10:37 AM

avatar image

RomanL
221 5 5 16

(comments are locked)
10|2000 characters needed characters left

Hi,

I have the same problem here: A Spotlight, which is inside of a Blueprint, doesn't cast shadows. A Spotlight, which is placed on the map without a blueprint works fine. A Pointlight inside of the BP works fine, too.

I have the same settings as newest has (as far as I see). Using version 4.9.2

Btw: I havent used the player pawn as BP.

I hope, someone has an idea, what I can do.

Regards

Christian

alt text

spot.jpg (103.8 kB)
more ▼

answered Oct 24 '15 at 04:36 PM

avatar image

chricken
15 1 2 2

(comments are locked)
10|2000 characters needed characters left

This is the inside of my very ugly Actor/BP. Maybe it helps anwering the question.alt text

spot2.jpg (203.6 kB)
more ▼

answered Oct 24 '15 at 04:38 PM

avatar image

chricken
15 1 2 2

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question