-
Notifications
You must be signed in to change notification settings - Fork 19
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
Issue with Baking a static shadowMap using accumulativeshadows #54
Comments
Tested on r3f confirmed same issue exists 2024-03-03.13-53-06.mp4 |
for vanilla one fix i found is change the 2024-03-03.14-10-43.mp42024-03-03.14-07-49.mp4 |
Thanks for looking into this! I added I've set shadowParams and lightParams to the default settings from the accumulativeShadows story and got this result: I know that I have seen better looking ground shadows for this model, especially when it comes to the softness of the shadow. For reference I am comparing the ground shadows baked in blender (left) and the shadowcatcher in playcanvas' GLTF viewer (right): I had a look at the helpful comments on shadowParams and lightParams found in accumulativeShadow's story and it seemed as if 'radius' and 'ambient' were the parameters i should play with. I played around with all the parameters, and the only one that made a significant improvement was 'size'. I switched it from 8 to 100 and got this: The 'size' adjusts the scene's depth map as explained here. Although i don't fully understand this, I can tell that the shadow looks better. |
Reduce the Make sure that 0,0,0 is the ground , all the lights are pointing towards the 0,0,0. This should give darker shadows near the wheels These are the settings i used
2024-03-05.12-18-09.mp4alternately you could also try https://threejs.org/examples/?q=shadow#webgl_shadow_contact approach |
three
version: 150.0@pmndrs/vanilla
version: 1.14.2Hello all :) In my three js application, i would like users to be able to visualize .glb models that they upload. I would like a shadow on the floor to automatically be baked and displayed. Shadow baking is achieved in this demo; however, it is dynamic, meaning is it running on each animation frame. I would like to have it run only a single time, when the model is uploaded.
Using the demo as a reference, i tried to create just that. Here is a sandbox of what I have done. It seems to work fine for the threeJS torus geometry, but when i test is with a .glb model, it reveals an issue.
Here is a picture of the model i am using. It is a simple cube but with a hole in the bottom. The face normals are also visualized and pointing outwards; however, the resultant shadow (see second pic) shows that the wrong face sides are being considered for the shadow baking, even though, as shown in the sandbox, I have set both material.side and material.shadowSide to THREE.DoubleSide.
Any thoughts? I appreciate any help/support!
The text was updated successfully, but these errors were encountered: