I’m having some issues getting this model loading correctly, I’m unsure if it’s something I’m doing wrong in the code, or the way the .blend is exporting. any help would be appreciated.
You created a new standard material correctly, and assigned your texture to the diffuse texture property of that new material. Then you correctly loaded your asset, and correctly tried to assign your new material in the onSuccess callback of the asset load.
That was all really close.
The issue was this:
terr = newMeshes[0].
This simply grabs the root item that’s returned, and in this case you have many assets within this root. So it required a small addition.
First you needed to extend this:
terr = newMeshes[0].
to look like this:
terr = newMeshes[0].getChildmeshes()
then you need to loop through each child and assign the material that you’re creating.
In your Blender file, if you switch to using the PrincipledBSDF shader instead of the Diffuse BSDF, and then try to export, your file will actually load into Babylon with both the material and texture assigned properly…no need to reassign them in Babylon. That’s probably the best way to go about this.
Here’s what my shader tree looks like:
And then after exporting the asset shows up great in Babylon:
Well I took a look at @Ateria 's .blend file, and loaded the single texture that goes with it, in Blender 2.8. I then exported as a .babylon file using @JCPalmer 's exporter and viewed it in the sandbox - everything was fine.
Exporting as .glb, I get the same white display as reported above. See attached image. Note that the texture is not being loaded. Sorry but no idea why - i tend to stay away from theis glb stuff as it reminds me of old VRML.
@PirateJC, @gryff, @Deltakosh thank you all for looking into this for me, I appreciate this community so much. @PirateJC I would’ve been stuck here for hours to figure out it was an issue with diffuseBSDF in the exporter, you’re a lifesaver