google-ar / sceneform-android-sdk

Sceneform SDK for Android
https://developers.google.com/sceneform/develop/
Apache License 2.0
1.23k stars 604 forks source link

Got "Multiple different usages defined for texture" error message while importing obj #87

Closed RubeAka closed 6 years ago

RubeAka commented 6 years ago

Hi, I tried to import a model from Poly, but got this error message:

ERROR: Multiple different usages defined for texture: 16b31230-nen Command Line: /home/rube_hsu/AR/sceneform-android-sdk/hellosceneform/app/build/sceneform_sdk/linux/converter --no_sfb --mat build/sceneform_sdk/default_materials/obj_material.sfm -a --matc /home/rube_hsu/AR/sceneform-android-sdk/hellosceneform/app/build/sceneform_sdk/linux/matc --outdir /home/rube_hsu/AR/sceneform-android-sdk/hellosceneform/app/build/.sfa1645206588229553481 sampledata/models/Girl2/google poly.obj :app:createAsset-src_47main_47assets_47google_32poly FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:createAsset-src_47main_47assets_47google_32poly'.

    Error creating sfa.

I don't quite understand what happened, could anyone shed some light on this?

jagsrajput21 commented 6 years ago

@RubeAka This is a bug in Sceneform.

To make this work, you have to open .mtl file. You will notice that ka and kd both have 16b31230-nen textures. Please remove ka from .mtl and try again.

tpsiaki commented 6 years ago

@RubeAka - Yes there is a bug where we don't correctly support a single texture with multiple usages declared in your source asset. The workaround from @jagsrajput21 should get your import succeeding (thx @jagsrajput21!).

RubeAka commented 6 years ago

@jagsrajput21 Thanks. The workaround works!

@tpsiaki OK. Got it.

Mann1ng commented 4 years ago

Hi all! I'm still seeing this when converting gltf to sfb in Android Studio 3.5.1 using com.google.ar.sceneform:plugin:1.10.0 .... just wondering if the bug was closed prematurely?