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 fading as they approach the solid object that is casting them

I have a C++ point light lighting up a small room with a table. When this light shines on the table, the shadows become incorrect. I have read that this can be fixed by checking the box "Light as static" in the light's properties. But because I am working in C++, i'm not sure I have Checked the right box, so to speak. I have toyed around with enabling bCastDynamicShadows and bCastStaticShadows, but haven't found a solution yet. The table legs are touching the surface in this picture, but I have tested with both clipping through and slightly above to no avail.

alt text

Also, is there an easy way to find what C++ member data corresponds to what Blueprint property? I can't find anything useful on the subject.

Product Version: UE 4.18
wrongshadows.png (232.4 kB)
more ▼

asked Aug 21 '18 at 02:37 PM in C++ Programming

avatar image

1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

This is caused by the shadow bias paramenter on your light. If you reduce the shadow bias, the shadow will start closer to the object it is casting it. A good balance i tend to use is Shadow bias 0.25, Shadow filter sharpent 0.125 (take in account that while this will solve your issue it might result on sharper shadows that might requiere higher lightmap resolutions to look as intended.

alt text

Look for those params on your light properties.
Hope it helped! have a nice day!

sin-titulo.png (13.2 kB)
more ▼

answered Aug 21 '18 at 05:16 PM

avatar image

886 21 13 29

avatar image Samuel.Meier Aug 21 '18 at 06:33 PM

Its super close! I found and adjusted the settings, and it looks a lot better, but there is still a disconnect between the object and shadow.

I did a little more digging and found something about Lightmap resolution. Do you know anything about that? I can't find much good in the way of C++. just something about Shadow Dynamic draw distance, which I can't find in C++ terms.

alt text

sameissue.png (1.1 MB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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