CariusLars / ar_flutter_plugin

Flutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices
MIT License
333 stars 254 forks source link

Unable to load renderable [#3ce37[ #191

Open kotran88 opened 1 year ago

kotran88 commented 1 year ago

I just used sample example on my project

only change I made is path from

"https://github.com/KhronosGroup/glTF-Sample-Models/raw/master/2.0/Duck/glTF-Binary/Duck.glb",

to

assets/f_5.glb

I checked gltf validator and has no problem. also I used this glb file on modelviewer.

wha tmakes error and not render on ar screen?

Future<void> onPlaneOrPointTapped( List<ARHitTestResult> hitTestResults) async { var singleHitTestResult = hitTestResults.firstWhere( (hitTestResult) => hitTestResult.type == ARHitTestResultType.plane); if (singleHitTestResult != null) { var newAnchor = ARPlaneAnchor(transformation: singleHitTestResult.worldTransform); bool? didAddAnchor = await this.arAnchorManager!.addAnchor(newAnchor); if (didAddAnchor!) { this.anchors.add(newAnchor); // Add note to anchor var newNode = ARNode( type: NodeType.webGLB, uri: "assets/f_5.glb", scale: Vector3(0.2, 0.2, 0.2), position: Vector3(0.0, 0.0, 0.0), rotation: Vector4(1.0, 0.0, 0.0, 0.0)); bool? didAddNodeToAnchor = await this .arObjectManager! .addNode(newNode, planeAnchor: newAnchor); if (didAddNodeToAnchor!) { this.nodes.add(newNode); } else { this.arSessionManager!.onError("Adding Node to Anchor failed"); } } else { this.arSessionManager!.onError("Adding Anchor failed"); } /* // To add a node to the tapped position without creating an anchor, use the following code (Please mind: the function onRemoveEverything has to be adapted accordingly!): var newNode = ARNode( type: NodeType.localGLTF2, uri: "Models/Chicken_01/Chicken_01.gltf", scale: Vector3(0.2, 0.2, 0.2), transformation: singleHitTestResult.worldTransform); bool didAddWebNode = await this.arObjectManager.addNode(newNode); if (didAddWebNode) { this.nodes.add(newNode); }*/ } }

ar_flutter_plugin: ^0.7.3 vector_math: ^2.1.4

flutter doctor :


[✓] Flutter (Channel stable, 3.7.11, on macOS 13.2.1 22D68 darwin-arm64, locale ko-KR)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.70.2)
[✓] VS Code (version 1.66.2)
[✓] Connected device (4 available)
    ! Error: pedro의 Apple Watch needs to connect to determine its availability. Check the connection between the
      device and its companion iPhone, and the connection between the iPhone and Xcode. Both devices may also need to
      be restarted and unlocked. (code 1)
[✓] HTTP Host Availability
PatelKajal2565 commented 1 year ago

i have same issue. i have tried to load .gltf file from assets. it working in ios but android app gives error "Unable to load renderable".

nayanAubie commented 1 year ago

Some of my .GLTF files are loading properly from assets but some of are giving the error like "Unable to load renderable"

PierluigiNetrise commented 1 year ago

I have the same issue, someone solved it?

SomnusVeritas commented 11 months ago

I have the same issue, doesn't matter wether I use NodeType.localGLTF2 or NodeType.fileSystemAppFolderGLTF2.

sudo-ulmas commented 7 months ago

I have the same issue, some glb files are working but some are not working at all event no error message

nikhilgarala-tecblic commented 3 months ago

I have the same issue.