AR face with texture not working
See original GitHub issueDescription
When I ran the sample code of Flutter-HMS-AR/example, inside ARFace Scene, if I apply texture to the face, I get the following error:
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(error, Attempt to read from field 'java.lang.String io.flutter.embedding.engine.loader.FlutterApplicationInfo.flutterAssetsDir' on a null object reference, null, java.lang.NullPointerException: Attempt to read from field 'java.lang.String io.flutter.embedding.engine.loader.FlutterApplicationInfo.flutterAssetsDir' on a null object reference
and also:
[SurfaceTexture-0-23763-0]:391: dequeueBuffer: BufferQueue has been abandoned
Expected behavior
expect to see texture over face
Current behavior
errors Screenshots
it just shows a white screen…
Logs Post logs here or paste them to Ghostbin and insert the link here.
Environment
- Platform: Flutter
- Kit: ar
- Kit Version: newest on flutter pub dev
- OS Version: Harmony OS 2.0
- Android Studio version (if applicable) [e.g. 4.1]
- Platform version: flutter 2.12
- Node Version (if applicable)
- Your Location/Region (if applicable)
Other Add any other context about the problem here
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
Materials from Face Mesh not showing up in preview
I have an issue with a material on a second facemesh not showing in app but they do show up in spark AR....
Read more >Face Mesh Alpha Problems [solved] - Spark AR - PopulAR Lab
I am using the Face Extraction Render Pass for texture. Neither of these methods work: Material/Alpha Slot; Texture/Mix Patch. Any ideas?
Read more >Using Textures - Spark AR - Facebook
You can make a variety of textures in Meta Spark Studio. For example, you can: Turn the video captured by the camera or...
Read more >Material showing up in Spark AR but not when testing in IG
This works fine however I also wanted to try creating freckles. I added a new face mesh for that and added a material...
Read more >How to get camera texture in ARFoundation? - Unity Forum
I finally got reflections on AR Foundation. The problem was that Real Time Reflections was disabled in the default settings for Android on ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello again,
Thank you for providing the logs, we have found out that the FlutterLoader class’ getInstance method that used for obtaining the texture image asset has been deprecated on the newer Flutter versions which causes this error.
To fix the issue navigate to ARSceneView.java file,
Add the following import to the top of the file:
Then you can change the line on ARSceneView.java:163 from:
to:
This change should fix the error and we will also update the package on the next release of this plugin.
Thank you for your contribution 👍 and have a good day.
The ARFaceScene would draw the 3D face and then will attach the texture, the image you are using is the texture for a 3D Object so it is not compatible for a face filter. Also If you want to customize the filter for your needs you can navigate to the
FaceGeometryDisplay.java
file and add your custom rendering code. The example shown here is just a showcase for the Face Tracking feature of the AR Engine.