Yield to the defer agent per mesh assignment during instantiation - #55
Yield to the defer agent per mesh assignment during instantiation#55nickdnk wants to merge 2 commits into
Conversation
Hierarchy population honored the frame budget only between nodes; a node carrying many mesh assignments (multi-material meshes) populated them all in one un-yielding callback.
|
Hi, Thanks for the contribution. Currently the breakpoint fires between every node. With your change, it would also fire after every mesh assignment. That would start to make sense when the cost per mesh assignment multiplied by the number of per-node meshes exceeds a certain threshold. Assuming that assigning a mesh is a cheap operation I'm questioning whether that's a realistic scenario? Would you mind sharing your observations and ideally a test glTF asset that lets me re-produce those? Granted, the overhead for some additional breakpoints isn't neck-breaking, but still. Thanks |
|
Hello I believe the numbers in the other thread kind of speak for themselves. I was loading large gLTFs into a game and this was a significant performance increase. Specifically, I was building a game using assets from World of Warcraft, as an educational project. Some of them, like cities, are very large, so streaming them in as you run around the world would hitch quite badly without this change. Apparently, they consist of big nodes with a lot of individual meshes. I'm not home at the moment, but I can provide a reproduction repo for you to test when I am back. Edit: This also means I cannot legally share the city asset with you as it's Blizzard's IP, so I'm not sure how to do this, quite honestly. I may be able to make Claude generate a sample object of similar size that isn't copyrighted. |
|
Thanks for getting back. Not to bother you more than necessary, but I want to make sure we're solving the actual problem. In order to hit the case you are describing, two things have to be true:
Questions I'd answer if I had the asset. Pick out one mesh (ideally a worst-case):
If the nr. of MeshResults is closer to the nr. of primitives than Also, feel free to send sensitive information to andreas dot atteneder at unity3d dot com. Thanks. |
Also a moved PR, like the JSON decode one. See atteneder#823 for details.