Sign in to follow this  
duchman

[SOLVED] Help on shadows bias, cast/receive

Recommended Posts

Hello people,

I just cant get it right with bias and object cast while receiving shadows and being self shadowed,  I'm really confused and almost a month trying to get normal result.

I've found many topics on forum, with various solutions, but still can determine what is for ex: "set bias relative to the object size", or juggling with decimal places of this prop along with shadowMax/MinZ..nor any of those solutions found applicable to my scene or objects.

Babylon is magic tool, and more/less I'm  pretty fine using and learning it, but shadows are killing me..

Here is some of my misery:

http://www.babylonjs-playground.com/#JUKXQD#38

Yes, I'm trying with PointLight, I need this object to be in a room , I freeze shadows..

Shelf top surface is not receiving shadows(frames n candles), bottom is receiving(vase), self shadowing is not at its best, but its there..

Just to get it here,  I've scaled it up in Blender - scale:50, cos it did not react to any shadow implementation in Playground before that (too small scene?? More bias decimal places??). 

That must be trivial to some of you guys, please save my nerves, I cant needle pick those values no more :)heeelp! 

Share this post


Link to post
Share on other sites

Hello,

Would it be possible for you to not rely on point light (only for the shadow) ? (they are pretty expensive)

If yes you could set the property direction of the point light to make them behave as spot lights (only for shadow) then you could also tweak the shadowAngle property to tweak the spot shadow shape.

I know it is a trick but it might help with your setup.

BR,

Share this post


Link to post
Share on other sites

Sebavan,

Thnx for inputs, useful tricks are those, still,

to cut it short,  if I have a completely closed room, 4 walls, and need a simulation of a ceiling candle illuminating from top all of the objects on all 4 sides of the room, having them casting and receiving shadows the right way, I cant achieve that with one PointLight, is that what You are implying?

 

 

Share this post


Link to post
Share on other sites

Sebavan, thanks for Your efforts man!

In fact, I've followed Your tricks and made very satisfactory result with SpotLights and PointLight overlapped together ,  each having their own shadowGenerators.

So, with 4 angled SpotLights and one centerd PointLight, and their respective shadowGens I really get what I need, and if that approach is generally ok, Im fine 😊

And, yes, I'm using REFRESHRATE_RENDER_ONCE, so should not be a perf issue, I think..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.