Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

SceneLoader.Append do not load images of models correctly

$
0
0

Hi,

When we load a model with ImportMesh on a scene, then we serialize the scene, the images are recorded with a path to find this model (data/meshes/ for exemple).

Once the scene data is serialized, it is saved in a babylon file that I put in the root.

But when I reload this scene file later, with the function SceneLoader.Append() will create me the model (is good), but go look for the image at the root where it finds the scene file instead of looking in data/meshes/ .

In the serialized file at the material level the path of the images is the data/meshes/images.png, but this path is not used because it starts from the root by searching directly for the image.

Basically, there is only the name of the image taken into account and not the path from which it finds the image.

If the images are in the same folder as the models, the serialized scene file can not be in all the models folders (logical), so it is at the root. But Append() and Load() will try to fetch the images from the root of the file what should not be done.

I think it's because it's diffuseTexture.name which is loaded for texture and not diffuseTexture.url :

5a86a181e347d_2018-02-1610_15_16-Greenshot.thumb.jpg.0c6e0070cb167fd1ab58de8d2f2738c4.jpg


Viewing all articles
Browse latest Browse all 760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>