sceneview / sceneview-flutter Goto Github PK
View Code? Open in Web Editor NEWSceneView Flutter is a 3D and AR Flutter Android View with Google Filament and ARCore. This is a Sceneform replacement in Flutter
License: Apache License 2.0
SceneView Flutter is a 3D and AR Flutter Android View with Google Filament and ARCore. This is a Sceneform replacement in Flutter
License: Apache License 2.0
Object Placement on Ceiling Not Supported
Description
Currently, the sceneview-flutter does not support placing objects on the ceiling. It can detect horizontal planes facing downward, but it does not correctly recognize or handle planes for ceilings, and well as vertical planes.
Steps to Reproduce
Open an AR session using the sceneview-flutter.
Attempt to place an object on a detected ceiling plane.
Observe that the object is not placed or the ceiling plane is not recognized.
Expected Behavior
The plugin should recognize ceiling planes and allow objects to be placed on them.
Actual Behavior
Ceiling planes are not detected, and objects cannot be placed on ceilings.
I have this error with io.github.sceneview:arsceneview:0.10.0
in a basic example with only initialization of ArSceneView.
This is the reference branch.
I have tested the basic example with emulator and physical device (Pixel 2 XL).
Flutter 3.10.5
2023-07-03 10:42:06.359 28222-28222 Compatibil...geReporter io....iew.sceneview_flutter_example D Compat change id reported: 171979766; UID 10184; state: ENABLED
2023-07-03 10:42:06.359 28222-28222 Compatibil...geReporter io....iew.sceneview_flutter_example D Compat change id reported: 242716250; UID 10184; state: DISABLED
2023-07-03 10:42:06.367 28222-28222 ApplicationLoaders io....iew.sceneview_flutter_example D Returning zygote-cached class loader: /system_ext/framework/androidx.window.extensions.jar
2023-07-03 10:42:06.367 28222-28222 ApplicationLoaders io....iew.sceneview_flutter_example D Returning zygote-cached class loader: /system_ext/framework/androidx.window.sidecar.jar
2023-07-03 10:42:06.369 28222-28222 ziparchive io....iew.sceneview_flutter_example W Unable to open '/data/app/~~PqBvEuQrvN7TSbS8Ndb_Ig==/io.github.sceneview.sceneview_flutter_example-c_bJkabNvk51Xn7Z0APGUQ==/base.dm': No such file or directory
2023-07-03 10:42:06.369 28222-28222 ziparchive io....iew.sceneview_flutter_example W Unable to open '/data/app/~~PqBvEuQrvN7TSbS8Ndb_Ig==/io.github.sceneview.sceneview_flutter_example-c_bJkabNvk51Xn7Z0APGUQ==/base.dm': No such file or directory
2023-07-03 10:42:06.455 28222-28222 nativeloader io....iew.sceneview_flutter_example D Configuring clns-6 for other apk /data/app/~~PqBvEuQrvN7TSbS8Ndb_Ig==/io.github.sceneview.sceneview_flutter_example-c_bJkabNvk51Xn7Z0APGUQ==/base.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/~~PqBvEuQrvN7TSbS8Ndb_Ig==/io.github.sceneview.sceneview_flutter_example-c_bJkabNvk51Xn7Z0APGUQ==/lib/arm64:/data/app/~~PqBvEuQrvN7TSbS8Ndb_Ig==/io.github.sceneview.sceneview_flutter_example-c_bJkabNvk51Xn7Z0APGUQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/io.github.sceneview.sceneview_flutter_example
2023-07-03 10:42:06.462 28222-28222 GraphicsEnvironment io....iew.sceneview_flutter_example V Currently set values for:
2023-07-03 10:42:06.462 28222-28222 GraphicsEnvironment io....iew.sceneview_flutter_example V angle_gl_driver_selection_pkgs=[]
2023-07-03 10:42:06.462 28222-28222 GraphicsEnvironment io....iew.sceneview_flutter_example V angle_gl_driver_selection_values=[]
2023-07-03 10:42:06.463 28222-28222 GraphicsEnvironment io....iew.sceneview_flutter_example V ANGLE GameManagerService for io.github.sceneview.sceneview_flutter_example: false
2023-07-03 10:42:06.463 28222-28222 GraphicsEnvironment io....iew.sceneview_flutter_example V io.github.sceneview.sceneview_flutter_example is not listed in per-application setting
2023-07-03 10:42:06.463 28222-28222 GraphicsEnvironment io....iew.sceneview_flutter_example V Neither updatable production driver nor prerelease driver is supported.
2023-07-03 10:42:06.464 28222-28222 ActivityThread io....iew.sceneview_flutter_example W Application io.github.sceneview.sceneview_flutter_example is waiting for the debugger ...
2023-07-03 10:42:06.464 28222-28222 System.out io....iew.sceneview_flutter_example I Sending WAIT chunk
2023-07-03 10:42:07.267 28222-28222 System.out io....iew.sceneview_flutter_example I Debugger has connected
2023-07-03 10:42:07.267 28222-28222 System.out io....iew.sceneview_flutter_example I waiting for debugger to settle...
2023-07-03 10:42:07.468 28222-28222 System.out io....iew.sceneview_flutter_example I waiting for debugger to settle...
2023-07-03 10:42:07.671 28222-28222 System.out io....iew.sceneview_flutter_example I waiting for debugger to settle...
2023-07-03 10:42:07.871 28222-28222 System.out io....iew.sceneview_flutter_example I waiting for debugger to settle...
2023-07-03 10:42:08.073 28222-28222 System.out io....iew.sceneview_flutter_example I waiting for debugger to settle...
2023-07-03 10:42:08.273 28222-28222 System.out io....iew.sceneview_flutter_example I waiting for debugger to settle...
2023-07-03 10:42:08.474 28222-28222 System.out io....iew.sceneview_flutter_example I waiting for debugger to settle...
2023-07-03 10:42:08.674 28222-28222 System.out io....iew.sceneview_flutter_example I debugger has settled (1324)
2023-07-03 10:42:08.698 28222-28270 libEGL io....iew.sceneview_flutter_example D loaded /vendor/lib64/egl/libEGL_emulation.so
2023-07-03 10:42:08.700 28222-28270 libEGL io....iew.sceneview_flutter_example D loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
2023-07-03 10:42:08.702 28222-28270 libEGL io....iew.sceneview_flutter_example D loaded /vendor/lib64/egl/libGLESv2_emulation.so
2023-07-03 10:42:08.715 28222-28275 ResourceExtractor io....iew.sceneview_flutter_example I Found extracted resources res_timestamp-1-1688369762678
2023-07-03 10:42:08.715 28222-28275 ResourceExtractor io....iew.sceneview_flutter_example I Resource version mismatch res_timestamp-1-1688373697708
2023-07-03 10:42:08.882 28222-28275 ResourceExtractor io....iew.sceneview_flutter_example I Extracted baseline resource assets/flutter_assets/kernel_blob.bin
2023-07-03 10:42:08.883 28222-28275 ResourceExtractor io....iew.sceneview_flutter_example I Extracted baseline resource assets/flutter_assets/vm_snapshot_data
2023-07-03 10:42:08.916 28222-28275 ResourceExtractor io....iew.sceneview_flutter_example I Extracted baseline resource assets/flutter_assets/isolate_snapshot_data
2023-07-03 10:42:08.930 28222-28222 flutter_example io....iew.sceneview_flutter_example W type=1400 audit(0.0:350): avc: denied { read } for name="max_map_count" dev="proc" ino=3439105 scontext=u:r:untrusted_app_32:s0:c184,c256,c512,c768 tcontext=u:object_r:proc_max_map_count:s0 tclass=file permissive=0 app=io.github.sceneview.sceneview_flutter_example
2023-07-03 10:42:08.967 28222-28222 SceneviewFlutterPlugin io....iew.sceneview_flutter_example I onAttachedToEngine
2023-07-03 10:42:08.967 28222-28222 SceneviewFlutterPlugin io....iew.sceneview_flutter_example I onAttachedToActivity
2023-07-03 10:42:08.967 28222-28222 WindowOnBackDispatcher io....iew.sceneview_flutter_example W OnBackInvokedCallback is not enabled for the application.
Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
2023-07-03 10:42:08.990 28222-28222 flutter_example io....iew.sceneview_flutter_example W Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (unsupported,test-api, reflection, allowed)
2023-07-03 10:42:08.990 28222-28222 flutter_example io....iew.sceneview_flutter_example W Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (unsupported, reflection, allowed)
2023-07-03 10:42:08.990 28222-28222 flutter_example io....iew.sceneview_flutter_example W Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (unsupported, reflection, allowed)
2023-07-03 10:42:08.990 28222-28222 flutter_example io....iew.sceneview_flutter_example W Accessing hidden method Landroid/util/LongArray;->get(I)J (unsupported, reflection, allowed)
2023-07-03 10:42:09.006 28222-28288 flutter io....iew.sceneview_flutter_example I The Dart VM service is listening on http://127.0.0.1:41319/2A8ELVIs9zY=/
2023-07-03 10:42:09.008 28222-28222 Compatibil...geReporter io....iew.sceneview_flutter_example D Compat change id reported: 237531167; UID 10184; state: DISABLED
2023-07-03 10:42:09.009 28222-28222 OpenGLRenderer io....iew.sceneview_flutter_example W Unknown dataspace 0
2023-07-03 10:42:09.075 28222-28278 Gralloc4 io....iew.sceneview_flutter_example I mapper 4.x is not supported
2023-07-03 10:42:09.078 28222-28269 OpenGLRenderer io....iew.sceneview_flutter_example W Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2023-07-03 10:42:09.079 28222-28269 OpenGLRenderer io....iew.sceneview_flutter_example W Failed to initialize 101010-2 format, error = EGL_SUCCESS
2023-07-03 10:42:09.086 28222-28269 OpenGLRenderer io....iew.sceneview_flutter_example E Unable to match the desired swap behavior.
2023-07-03 10:42:09.412 28222-28222 Factory io....iew.sceneview_flutter_example D Creating new view instance
2023-07-03 10:42:09.416 28222-28222 SceneViewWrapper io....iew.sceneview_flutter_example I init
2023-07-03 10:42:09.468 28222-28222 Filament io....iew.sceneview_flutter_example I FEngine (64 bits) created at 0xb4000079d4818480 (threading is enabled)
2023-07-03 10:42:09.469 28222-28294 Filament io....iew.sceneview_flutter_example D Using ASurfaceTexture
2023-07-03 10:42:09.469 28222-28294 Filament io....iew.sceneview_flutter_example I FEngine resolved backend: OpenGL
2023-07-03 10:42:09.486 28222-28294 Filament io....iew.sceneview_flutter_example V [Google (Apple)], [Android Emulator OpenGL ES Translator (Apple M1 Max)], [OpenGL ES 3.0 (4.1 Metal - 83)], [OpenGL ES GLSL ES 3.00]
2023-07-03 10:42:09.488 28222-28294 Filament io....iew.sceneview_flutter_example V Feature level: 1
Active workarounds:
2023-07-03 10:42:09.492 28222-28222 Filament io....iew.sceneview_flutter_example I Backend feature level: 1
2023-07-03 10:42:09.492 28222-28222 Filament io....iew.sceneview_flutter_example I FEngine feature level: 1
2023-07-03 10:42:09.528 28222-28222 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 10:42:09.529 28222-28222 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 10:42:09.529 28222-28222 PlatformViewsController io....iew.sceneview_flutter_example I Hosting view in a virtual display for platform view: 0
2023-07-03 10:42:09.529 28222-28222 EGL_emulation io....iew.sceneview_flutter_example E eglQueryContext 32c0 EGL_BAD_ATTRIBUTE
2023-07-03 10:42:09.529 28222-28222 EGL_emulation io....iew.sceneview_flutter_example E tid 28222: eglQueryContext(2128): error 0x3004 (EGL_BAD_ATTRIBUTE)
2023-07-03 10:42:09.549 28222-28222 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 10:42:09.555 28222-28222 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 10:42:09.584 28222-28269 OpenGLRenderer io....iew.sceneview_flutter_example E Unable to match the desired swap behavior.
2023-07-03 10:42:09.614 28222-28222 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 10:42:09.630 28222-28222 Sceneview io....iew.sceneview_flutter_example D Filament Retainers: 0
2023-07-03 10:42:09.639 28222-28222 Sceneview io....iew.sceneview_flutter_example E Filament Engine destroyed
2023-07-03 10:42:09.653 28222-28222 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 10:42:09.666 28222-28222 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 10:42:09.687 28222-28269 OpenGLRenderer io....iew.sceneview_flutter_example E Unable to match the desired swap behavior.
2023-07-03 10:42:09.694 28222-28222 SurfaceView io....iew.sceneview_flutter_example E Exception configuring surface
java.lang.IllegalStateException: Calling method on destroyed Engine
at com.google.android.filament.Engine.getNativeObject(Engine.java:759)
at com.google.android.filament.Engine.createSwapChain(Engine.java:391)
at com.google.android.filament.Engine.createSwapChain(Engine.java:369)
at io.github.sceneview.SceneView$SurfaceCallback.onNativeWindowChanged(SceneView.kt:734)
at com.google.android.filament.android.UiHelper.createSwapChain(UiHelper.java:578)
at com.google.android.filament.android.UiHelper.-$$Nest$mcreateSwapChain(Unknown Source:0)
at com.google.android.filament.android.UiHelper$1.surfaceCreated(UiHelper.java:413)
at android.view.SurfaceView.updateSurface(SurfaceView.java:1108)
at android.view.SurfaceView.lambda$new$0(SurfaceView.java:216)
at android.view.SurfaceView.$r8$lambda$cm3nmzErr-srXoT_KjIYQgdhFN0(Unknown Source:0)
at android.view.SurfaceView$$ExternalSyntheticLambda2.onPreDraw(Unknown Source:2)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1176)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3772)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2465)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9309)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1339)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1348)
at android.view.Choreographer.doCallbacks(Choreographer.java:952)
at android.view.Choreographer.doFrame(Choreographer.java:882)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8176)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
2023-07-03 10:42:14.661 28222-28326 ProfileInstaller io....iew.sceneview_flutter_example D Installing profile for io.github.sceneview.sceneview_flutter_example
https://github.com/giandifra/arcore_flutter_plugin/ currently uses the archived SceneForm, but they have a branch to upgrade to your maintained SceneForm fork. They also want to upgrade to SceneView, I wonder if forces can be unified. See giandifra/arcore_flutter_plugin#202
The SceneView widget is based on PlanformViewLink. And example app crashes after I turn on camera permission.
Device: Samsung Galaxy S10
Solution: replace PlatformViewLink with AndroidView (don't know about possible disadvantages):
return AndroidView(
viewType: viewType,
layoutDirection: TextDirection.ltr,
creationParams: creationParams,
creationParamsCodec: const StandardMessageCodec(),
onPlatformViewCreated: onPlatformViewCreated,
);
Hello is it possible to use AR scene view like in android plugin version?
Hi @ThomasGorisse,
I receive a NullPointerException when I initialize the ArSceneView, this doesn't happen with SceneView or Sceneform.
I created a branch to show the exception, here the line of error.
The error comes from the activity getter
protected val activity: ComponentActivity
get() = try {
findFragment<Fragment>().requireActivity()
} catch (e: Exception) {
context.getActivity()!! //HERE
}
Unhandled Exception: PlatformException(error, null, null, java.lang.NullPointerException
at io.github.sceneview.SceneView.getActivity(SceneView.kt:327)
at io.github.sceneview.ar.ArSceneView.<init>(ArSceneView.kt:45)
at io.github.sceneview.ar.ArSceneView.<init>(ArSceneView.kt:30)
at io.github.sceneview.sceneview_flutter.SceneViewWrapper.<init>(SceneViewWrapper.kt:31)
PS: i wrote you on discord
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.