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"

The offset position of dynamic shadows problem.

I have a questions about dynamick shadows with Stationary light source. My shadows from Movable meshes are jump depending on the position of the camera. Look at the shadows on the cat.

alt textalt text

Product Version: UE 4.10
Tags:
more ▼

asked Dec 25 '15 at 10:13 AM in Rendering

avatar image

Allien
11 1 4 5

avatar image Allien Dec 28 '15 at 12:31 PM
avatar image AndrewHurley Dec 28 '15 at 08:24 PM

Hey Allien,

It almost seems like an LOD popping issue, as when you get closer the LOD for the mesh casting the shadow switches. If you do not have LODs in place, then we can rule that out as the culprit.

This could also be due to your shadow distances applied within the Cascaded Shadow map options of your light source.

Could you provide me with some screenshots of your main source of light that is casting producing these shadows?

Thank you,

Andrew Hurley

avatar image Allien Dec 29 '15 at 11:53 AM

Hello Andrew Hurley,

I use point or spot light source. Of course i have no any LOD's for my static meshes. Also for good shadow quality i use these settings:

 r.ShadowQuality=5
 r.Shadow.TexelsPerPixel 200
 r.Shadow.MaxResolution 4096
 r.Shadow.SpotLightDepthBias 0
 r.Shadow.RadiusThreshold 0.03 

In any case the problem can be seen with the default settings but not so clearly. I do not see sense in additional screenshots of my light source, another unreal user's easily reproduce bug with dafault point or spot lights while try to help me. Add some other examples:

Screenshot

GIF

Where can i change Cascaded Shadow map options for spot/point lights? I saw some of them only in Directional light source.

Sincerely,

Alexander Goryachev.

avatar image AndrewHurley Dec 31 '15 at 05:22 PM

I should have been a bit more clear. I was requesting the properties of your light actor, i.e. Light Type (Directional, Point, or Spot), Mobility (Static, Stationary, Movable), and other settings.

Cascaded Shadow Maps are currently only available for Directional Lights which is why I mentioned this option.

I attempted to reproduce what you are reporting in a blank level using a similar set-up, and am not seeing the shadowing issue on my end. I even entered the the rendering console commands you provided, and still did not see any shadowing issues. I will mention that I made sure my 'Engine Scalability' settings were all set to 'Epic', and the 'Lighting Quality' was set on 'Production'.

Also, since I was using a BSP to create the walls, I made sure the Lightmap Resolution was set to 4.0 which provides a denser light and shadow map when working on brush surfaces.

alt text

Could you provide me with some reproducible steps so I can get this to appear in a blank project?

Thanks,

Andrew Hurley

shadowissue.png (1.6 MB)
avatar image Allien Dec 31 '15 at 05:41 PM

1) Create empty scene.

2) Use meshes from attachment and place all of them in 0,0,0 coordinates.

2) Chandelier01 and HelMetal01 must be Movable.

4) Put Stationary LightSpot inside Chandelier01.

5) Build light.

Attachment

meshes.zip (302.2 kB)
avatar image AndrewHurley Dec 31 '15 at 10:41 PM

I am not experiencing the shadow popping that you are reporting. I did have to change the default Lightmap Resolution of your wall mesh to 512, and the wall tube to 128, and set the lighting quality to production to see the best results.

alt text

sceneshadows.png (1.2 MB)
avatar image Allien Jan 01 '16 at 09:03 AM

Looks like you are bake lightmaps from Chandelier01 and HelMetal01, they must be movable objects and cast dynamic shadows. I just add my simple test project in attachment.

alt text

Attachment from DropBox: link

avatar image AndrewHurley Jan 03 '16 at 07:20 PM

You can still produce a high quality shadow using the sationary light by tweaking some settings. Try increasing the resolution of the walls receiving the shadows. Something like 256 up from 64 will definitely help. Also making sure you settings are all on Epic and your Lighting Quality is set to Production. You can also reduce the shadow bias and increase the shadow sharpness. There are a lot of ways to increase shadow quality without losing performance, it's is all about finding the appropriate balance for your project/scene.

Thanks,

Andrew Hurley

avatar image Allien Jan 03 '16 at 08:15 PM

I have repeatedly tried everything that you advised. This is a problem of another kind is not related to quality.

avatar image AndrewHurley Jan 03 '16 at 08:33 PM

If you manage to find the culprit of the changing shadows, let me know. I will also mention, you are using the 'Generate Mesh Distance Fields' option within your Project Settings.

Perhaps try increase the 'Distance Field Resolution Scale' of your meshes casting shadows.

avatar image Allien Jan 03 '16 at 09:24 PM

That's all I also tried. If there are more ideas do not forget to throw it to me!

avatar image AndrewHurley Jan 04 '16 at 03:12 PM

Are you using the 'Mesh Distance Field' visualizer when making the changes to your Distance Field Resolution Scale of your Static Mesh actors?

This is found via the Show>Visualize>Mesh Distance Fields

alt text

avatar image Allien Jan 04 '16 at 08:29 PM

Yep! But the problem remains, in any case. I'm beginning to think that is a bug.

avatar image AndrewHurley Jan 04 '16 at 10:11 PM

I was able to reproduce the issue on my end with the help of a team member and we are currently investigating whether or not this is a bug, or just a variable that needs to be changed for the light actor itself to resolve the issue.

If we are unable to resolve the issue, we will continue with the bug reporting process. Thanks for your patience while we investigate.

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

1 answer: sort voted first

So I believe I found the answer to your issue. Since your objects are movable, and your light is Stationary, meaning it can bake lightmaps/shadowmaps and produce dynamic shadows as well, you will want to make sure your objects are enabled to bake the light as if it were static, but still produce the dynamic shadows.

On both your HelMetal01 and your Chandelier01, enable the 'Light as if Static' option to be able to bake static shadows for a movable object. If you don't want to bake lighting for that light source, change its mobility to movable instead of stationary to get the highest quality. A lot of people think that changing a light to movable is going to have a huge performance impact, but that isn't always the case. It depends on what it is being used for, and how much of the scene the light source is affecting.

Light as if Static

alt text

For a more in depth understanding of Stationary Lighting, take a look at our documentation provided in the link below.

Stationary Lights

https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/LightMobility/StationaryLights/index.html

If you have further questions, please let me know.

Thanks,

Andrew Hurley

more ▼

answered Jan 03 '16 at 06:41 PM

avatar image Allien Jan 03 '16 at 06:53 PM

Thanks for the answer. But I need a high-quality dynamic shadows is using Staionary light source. Basically, I got what I wanted, there was only a problem with offset shadows. I'll try to find a solution to the problem itself again.

(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