Skip to content
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

Fixed crash 'java.lang.IllegalArgumentException: Parameter specified …' #63

Merged
merged 9 commits into from
Oct 17, 2020
Prev Previous commit
Next Next commit
Removed support for GLTF, now its GLB only
  • Loading branch information
BrutalCoding committed Sep 15, 2020
commit 08c037c025c7eac258d5bd44861e232f246d036a
Original file line number Diff line number Diff line change
@@ -26,8 +26,8 @@ class RenderableCustomFactory {
val url = flutterArCoreNode.objectUrl

val localObject = flutterArCoreNode.object3DFileName

if (localObject != null) {
Log.e(TAG, "Modified by BrutalCoding - 1");
if (false) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

The LOG should definitly be removed and the false statement was there on purpose I believe, because localObject (fbx, GLTF, obj) were not working for me. In my personal use case, in order to use local objects, I pass an "file://path/to/something.glb" url which works. The example app you've provided with local objects also don't seem to work hence why I've set false in that condition.

Correct me if I'm wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you do want to merge this PR, I would actually remove localObject from Flutter's side too so people can't try it out and see nothing happening.

If localObject does work, I would be curious how. I've used Android Studio and SceneForm plugin to convert my .gltf to .sfa/.sfb but that plugin is completely broken starting from Android Studio 3.6+. I believe that plugin works with 3.5.x but never got the local object working.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LOG should definitly be removed and the false statement was there on purpose I believe, because localObject (fbx, GLTF, obj) were not working for me. In my personal use case, in order to use local objects, I pass an "file://path/to/something.glb" url which works. The example app you've provided with local objects also don't seem to work hence why I've set false in that condition.

Correct me if I'm wrong

I use sfb file in my example, The sfb files are generated from build.gradle

If localObject does work, I would be curious how. I've used Android Studio and SceneForm plugin to convert my .gltf to .sfa/.sfb but that plugin is completely broken starting from Android Studio 3.6+. I believe that plugin works with 3.5.x but never got the local object working.

Yes, the sceneform plugin doesn't work good. I'm using 1.15.0 with Android Studio 4.0.1 while Android side i'm using 1.13.0 how you can see here.

I will try different local object format inserted inside src/main/assets directly.

Thanks

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove this change and resolve conflicts? So I will accept this PR.
We can discuss about local and asset object in another PR. I would like to edit the properties to use sfb file from assets and local object (GLTF) from path like yo do ("file://path/to/something.glb")

val builder = ModelRenderable.builder()
builder.setSource(context, Uri.parse(localObject))
builder.build().thenAccept { renderable ->
@@ -42,7 +42,7 @@ class RenderableCustomFactory {
val renderableSourceBuilder = RenderableSource.builder()

renderableSourceBuilder
.setSource(context, Uri.parse(url), RenderableSource.SourceType.GLTF2)
.setSource(context, Uri.parse(url), RenderableSource.SourceType.GLB)
.setScale(0.5f)
.setRecenterMode(RenderableSource.RecenterMode.ROOT)