Sceneform generates sfb files without colors

徘徊边缘 提交于 2020-04-30 08:47:20

问题


I have problem with the objects generated from Google Sceneform Tools ​(Beta)​ v1.13.0 in Android Studio.

I downloaded the object (.obj file) from poly and imported to Blender to change the dimensions. After that exported again as .obj file.

When I use it to generate .sfb file in Android Studio with Sceneform tools, the .sfb object that is generated is only black.

Left is object (.obj and .mtl) imported in Blender, and right is generated .sfb file in AndroidStudio.

Thanks in advance.

EDIT: I have checked this link, but in my case .obj file starts with these lines:

mtllib object_ga_25.mtl
o Barrel
v 0.793174 1.064640 -0.168964
...

回答1:


Ensure that you also export the texture (image file) that your 3D mesh requires. In my case, my sample-data directory looks like this:

After successful conversion of the 3D model into sfa/sfb file formats, you should then check on the samplers array in the sfa file that defines the textures your mesh is using.

Here's my end result:

 samplers: [
  {
    file: 'sampledata\\Tex_Beagle.png',
    name: 'Tex_Beagle',
    pipeline_name: 'Tex_Beagle.png',
  },
],


来源:https://stackoverflow.com/questions/59094172/sceneform-generates-sfb-files-without-colors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!