Starflare Posted November 21, 2017 Share Posted November 21, 2017 Hello! I have an issue I hope you can help me with. I'll put you in context and hope I can give you enough information. Let's say I have a PBR floor exported with diffuse, rough, metal and normal from 3DSMax with the Babylon plugin, as well as the environment texture for reflections. I would like to put a ball on this floor that casts a shadow over it, but for some reason it isn't working. It does work with a standard material, but not the PBR. Does this have to do with the 3DSMax export? Am I missing something in code? Should I tweak the shader somehow? Thank you for the help in advance! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 21, 2017 Share Posted November 21, 2017 So there is no reason for the PBR to not get the shadow: https://www.babylonjs-playground.com/#10D6YT#40 Can you try to repro in the PG? Using simple sphere and boxes Quote Link to comment Share on other sites More sharing options...
dzen Posted November 23, 2017 Share Posted November 23, 2017 https://www.babylonjs-playground.com/#10D6YT#46 Here you can see that the initial helmet doesn't get a shadow. Quote Link to comment Share on other sites More sharing options...
alvov Posted November 23, 2017 Share Posted November 23, 2017 Is it true that we should only use the PBRMaterial, and not the PBRMetallicRoughnessMaterial to be able to use the lightmapTexture? Also does the 3dsMax-to-babylon exporter currently supports the PBRMaterial material? Quote Link to comment Share on other sites More sharing options...
Starflare Posted November 23, 2017 Author Share Posted November 23, 2017 @alvov and @dzen are helping me out with this too So in the playground we made two helmets next to each other, but the helmet on top is clearly not casting a shadow over the helmet on the bottom. You can see it here: https://www.babylonjs-playground.com/#10D6YT#46 Are we missing something? Thank you for your time! Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 24, 2017 Share Posted November 24, 2017 Hello, Here is a scene trying to explain the issues: https://www.babylonjs-playground.com/#10D6YT#49 First, you have 2 lights in your scene so I disposed the first one to isolate the shadow. Then using blurred shadow on a close range will create artifacts so I switched to hard shadow for the demo. From this point we can see a bit of shadow on the helmet (https://www.babylonjs-playground.com/#10D6YT#50): But why not hard ??? This comes from all the indirect light received by the helmet so let s turn it of (https://www.babylonjs-playground.com/#10D6YT#51): So I have to admit it is not intuitive and easy to setup hence why I want to work quite a lot on Shadow for 3.2 :-) Hope this helps, Arte, Hersir, alvov and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.