Jump to content

Pseudo Shadows


DylanD
 Share

Recommended Posts

Hello everyone, hope you day is going well.

 

I was wondering if there was a way I could set up a light that had a black colour in an already lit scene, to make pseudo shadows like this:

So heres a playground of an object bobbing in an out of the light, but I'm hoping to make it not white like but like a black light, or pseudo shadow.  Notice how the point light does nothing when I make its colour black...

Any Ideas how I could do this?

I would rather not use a shadow generator... but if forced I will :( 

Link to comment
Share on other sites

9 minutes ago, Deltakosh said:

You have multiple options:

- Use the shadowOnlyMaterial that you can apply on top of the mesh: http://doc.babylonjs.com/extensions/shadowonly

- Simulate the shadow with a texture that you set in the ambientTexture channel

Oh I completely forgot about ambient stuff! that should work I will try it out and get back to you! Thanks!

Link to comment
Share on other sites

yes you will need a texture. If you want, you can also leverage the material.lightmapTexture (which can be additive or multiplicative depending on material.useLightmapAsShadowmap)

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