Open Remi-Tribia opened 5 years ago
you can manually change these roughness and metallic factors from the .sfb model viewer
what database are you using to import gltf / glb material? or are you doing it locally?
I'm seeing the same issue with FBX as well. If we import fbx or glb models, the metallic and roughness are always 0 and 1. For an fbx, if I use fbx2gltf first and import the model as gltf, I get the sfa created with metallic and roughness filled in correctly.
Thank you for the report. This is a bug where the Sceneform gradle plugin isn't setting the default material properly for glb files.
To work around this, you can modify the sceneform.asset specification in your app build.gradle file to specify the gltf material explicitly, then delete the associated .sfa file and rebuild your project.
For example, if you had an imported glb that looked like this:
sceneform.asset('sampledata/models/model.glb',
'default',
'sampledata/models/model.sfa',
'src/main/res/raw/model')
You would replace the material like this:
sceneform.asset('sampledata/models/model.glb',
'build/sceneform_sdk/default_materials/gltf_material.sfm',
'sampledata/models/model.sfa',
'src/main/res/raw/model')
Hi,
GLB import seems broken, it doesn't take into account the metallicFactor & roughnessFactor (and maybe other properties), converted SFA metallic is always 0 and roughness always 1. The same model exported in glTF instead of glb doesn't have this issue, metallic & roughness are correct in SFA...