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

No textures in SFB model converted from FBX #641

Open sergeevsnaappy opened 5 years ago

sergeevsnaappy commented 5 years ago

There are cases when we use models from open sources like sketchfab. Frequently there is a bug, that textures are not applied to the model and SFB file does not even have them listed.

For example this model was successfully tested on iOS in GLTF format. Now we convert it from FBX to SFB with all related materials and face empty texture in result. Also png/jpg files are not even listed in the SFB details (please see below).

Is this a problem of the model itself? If so, why autoconverted GLTF by Sketchfab works perfectly fine with ARkit?

Screenshot 2019-04-03 at 12 07 52

SFA file: { animations: [ { clips: [ { name: 'Take 001', runtime_name: 'GIANT_SCORPION', }, ], path: 'sampledata/GIANT_SCORPION.fbx', }, ], materials: [ { name: '08 - Default', parameters: [ { baseColor: [ 1, 1, 1, 1, ], }, { baseColorMap: null, }, { normalMap: null, }, { interpolatedColor: null, }, { metallic: 0, }, { metallicMap: null, }, { roughness: 1, }, { roughnessMap: null, }, { opacity: null, }, ], source: 'build/sceneform_sdk/default_materials/fbx_material.sfm', }, ], model: { attributes: [ 'Position', 'TexCoord', 'Orientation', 'BoneIndices', 'BoneWeights', ], collision: {}, file: 'sampledata/GIANT_SCORPION.fbx', name: 'GIANT_SCORPION', recenter: 'root', scale: 0.20680200000000001, }, version: '0.54:2', } { animations: [ { clips: [ { name: 'Take 001', runtime_name: 'GIANT_SCORPION', }, ], path: 'sampledata/GIANT_SCORPION.fbx', }, ], materials: [ { name: '08 - Default', parameters: [ { baseColor: [ 1, 1, 1, 1, ], }, { baseColorMap: null, }, { normalMap: null, }, { interpolatedColor: null, }, { metallic: 0, }, { metallicMap: null, }, { roughness: 1, }, { roughnessMap: null, }, { opacity: null, }, ], source: 'build/sceneform_sdk/default_materials/fbx_material.sfm', }, ], model: { attributes: [ 'Position', 'TexCoord', 'Orientation', 'BoneIndices', 'BoneWeights', ], collision: {}, file: 'sampledata/GIANT_SCORPION.fbx', name: 'GIANT_SCORPION', recenter: 'root', scale: 0.20680200000000001, }, version: '0.54:2', }

kai-dream commented 5 years ago

Hi, would you mind share the model to me so I can take a look?

Meanwhile, "Now we convert it from SBF to SFB with all related materials and face empty texture in result", I could suggest you trying convert it to other 3p format, such as glTB or fbx, and then import it to sceneform. I'm thinking it is possible importing a certain format might not be able to handle certain edge cases well.

sergeevsnaappy commented 5 years ago

Animated models are supported only via conversion from FBX to SFB. That is the main reason we are struggling with it. I have sent the model to your email kezhong@google.com, unfortunately cannot share this asset publicly.

jonas-kgomo commented 5 years ago

I have the same issue, I wonder how to import textures automatically. It can be done manually. But it would be nice to identify the texture folder and import the png files.

sergeevsnaappy commented 5 years ago

I have the same issue, I wonder how to import textures automatically. It can be done manually. But it would be nice to identify the texture folder and import the png files.

We tried manual import and it did not work as expected unfortunately. And that is so time consuming, we have like 100+ 3D assets.

kai-dream commented 5 years ago

Regarding this thread, I've take a look at the model, and noticed the model has might have some problems. Importing it to blender ends up in an error message and then no texture on model; open it using FBX Review (Mac app made by Autodesk) result in empty texture. So maybe the export to fbx is not very successful.

Consti10 commented 5 years ago

650

655

eweitz commented 4 years ago

An official ARCore example animation with textures would greatly help.

I have an FBX file that contains a high-quality animation. I got it from Sketchfab. I would like to use this animation in my ARCore app, but cannot because the 3D model converted from FBX to SFB fails to load textures, and is completely white like the screenshot above from @sergeevsnaappy.

The only existing ARCore animation examples (e.g. andy_dance.sfa) lack textures. Most animations I've seen use textures. If an SFA example were available, that would make it much easier for AR newcomers to learn how adapt their animations to work with ARCore.

Could such a textured SFA animation example be included with the fix for this related FBX-to-SFB converter issue?

bilawalkhan042 commented 4 years ago

i am also facing same problem. any one find any solution for this ? any help is appreciated.

c4software commented 4 years ago

Same question I have the same issue. If anyone have a solution ?

shiaro007-joker commented 4 years ago

I'm also facing this issue. Can anyone please help??

grantespo commented 4 years ago

same issue

ghost commented 4 years ago

same issue

codecalligrapher commented 4 years ago

I'm also facing a similar issue, where transparency isn't being carried across (i.e. transparent in Render, opaque in SceneForm view)