-
Notifications
You must be signed in to change notification settings - Fork 27
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
MTOON shader is not receiving shadows #110
Comments
Hi @alacamda, thanks for opening an issue. Could you please provide some screenshots and reproduction steps and/or test scenes that reproduce this? note that MToon is not a physically accurate rendering model, so the shadows will not function the same as with a conventional PBR shader. also make sure you have a shade color assigned and a shade texture (can be set to the same texture if you use a shade color) |
Here you can see a very simple test scene. In the first image, VRM character with Mtoon is not receiving any shadows from the wall. As you can see the shadows affect the car next to the character In the second image, the character is out of the zone of influence of the shadow projected by the wall, but it looks the same as it looks in the first picture. It is easy to reproduce, just create a simple scene with a directional light and a big cube projecting a shadow. The Shadow projected by the cube darkens areas of 3d meshes like the car, but not the VRM character that does not look darker Hope this helps! |
Would it be possible to show the inspector with the material opened, or perhaps share the VRM model you are using, if the license permits. My guess is your model's Shade Color is very close to white, which will cause shadowing to have almost no effect. Note that for physically accurate shadowing, Shade Color should be black. The other cause could be due to indirect lighting, or if the lighting is baked but does not have realtime shadowing enabled. Here is a visual example of how shading works in VRM:
|
Thank you @lyuma for the quick reply! I just tested with the Alicia model and I am getting the same effect. As you can see both Alicia's models look the same. I was expecting the Alicia model in the shadow (the one next to the car) to look darker (as you can see, the front part of the looks very dark as it is receiving shadow the cube wall). However, both Alicias look the same, they are not receiving any shadow from the cube wall. Just to be clear, if I adjust the directional light to be darker (by reducing the energy) then of course the whole scene looks darker, including Alicia model (as you can see in the screenshot below), but still it's not receiving any shadow coming from the cube. I tried also changing the shade color of Alicia to black, but then it appears always black. What I am looking for is for Alicia to appear darker only when affected by the shadow projected by another mesh (in this case, the wall cube) Hope I explained this in a clear way, sorry but English is not my native language! Thank you again for your support! |
Yes! That's exactly what I was looking for! Sorry to log it as a bug, I checked the shader code before opening the bug but couldn't find the solution! Thank you so much! |
MTOON shader is not receiving shadows from other objects blocking light
The text was updated successfully, but these errors were encountered: