I’m curious if any of you have experience or insights into the following task. I’m interested in establishing a workflow within Rhino3D to transmit data to a database and subsequently retrieve it through a web browser. Specifically, I aim to associate metadata with individual objects in the GLB format, enabling them to be loaded one at a time. This would allow for the selection of objects and easy access to their associated data. Your input or experiences in this area would be greatly appreciated. This workflow is already been created by talented people in Speckle, but I’m wondering if it is possible to do it directly with threeJS.
Sorry for the verbose post.
Looking forward to see your solutions
I don’t understand 100% which part is the issue / question, but just related to the entire post:
Loading glb from a database(SQL or non-squal) withThreefiber
Consider not storing GLB files in databases, it’s as good as using git for 3D binary assets (ie. just because you can, doesn’t mean you should. You will lose all the advantage CDN networks are able to give you in terms of delivery, caching, protection, scoping etc. at little to no gain)
Workflow should be as follows:
- Create model and assign it some model ID
- Place model on some CDN (ex. AWS S3), assign that model ID there, somewhere within the URL path (or write an API endpoint that retrieves the asset URL based on the model ID)
- Store model ID in the database
- When user wants to list models, retrieve model IDs from the database, not the assets
- When user wants to load the actual model, fetch it from the CDN using the GLTFLoader (whether you’d use vanilla three.js or react-three-fiber, sql or nosql, is kinda irrelevant to the entire flow - it’s just a matter or first retrieving a string, then retrieving binary data from a CDN using that string.)
Thanks for a copmprehensive answer @mjurczyk! It sounds very straight forward, yet has a bit of set up. I probably give it a try to see how I can work it out
Thanks again for the quick reply.