Productionizing a large GLTF babylon scene imported from blender

This is more of a strategy question more than a tactical question - hence not adding a playground link.

I have a scene generated in blender and exported to GLTF(200MB in size) that I’d like to use in production. However, downloading a 200MB size file crammed with textures, meshes, etc. seems to be too much. Rather I’d like to break it up and download them piecemeal. I’m considering following 4 options but not sure which one is the best. Does anyone here who has shipped largish scenes in production help me by pointing me to the right direction on what option to use?

Option 1:
Like https://playground.babylonjs.com/#09UU1A#3 . Ship GLTF file with no textures. Create materials and assign to meshes on the fly. Store the albedo, lightmap on remote server.
Pros: Smaller file sizes where textures can be read in parallel asynchronously
Cons/: Requires a bunch of material building and writing manual boilerplate code. Why not let the scene editing software like blender do the work for you.

Option 2:
Ship GLTF with baked textures and load as is - fat file. blender - How is the file size of a 3D .gltf model determined? - Stack Overflow
Pros: Simple
Cons/: File size that is shipped in one go is large

Option 3:
Ship GLTF / GLB file where the textures are URI links to remote server. I have 0 idea how to do this from blender. Looks like i might have to manually edit the gltf file - but that is just too complex IMHO since models can be real large (200MB) in my case…so opening the gltf file in text editor to update it is not an option

However GLB with remote asset URLs seems to indicate that doing this may cause other problems such as limited ability to validate, etc. Perhaps this is an ok tradeoff.
Pros: Simple
Cons/: URL can change so the gltf json need to be updated.

Option 4:
I really have no idea how they are doing it but it seems to me that in this link shorturl.at/fHLM2 they are breaking up the massive GLB file in to tiny little sectors and then loading them from CDN. However, each of these files are not self contained glb themselves that can be downloaded and inspected.

I might be missing something basic here so please feel free to point me to relevant document that I might’ve missed.

1 Like

hi there , read here

well you can read the thread as well … basically because i chose to split scene as well … but then had issues with materials being duplicated in the engine each time I loaded assets that actually used the same material in the blender scene. So I wrote code to sort it out.

After some time I hit a small snag , which I fixed but it brought the conversation back into the line of thought.

Here it was suggested to be do separate material loads ( well if you have control of the models this is all good )

Im actually going to test it personall now very soon. I know the post was in march but I was busy on other htings for client but I just did a brand new rebuild of his configurator with vue 3 , and it would be nice to reduce load times in anyway possible. Although for me it really is not a bad UX as my models and textures are all small … but its the principle … you know for when you do need it for bigger stuff on demand.

The first question - why the file is so big?
It is a lot of geometry or a lot of textures?
How big are textures? Is it possible to reduce their size?
Is it possible to split the scene into several smaller files in Blender?

cc @bghgary