Closed StevenOttoG closed 5 years ago
The team will discuss the best way to solve this.
I am not able to reproduce the "peter-panning" issue in our test apps. Can you confirm the chair and plane do touch? It could be an issue with the bounding box of the chair.
I dropped our SFB in the hellosceneform example and got this result: It touches the plane but it also has the peter-panning. The suggested_collision section of the SFA file is like this:
"suggested_collision": {
"type": "Box",
"center": {
"y": 0.302197,
"x": 0.005333000000000032,
"z": 0.0
},
"size": {
"y": 0.604394,
"x": 0.5046660000000001,
"z": 0.494
}
}
I calculate it by iterating through the OBJ file and calculating the min and max value for each component. Is there a way to visualize the bounding box in Sceneform to see whether the model and its bbox match?
Thanks Steven. Would you mind attaching the .obj so I can try to reproduce the error?
The issue is definitely on our side, inside the renderer. The scale&bias we use to avoid shadow acne is too aggressive for this setup and creates peter panning. It's mostly hidden by "regular" objects with large bases but shows up with thin geometry in contact with the ground.
We have a fix internally which will be part of a future release.
As you can see on the attached screenshot the end of the chair leg does not match the shadow. The chair's shadow is also not complete. It ends where the detected plane ends.
Excepted: