One .obj textures fine, the other will not accept a material

  //simplified tree
  function(scene) {

  //texture attempt
  var mat = new BABYLON.StandardMaterial("dog", scene);
  mat.emissiveTexture = mat.diffuseTexture = new BABYLON.Texture("", scene);
    var test = new BABYLON.StandardMaterial("texture", scene);
    test.diffuseColor = new BABYLON.Color3(1, 0, 0); //Red
    //test.alpha = 0.1; //0.3;
    //six for the complex model
    scene.meshes[7].material = mat; //test;
    //from tree to forest
    //(!)to use the new one you have to group them all together
    for (var i = 0; i < 1; i++) {
      const flips = [-1, 1];
      function randomFlip(flips) {
        return flips[Math.floor(Math.random() * flips.length)];
      var randomX = Math.random() * 500 * randomFlip(flips);
      var randomZ = Math.random() * 500 * randomFlip(flips);
      var newTree = scene.meshes[7].clone();
      newTree.material = mat; //test;
      newTree.translate(BABYLON.Axis.X, randomX, BABYLON.Space.WORLD);
      newTree.translate(BABYLON.Axis.Z, randomZ, BABYLON.Space.WORLD);
      newTree.translate(BABYLON.Axis.Y, -10, BABYLON.Space.WORLD);

When I uncomment my other .obj mesh and apply the texture to it, it works fine, but this mesh doesn’t seem to accept the texture. I look it up in the inspector and material = null. Why won’t it accept a material, and then a texture? Advice/thoughts/troubleshooting help?

the .obj in question has many polygons and is very complex; it’s a 3D scan of a room, not sure if that makes a difference.

Could you provide a repro in the Playground?

I fixed it! I used the assets loader (rather than the scene loader) and everything worked!