microsoft / glTF-Toolkit

A collection of tools for modifying and optimizing glTF assets
MIT License
293 stars 40 forks source link

Pipeline features #15

Open donmccurdy opened 6 years ago

donmccurdy commented 6 years ago

Hi! Awesome toolkit you've started here, thanks for doing this. 🙂 Wanted to share some ideas on things that could make this more useful to WebVR devs, and so, (apologies in advance for all the feature requests!) here are some thoughts. In no particular order:

Best, Don

robertos commented 6 years ago

Thanks for the comments @donmccurdy ! Glad to be of help. About your specific comments:

Once again thanks and of course you're more than welcome to contribute to the toolkit. Thanks! Roberto

pjcozzi commented 6 years ago

Unix systems

+1 for Linux support as bandwidth allows. The Cesium team would certainty use glTF-Toolkit in our geospatial content pipeline if we could run it on our Linux-based servers.

This would also open up glTF-Toolkit to a larger contributor community.

donmccurdy commented 6 years ago

Merge animated assets

See issue on FBX2glTF; i think the expectation would be that the skeleton has identical structure and matching node names. But perhaps this issue makes more sense on FBX2glTF... hopefully direct-to-glTF tooling will begin supporting multiple animations soon.

likangning93 commented 6 years ago

Merge meshes with shared materials

I think the idea is to reduce draw calls by batching the geometry directly. So if a gltf has 30 meshes with a blue material and 30 with red, ideally glTF-Toolkit would be able to detect that many meshes are sharing a material and combine them into one large mesh. So 60 draw calls gets reduced to 2.

Cesium can do this with internal geometry types, and gltf-pipeline can also do this to some extent.

takahirox commented 6 years ago

Merge meshes with shared materials

So if I'm right there're some situations where it'd better not to merge, for example

correct? And any other situations?

donmccurdy commented 6 years ago

IMO merging meshes would need to be an opt-in flag; even with skinned meshes or transparent materials, the user might or might not want that optimization.

robertos commented 6 years ago

The glTF toolkit is a set of methods on a library, not an executable pipeline. We do have one executable pipeline for Windows Mixed Reality, but the idea for other use cases would be that you would pick and choose what optimizations you want and make your own executable by calling the appropriate library methods.

takahirox commented 6 years ago

Thanks for sharing your thoughts. I wanted to share that the merging meshes technique isn't a perfect solution and has some limitations to help you know the technique well.