0
$\begingroup$

I'm currently interning at a company, and I’ve been tasked with researching the transition from using .glb files to .gltf files. I was wondering if it’s possible to specify the folder structure for the exported gltf files.

For example, I’m looking to export the files in the following structure:

enter image description here

Is this type of folder structure possible, and would the URLs in the "images" and "buffers" arrays be automatically updated to reflect the new paths?

:)

$\endgroup$

1 Answer 1

1
$\begingroup$

A .gltf file is a .json and you can change the URIs after the export. The Blender glTF exporter has an option to specify the textures' location, but for changing the .bin buffers location, you will have to monkey patch the exporter.

{
   "images":[
      {
         "mimeType":"image/png",
         "name":"wood_texture",
         "uri":"textures/wood_texture.png"
      },
      {
         "mimeType":"image/png",
         "name":"metal_texture",
         "uri":"textures/metal_texture.png"
      },
      {
         "mimeType":"image/jpg",
         "name":"fabric_texture",
         "uri":"textures/fabric_texture.jpg"
      }
   ]
}
{
   "buffers":[
      {
         "byteLength":500000,
         "uri":"models/my_model.bin"
      }
   ]
}
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .