-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Projection matrix is not updated in augmented face mode #442
Comments
same issue |
How did you get Augmented Faces working in general? When I create an AugmentedFaceNode object, it crashes with the error |
Yeah, I had the same issue. Just made my own implementation - AppAugmentedFaceNode.kt |
Ah, I did the same thing. Thank you for sending your code though! I'm curious, why did you take out the normals for the face mesh? |
I don't use normals because I don't need lighting for face meshes. By the way, it's not trivial to add normals since Filament doesn't support the NORMAL vertex attribute. However, we could use TANGENTS, which are TBN (tangent, bitangent, normal) encoded as a quaternion.
Right, I forgot to tell about it.
If you use my |
I did not notice that update() needed to be called manually, but even doing so doesn't get it to work for me. Not sure what the disconnect is. |
@hshapley |
Wow, that's a blast from the past... I used that thread to solve issues with occlusion in an old version of Sceneform long ago. Lots of things have changed in SceneView since then though. I tried disabling depthCulling and it had an effect, but an undesirable one in making most models disappear. I will keep exploring a couple things but I don't see an easy fix as of yet. Thanks for all the pointers though. |
I got it working! I had to combine several things from the old implementation to get it to work, namely manipulating the render priority. |
I am currently developing an augmented face application using SceneView. I've encountered an issue where the face mesh does not properly align with the actual face of the user.
Upon investigation, I found that the root cause of this issue seems to be related to the camera's projection matrix. Specifically, the projection matrix is intended to be updated in the
onCameraUpdated
method. However, this update does not occur in augmented face mode because the conditionif(trackingState == TrackingState.TRACKING)
is not satisfied.Here is the problematic section of the code:
As a temporary solution, I have added the following code to force the calculation of the projection matrix:
While this workaround resolves the issue temporarily, it would be beneficial for the SceneView library to handle this case natively.
The text was updated successfully, but these errors were encountered: