Jump to content

Struggling with shadows from high-poly mesh


ozRocker
 Share

Recommended Posts

Since we are talking about shadows (I continue in this post instead of creating a new one), even on very simple mesh in some cases there are errors.

 

Look at this PG ("playground") : http://www.babylonjs-playground.com/#1MYQJJ#19

 

The 2 boxes are same size, but one is half way through the ground. That one has a false strange shadow...

Link to comment
Share on other sites

@Deltakosh, can you please explain why this shadow is "correct"? It seems like the light is coming from the other side of the plane to create the second shadow.. that's not really.. normal, is it?

 

And here is another test case to demonstrate the shadow problem discussed in this thread: http://www.babylonjs-playground.com/#19SA2J#1

As soon as any mesh is on the shadowMap renderList and has receiveShadows = true it shows this weird behaivor. In this playground it only stops if the meshes leave the area where the light is directed to, I think.

Link to comment
Share on other sites

Actually this is even more related to VSM lost of precision. You can check it by setting shadowGenerator.useVarianceShadowMap = false

 

http://www.babylonjs-playground.com/#19SA2J#3

 

But in this example, we still have something strange appearing on the cube (when it is moving around lower left corner for instance)

Link to comment
Share on other sites

With the knot test that was posted earlier :
http://www.babylonjs-playground.com/#OPL98

shouldn't the knot also have shadows on it caused by its parts blocking the light?
I only ask because I haven't seen an example with this working in babylon yet. 

Here is a (very very rough) example of what I mean. 

knotshadow.PNG

or like this:

knotshadow1.PNG

 

Link to comment
Share on other sites

  • 4 weeks later...

IT WORKS!!! :D  I just tried out the new babylon.js version 2.1 (alpha) and I'm seeing objects are properly casting shadows on themselves.  It works with my luke_anim demo and also the knots people have posted above.  Thank you very much to whoever made those enhancements!

Link to comment
Share on other sites

  • 3 years later...
On 1/30/2015 at 6:38 PM, Deltakosh said:

I think that Gryff our master of Blender can help you for this one :D

i have some shadows bake from blender and all my objects in scene are static .... and i dont need that babylon make for me shadows...... as i know in unity i have to just add my shaows to  occulusion in material .... now my question is how can i add my own shadows to babylon

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...