Jump to content

[SOLVED] Help on shadows bias, cast/receive


duchman
 Share

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! 

Link to comment
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,

Link to comment
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?

 

 

Link to comment
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..

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