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

Why Textures gets swap between different Materials in OBJ ? #50

Closed jagsrajput21 closed 6 years ago

jagsrajput21 commented 6 years ago

I am loading an OBJ Model in Sceneform. The Textures gets replaced between different materials. Why is this happening?

Also, It is showing me following warning -

WARNING: Material parameter types changed during conversion! Run with --in_place (-i) to update your SFA.

tpsiaki commented 6 years ago

@jagsrajput21 - the warning you are seeing indicates that the SFA should be regenerated so that things like the parameters available in the material can better match the source asset.

A couple of things to check:

jagsrajput21 commented 6 years ago

@tpsiaki I have performed these things. Still, having the same issue.

jagsrajput21 commented 6 years ago

@tpsiaki Any update on this?

tpsiaki commented 6 years ago

@jagsrajput21 - if possible, will you share out an example of an obj file (and mtl/png) where this occurs?

jagsrajput21 commented 6 years ago

@tpsiaki I have zipped all the files. Please check.

Home.zip

tpsiaki commented 6 years ago

@jagsrajput21 - thanks! we will investigate what's going on here.

tpsiaki commented 6 years ago

This is fixed in the latest version of Sceneform - to get textures showing up correctly, upgrade to the 1.4.0 version of com.google.ar.sceneform:plugin, and either re-import the obj asset above, or if the asset is already included in your build.gradle files, delete the associated .sfa and .sfb files and rebuild.