Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Shadow Catcher material support #420

Open
george-lim opened this issue Dec 2, 2023 · 3 comments
Open

Add Shadow Catcher material support #420

george-lim opened this issue Dec 2, 2023 · 3 comments
Labels
enhancement New feature or request renderer In the renderer module

Comments

@george-lim
Copy link

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 :)

@asny
Copy link
Owner

asny commented Dec 23, 2023

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.

@george-lim
Copy link
Author

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

@asny
Copy link
Owner

asny commented Feb 15, 2024

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

@asny asny added enhancement New feature or request renderer In the renderer module labels Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request renderer In the renderer module
Projects
None yet
Development

No branches or pull requests

2 participants