Jump to content

Shadows looking awful


KarelAnker
 Share

Recommended Posts

Hey,

 

I basically have a problem, which is easiest to describe as following: I have a terrain, it should receive shadows from itself and cast them. The problem is that the terrain doesn't have 1 height. On certain positions its higher than other spots. However, the shadows are really awful when you have a terrain like this which should cast and receive shadows. 

 

Here's a picture of what I mean:

 

wy5vXgY.jpg

 

Code:

shadowGenerator = new BABYLON.ShadowGenerator(4 * 1024, light);shadowGenerator.bias = 0.00001;shadowGenerator.usePoissonSampling = true;

Upping the bias kinda matters, but it's not the effect that I desire, because only fully shadowed places will be black, like this:

 

1iMLkQi.jpg

 

Decreasing / increasing shadow quality just makes the triangles on the shadows bigger or smaller.

 

Close up of the shadow:

http://imgur.com/lSqb4IH

 

== 

Link to comment
Share on other sites

Hey @Deltakosh - I'm still also struggling with shadows.

 

I've noted that Blend4Web seem to have achieved nice looking shadows in a large open-world scene here:

https://www.blend4web.com/apps/firstperson/firstperson.html?v=20151020144053

 

Looking at the shadows they seem to get rougher in the distance, so I guess they're just using CSM as you were planning? Or is it some other trick maybe?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...