I have a need to generate a series of GLB files. I have a base template for a GLTF file which I have to derive off of. The models thus generated will only have varying textures on them. The base mesh doesn't change at all.
What Im stuck with
Im able to generate the GLB, GLTF files from blender when exporting 3D models. After feeding these two files to: https://sbtron.github.io/makeglb/ Im able to create a GLB file which loads and works fine, with all the textures included.
However I am unable to generate the bin file programmatically. Ive tried searching google for generate bin file from images, but the first few pages dont seem to have anything relating to this.
What Ive tried
Went through this question, but the selected answer there isnt dealing with images:
How to generate binary gltf array buffers?
How do I go about generating a BIN file from a series of images?
.glbfile, but they do not go in the.binfile, nor in the binary mesh portion of the.glbfile. So I'm having trouble understanding what you're trying to do here, can you explain it more? – emackey Jun 02 '19 at 17:54Basically I have a bunch of 3D models which need to be programmatically generated. The GLTF file for these doesnt change at all since the base mesh is the same. How these models differ is via the textures applied on them. Since in my understanding, the BIN file contains all the textures, Im trying to ask how I can generate the BIN file dynamically.
– shashanka n Jun 03 '19 at 04:42.gltfand.binare not enough, you need the.jpgand/or.pngfiles that hold the textures. The.binfile does not contain any images. Take a look at DamagedHelmet for example. It references jpgs separately from the bin. All of the texture data is in the JPGs, not the bin file. – emackey Jun 03 '19 at 13:41