- This topic has 5 replies, 3 voices, and was last updated 3 years, 2 months ago by xeon.
-
AuthorPosts
-
2021-10-03 at 3:22 pm #45770swatchybCustomer
Hi,
My configurator uses all external assets (gltf’s and materials) and loads them as needed. However, on occasion (usually on mobile), the gltf’s aren’t loaded in time so that the object misses the application of the material, and just appears as the default (white) – which is obviously concerning to the user. Is there a way to predicate the application of a material on the state/presence of a target object (gltf) in the scene?
I know that I can reduce this symptom with compression, but maybe this is a perfect use for the new “is scene loaded” puzzle.
Can you advise best approach?
Many thanks!2021-10-03 at 4:44 pm #45771xeonCustomerIs scene loaded does not appear to solve this problem. The puzzle will return true when the gltf is in memory but this can be long before the gltf is visible in the browser especially with respect to mobile devices.
This is even more complicated if your combined files start to get near the 50MB limits of the browser and you need to force things out of memory during a load.
Assuming you are not in that situation,
You can use a full screen preloader or effect such as blur to hide the effects of the scene building in the background until your materials downloaded and gltf responds as loaded via the “when loaded do”Basically you are just putting a html screen in front of the app until everything is done.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-10-04 at 4:24 am #45781swatchybCustomerHi Xeon,
Sorry to miss your quick and kind answer.
This is not so much about “display” – meaning hiding the scene until loaded. I was really looking to make the application of materials wait until the 1 to 10 gltfs (dynamic quantity depending on the product) have loaded, since if the gltf is not loaded, it misses the material, and remains as default (white). A good total load time is <2secs and poor around 5. Anyway, instead of a long winded explanation, as a temp fix, I just added an “after 0.5sec do” puzzle and put all of the material loads in that – seems to work most of the time without appreciable delay in full render.
But thanks for making me think a bit ;)
2021-10-04 at 6:37 am #45786xeonCustomerAdding time for a process like waiting on a gltf or material to load often leads to varying results by users equipment, internet download speed, device type .. etc. I recommend throttling performance in chrome developer mode to make sure you give enough time.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-10-04 at 4:30 pm #45807core3dCustomerI think you need promise for that. You can wait promise for loading everyting after that you trigger to show your scene.
Promise2021-10-04 at 8:41 pm #45817xeonCustomerThat sounds good…going to give that a few tests.
UPDATE: I tried this out. In my testing ( I look forward to someone else giving it a test). The promise returns true when the scene or requested item is loaded in memory…not when its visible and in scene within the browser window.
So on small textures or gltfs…you cant really tell. Load in something very large with complex reflections, etc…and it fires way before the scene is loaded in my testing.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com -
AuthorPosts
- You must be logged in to reply to this topic.