three-d icon indicating copy to clipboard operation
three-d copied to clipboard

Add Shadow Catcher material support

Open george-lim opened this issue 2 years ago • 3 comments

Hey there!

It would be super awesome if you could add a shadow catcher material or property to the material so that we can have built-in support for materials that catch shadows but are unaffected by light. I don't think that's possible to do right now without making a custom shader, and I've been struggling with that using the core library haha (I looked at the logo example, as well as source for Physical Material but a lot of it feels very foreign to me)

My goal is to have a transparent ground plane catch shadows from a 3D model, but ignore other lighting. If you could build this feature in natively that would be awesome 🙏

Lots of other renderers have built-in support for this, like Unity and Three.js :)

george-lim avatar Dec 02 '23 02:12 george-lim

I'm not sure I understand 🤔 what will you use the catched shadows for? It sounds a bit like a shadow map, which is already supported. Or maybe it's a bit different but I guess you can use the same approach, ie render the shadow into a render target and use that result as a texture.

asny avatar Dec 23 '23 06:12 asny

It's to implement something like this, where I have the transparent floor that catches shadows, but doesn't itself emit light (otherwise the floor would brighten, removing the illusion of the floor being the same color as the background)

Screenshot 2023-12-25 at 2 52 18 PM

I managed to figure this one out using a custom shader, but I'm still having trouble with Mixamo animations which is a blocker for me if you have time to take a look 🙏

I think we can close this issue for now since I managed to find a way around it

george-lim avatar Dec 25 '23 19:12 george-lim

Yeah, ok, that's a very special use-case, but let's leave it open, this is probably a fun task to do 🙂

asny avatar Feb 15 '24 08:02 asny