-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extras hint for mesh consolidation #1731
Comments
Could you say more about the motivation and use cases? If a tool knows which nodes could be merged, is it choosing not to merge them for reasons of technical complexity? Or because some downstream tools may support or benefit from the full version? At least for three.js, I would not expect to do this merging on the fly. Unless, perhaps, the flag/hint indicated not just a logical entity, but also that it was technically feasible to merge the nodes. For example, we can't merge meshes with different materials, different draw modes, or different attributes. An offline optimizing tool like meshoptimizer might have more options here, of course, like texture atlases. |
The idea is to suggest a good balance between performance and interactivity to viewers, loaders and post-proc tools. An "aggressive" consolidation of all meshes with the same material would provide great performance improvements but the downstream tools could lose important information embedded in the scene hierarchy. One example use case is being discussed in #1699 - we're generating very complex models (infrastructure, architecture, engineering, construction, etc.) that definitely need to be optimized but we would prefer to keep individual "logical objects" separate because:
We could potentially consolidate the meshes directly in our tool but I'm thinking that adding some kind of "consolidation hint" into the manifest might be a better way to interop with other tools in the ecosystem. |
In petrbroz/svf-utils#9 we're discussing the best way to provide hints for viewers and tools like https://github.com/zeux/meshoptimizer as to which scene nodes could be consolidated to improve runtime performance, and we'd like to get some feedback from the community.
We're thinking about adding a new field in the
extras
, something likemergeGroup
. Another approach might be to provide some sort of aconsolidable
flag/hint on a node in the scene hierarchy that would suggest that it's the smallest "logical" entity, and that all its descendants can be consolidated. Has anyone else considered a similar type of hint?The text was updated successfully, but these errors were encountered: