About BabylonJS load configuration file

#1

Recently the company asked me to put the model’s data in a configuration file, including its name, grid, location, and so on, and then load the configuration file in a script to load the model into the scene

I don’t know if any of you know this method or this example

Thank you very much!

0 Likes

#2

Hey!

what is the format of your model? gltf or Babylon file format?

In any case, you can leverage that example : ImportMesh directly

0 Likes

#3

The model is in the format of GLTF, the importmesh I have used it, but I have many models, which are loaded in the script. It is not convenient

0 Likes

#4

Hi, ranwei-001
I always end up using a config file to translate information between the gltf and the engine.
There are always some definitions that cannot be stored in the model files.
So maybe it is inevitable in complex situations.

Just for your consideration, if you really want to automate this process, you need to do some scripting in DCC tools (3ds max, etc). Most studios have technical artists or pipeline engineers to make these tools that generate custom config files.

0 Likes

#5

Thank you very much!

I don’t know if I’m talking about using a configuration file, which is like XML, where you put the data in there, and then you load it in a script by method

0 Likes