Tagged: async load append scene
2021-11-25 at 12:10 pm #47232
Is there any possibility to append scenes in an asynchronous manner so that the 3d does not suffer any performance issues while it is happening in the background? If not, could this feature be developed for a future version?
Dragos2021-11-25 at 12:12 pm #47233
Also of high importance, could appending scenes be done in such a manner that if the material already exists in the first scene, the second one will just use that instead of doubling it?
Dragos2021-11-25 at 4:38 pm #47241Alexander KovelenovStaff
Hi, can you please elaborate a bit how this issue is reproduced. It can be either of two:
1) Data is loaded via network in the background so it should not cause any FPS drop. So your issue is purely with long time the user have to wait before the new assets appear.
2) Scenes with lots of shaders/geometry/animation may cause FPS drops when the engine finishes with data fetch and starts preparing the loaded data.
To verify 1, please use slower network connection or throttle network speed in Chrome.
To verify 2, enable FPS counter in your app.
Regarding materials, the engine already caches the shaders, so it will take less time when they are loaded second time.2021-11-25 at 4:53 pm #47248
The problem is more similar to the 2nd point, so that is why I thought about loading/preparing the scene in async from the main one.2021-11-26 at 3:26 pm #47268YorickCustomer
To clarify: we’re talking about two separate issues.
2021-11-29 at 9:34 am #47327Alexander KovelenovStaff
- We will do a FPS test with the loading in the background and get back to you.
- When appending a scene, we are unable to make it use the material in the fist scene. How can we do this?
Regarding the second issue, here is the basic example how this material assignment can be achieved. If done is such a manner, there should not be any additional shader compilation time spent.
- This reply was modified 7 months ago by Alexander Kovelenov.
Attachments:You must be logged in to view attached files.2021-12-01 at 7:55 am #47424
There are 2 problems with the approach in our use case:
1)The models we append are very complex and there are more materials to them->but the material re-assignment is sorted by me in js so that one is fixed.
2)The appended models also have morphed objects in them, and sometimes morphing stops working or materials do not show properly on them when we assign a material that is already in the scene. The only solution I found to it is make a new material for them, but that beats our purpose since we want to make the scene lighter.
I will do some fps testing and get back to you on the first issue.
Dragos2022-01-15 at 2:00 am #48658Victor VallejoCustomer
I have a similar setup , my problem is that i want to execute a function when the appended scene is rendered in the screen instead of when it was 100% downloaded but not yet ready rendered
- You must be logged in to reply to this topic.