Sceneform-android-sdk: SFA Sampler: Failed to find lullaby texture for sampler

Created on 7 Jun 2018  路  1Comment  路  Source: google-ar/sceneform-android-sdk

I am trying out sceneform (new to it and arcore as well) and added an .obj file that I downloaded. It works fine, however, I noticed all the textures were missing. I added one via the samplers in the .sfa file, however, I am getting the error:
Error: failed to find lullaby texture for sampler

I have no idea what lullaby means in this context, nor does it seem to be related to the model I downloaded.

This is the download link: https://free3d.com/3d-model/house-interior--81890.html
And here is the .sfa file, I get the error as soon as I add the sampler portion

{ 
   materials: [
      {
         name: "floor_texture",
         parameters: [
            {
               baseColor: "floor_uv_texture",
            },
            {
               baseColorTint: [
                  0.58819999999999995,
                  0.58819999999999995,
                  0.58819999999999995,
                  1,
               ],
            },
            {
               metallic: 1,
            },
            {
               roughness: 0.16903099999999999,
            },
            {
               opacity: null,
            },
         ],
         source: "build/sceneform_sdk/default_materials/obj_material.sfm",
      },
      {
         name: "wire_115115115",
         parameters: [
            {
               baseColor: null,
            },
            {
               baseColorTint: [
                  0.45100000000000001,
                  0.45100000000000001,
                  0.45100000000000001,
                  1,
               ],
            },
            {
               metallic: 1,
            },
            {
               roughness: 0.242536,
            },
            {
               opacity: null,
            },
         ],
         source: "build/sceneform_sdk/default_materials/obj_material.sfm",
      },
      {
         name: "texture_1",
         parameters: [
            {
               baseColor: null,
            },
            {
               baseColorTint: [
                  0.58819999999999995,
                  0.58819999999999995,
                  0.58819999999999995,
                  1,
               ],
            },
            {
               metallic: 1,
            },
            {
               roughness: 0.19803000000000001,
            },
            {
               opacity: null,
            },
         ],
         source: "build/sceneform_sdk/default_materials/obj_material.sfm",
      },
      {
         name: "crome",
         parameters: [
            {
               baseColor: null,
            },
            {
               baseColorTint: [
                  0.58819999999999995,
                  0.58819999999999995,
                  0.58819999999999995,
                  1,
               ],
            },
            {
               metallic: 1,
            },
            {
               roughness: 0.158114,
            },
            {
               opacity: null,
            },
         ],
         source: "build/sceneform_sdk/default_materials/obj_material.sfm",
      },
      {
         name: "table_wood_texture",
         parameters: [
            {
               baseColor: null,
            },
            {
               baseColorTint: [
                  0.58819999999999995,
                  0.58819999999999995,
                  0.58819999999999995,
                  1,
               ],
            },
            {
               metallic: 1,
            },
            {
               roughness: 0.208514,
            },
            {
               opacity: null,
            },
         ],
         source: "build/sceneform_sdk/default_materials/obj_material.sfm",
      },
   ],
   model: {
      attributes: [
         "Position",
         "TexCoord",
         "Orientation",
      ],
      file: "sampledata/models/house_interior/house_interior.obj",
      name: "house_interior",
      scale: 0.0040810000000000004,
      suggested_collision: {
         center: {
            x: 0,
            y: 0,
            z: 0,
         },
         size: {
            x: 1,
            y: 1,
            z: 1,
         },
         type: "Box",
      },
   },
   samplers: [
      {
          file: "sampledata/models/house_interior/floor_uv_texture.jpg",
          name: "floor_uv_texture",
          params: {
               usage_type: "Normal",
          },
          pipeline_name: "floor_uv_texture.jpg",
      },
      ],
   version: "0.51:1",
}
bug

Most helpful comment

@Jahmale - In our 1.0 release there is a bug where we do not support adding new samplers in the sfa that are not present in the source asset. This is why adding the sampler as you've tried isn't working. This is fixed internally and will be available in a future release.

As a workaround, you should be able to add the texture you want to use in the .mtl file for your source asset, then delete the .sfa file and rebuild. Specifically, under the newmtl floor_texture section, add this line map_Kd floor_uv_texture.jpg. Then, after you delete the sfa and rebuild you should see the floor_uv_texture sampler show up and work properly.

>All comments

@Jahmale - In our 1.0 release there is a bug where we do not support adding new samplers in the sfa that are not present in the source asset. This is why adding the sampler as you've tried isn't working. This is fixed internally and will be available in a future release.

As a workaround, you should be able to add the texture you want to use in the .mtl file for your source asset, then delete the .sfa file and rebuild. Specifically, under the newmtl floor_texture section, add this line map_Kd floor_uv_texture.jpg. Then, after you delete the sfa and rebuild you should see the floor_uv_texture sampler show up and work properly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelvogt picture michaelvogt  路  4Comments

kunal-wayfair picture kunal-wayfair  路  3Comments

chiaolinghong3d picture chiaolinghong3d  路  3Comments

StevenOttoG picture StevenOttoG  路  4Comments

dementia2029 picture dementia2029  路  3Comments