sceneform-android
sceneform-android copied to clipboard
Disappearing model textures (only) on camera move
Hello, how to prevent disappearing model from the scene on camera movement? https://youtu.be/MsX_vSy7YoM
@ThomasGorisse I didn't find any issues like this in your samples. But it exists with my models, maybe You know what to do? Thank you mate
Only textures are missing, the shadow is still visible, viewRenderables are still visible...
Hmm, I have used my own model in Your samples and the behavior is the same, textures are not visible when moving the camera a little bit off the model. Glb: https://we.tl/t-qL66DAptRL I could provide you .blend project if You wish. If you don't have time for this - that is ok, I understood. Thank you <3
https://youtube.com/shorts/inbFl2F_7Co?feature=share
sample-ar-model-viewer-java
ModelRenderable.builder()
.setSource(this, Uri.parse("models/VAMPIR3_optymized.glb"))
.setIsFilamentGltf(true)
.setAsyncLoadEnabled(true)
.build()
.thenAccept(model -> {
MainActivity activity = weakActivity.get();
if (activity != null) {
activity.model = model;
}
})
.exceptionally(throwable -> {
Toast.makeText(
this, "Unable to load model", Toast.LENGTH_LONG).show();
return null;
});
Also I have used fox.blend and pasted the .fbx on the scene from https://www.mixamo.com/, same results. :(
Your issue comes from the view culling which doesn't render models when any part of its bounding box is within the camera view. There is actually a wrong bounding box calculation within Filament when the model is animated so the culling system thinks that parts of your models are not visible within the rendered view even if they currently are.
We had a culling setter at the RenderableInstance
level (commit: bdc7ea9c0403e689ad5e915895c0ae6391f7303a)
For now, you have to call
renderableInstance.setCulling(false)
@ThomasGorisse It worked! Thank you very very much <3
You're welcome. You can think about sponsoring us if you appreciate our work.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.