Hard shadows problem

I like to have a some type of hard shadows with hard edges without aliasing , but the only thing i get is this:

And the shadows don’t have an hard edges, have a blur in the corners and edges.

Someone know how to fix this ?

A. Need to be for realtime shadows.
B. Need to work with DX10.

Probably what i looking for its for an internal var or change a shader.

Hey ,

Try increasing the lightmap resolution of the floor mesh as this will increase the density of your projected shadows. If it is a BSP surface, decreasing the lightmap resolution will produce a similar effect. Also take a look at your light actors, ‘Shadow Sharpness’ and ‘Shadow Bias’ setting.

You could also try using the ‘Distance Field Shadows’ technique. Distance field shadow maps provide very accurate shadow transitions even at low resolutions, and with very little runtime cost. Like lightmaps, distance field shadow maps require uniquely unwrapped UVs on all StaticMeshes using static lighting.

Distance field shadows work well for soft shadows in the distance and covering the transition between baked shadows and dynamic shadows, when used in combination with Cascaded Shadow Maps.

For more information on these techniques take a look at our documentation found below.

Ray Traced Distance Field Soft Shadows

Cascaded Shadow Maps

These resources should get you to a good working point, but if you have more questions let me know.

Thanks,

This is for realtime shadows no baked for Cascaded Shadows Maps but its at max of Sharpness and give me that results, i need something without that edge filter i can disable something or there is an option for that ?, about the “Ray Traced Distance Field Soft Shadows” that isn’t only a feature for DX11 ?

You are correct that these are tied to SM5 Shader Model (DX11).

Take a look at both of these documentation pages to familiarize yourself with Lighting and Shadowing a bit more. There are hints in there on how to improve your shadowing quality.

Lighting and Shadows

Cheers,

I already know how the shadows and the light work, i post this because i need help, no because i need links to the docs already read and for noobs with UE4.

I need remove the filter of the shadows like in this images Pixel shadows question - Rendering - Unreal Engine Forums and that ins’t in the docs or in the wiki.

The documentation is not meant to undermine your knowledge, but re-enforce the and understand how different light types work when casting shadows.

To continue troubleshooting your issue, would you mind answering these questions.

  • What type of light are you using in your scene?
  • What type of material are you using for these objects?
  • Are the objects is your scene Sprites or is it a plane with a Masked texture?
  • What are the settings for your lights?
  • Can you provide me with some reproducible steps or an asset so I can test this on my end?

Thanks,

  • The lights are a a skylight + a directional light (Intensity 6.814, Shadow Bias 0.15 & Shadow Filter Sharpen 1.0, num dynamic shadows cascades 4, distribution 4.0)
  • About the mesh you got that here Face to camera wrong shadows - Rendering - Unreal Engine Forums but that its about another different problem with the same mesh.

That happend with all shadows (cast by all entities in the map are sharpen but not much, and i need true sharpen without filter) like the forum screens.

Remember all are in realtime put all light to dynamic.

From the image you have provided, I do not see what you are are talking about (the blur on the edges of your shadows, original post). It seems you are attempting to reduce the shadow aliasing, but the object casting the shadows is a masked clipped opacity image. The image itself has pixelated edges, so in order to get rid of this, you are going to want to combine a couple off different approaches.

The few things I would try are using the ‘Dither Temporal AA’ node within the material editor, as well as the ‘Use Area Shadows for Stationary Light’ option on your Directional Light actor. Also, reduce your shadow filter sharpen as this increases the overall sharpness of your shadows, even at a distance. If the value is too sharp, you will get the results you are seeing.

For future reference, we ask that if users are going to submit a project to give us only the Content, Config, and Uproject files zipped into a folder. This way the file size in minimized and the issue still occurs so we can help on our end.

Thanks,

A. That isn’t a project problem.
B. You see the mesh with the texture no ? You see in the ground the corners of the pixels or you see rounded corners in the shadows ? that its YOU CAN’T DO HARD SHADOWS, this a question/feedback post no a bug report. No one go to give you the source code or the binaries of the whole project to check a simple thing of the shadows generic in all projects created with UE.

Hey ,

If this material is sensitive, then I understand. I was not asking for your source code or all of your content from the project. The files mentioned are simply the files needed for a project to produce a clean, exact, successful repro.

This includes the same material/scene set up you are using so we can address your issue from there, and troubleshoot what you are seeing on your machine.

Since you are using the World Position Offset inside of your material, there is a change in how your objects with that material are shadowed.

World Position Offset

This could very much be the root of the issues you are experiencing, including [this][2] one. I grabbed this information from our documentations pages. This issue is going to come down to modifying your materials in certain ways, as well as looking into lighting and shadowing techniques, as your approach is not as straight forward as placing a simple actor (Static Mesh) in the level and having it cast and receive shadows.

Thank you,

I got a project done but its for the other problem if you like use this https://dl.dropboxusercontent.com/u/28070491/UE/Forums/FaceToCamera/POBugsOCHO.zip anyway the shadows problem its in all projects, don’t its a problem its a missing thing how disable the filter of the shadows that its all.

You are mixing things this question don’t its about that.

Well now i got better results after change the numbers in the fake sliders of UE4:

this is what i can get, the corners are rounded but that sounds more like a hardware/software-engine limitation

This is now Closed. Because its obviously there no one can help me to change the internal engine shaders.

You can tell me how if that is a engine limitation why in the 4.6 works but in the news no ?

Explain me this

Open that exact same project you have in 4.6 in 4.7, 4.8, and 4.9 and provide me with the screenshots so there is not descrepency that the contents within are different (i.e. the material you are using between the images look very different).

Well is the same material in all the versions…
If you don’t believe me me try you to do that you.