简体   繁体   中英

Sceneform generates sfb files without colors

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
...

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',
  },
],

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM