weixin_39834745
weixin_39834745
2021-01-10 01:24

Multi Material Decoding with Unity Plugin

I try to decode Draco files with multiple materials on the same object. I use --metadata flags to keep materials within encoding, but the Unity plugins seems to ignore that when decoding to Unity Mesh. After mesh decoding I am using a MTLLoader to load the mtl library, but when I apply 2 materials to the decoded models, Unity says this models doesn't have submesh. The final result is that the 2 materials superimpose or something like that. Is there a way to handle that with the Unity Plugin ? Or someone know how to split my obj by material before encode to Draco ?

Google draco is very interesting, but there's definitly not enough documentation especially about how to handle materials.

Thank you for your help

该提问来源于开源项目:google/draco

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39778150 weixin_39778150 4月前

    I also have the same problem

    点赞 评论 复制链接分享
  • weixin_39961369 weixin_39961369 4月前

    I got the same question too

    点赞 评论 复制链接分享
  • weixin_39562615 weixin_39562615 4月前

    This site has much better information on incorporating Draco into Unity: https://gitlab.com/atteneder/DracoUnity

    They might have more info on how to do this. Otherwise someone would need to create an example on how to do this.

    点赞 评论 复制链接分享
  • weixin_39968655 weixin_39968655 4月前

    The problem is that the Unity plugin does not expose the multi material mappings even if your Draco file contains such data, it is however possible to solve this by forking the source code and making the necessary adjustments to what data is returned to Unity.

    I am currently writing such adjustments to my own fork of Draco because I need multi material support as well, but the actual implementation will depend on how you want the data structured, but since multi material meshes are a part of Draco, it should have had this support already and adding it in is not super trivial.

    点赞 评论 复制链接分享

相关推荐