draco icon indicating copy to clipboard operation
draco copied to clipboard

Unity related changes

Open atteneder opened this issue 4 years ago • 3 comments

Hello dear Draco developers,

This PR mostly serves the purpose of suggesting additions/changes, kick off discussions and not primarily to be merged in the end.

The code can be tested in the related Unity package DracoUnity 2.0.0-preview.

Split up decode function

The decode function could be sped up for Unity (and maybe other systems as well) by splitting it into phases:

  1. Parse Draco data and provide final index and vertex buffer structure and size. Unity is then able to allocate resources properly ahead of time (which has to be done on the main thread)
  2. Perform actual decoding. This can now be done efficiently on threads, even in parallel (for each vertex attributes)

Encoding

I've created an additional library that allows encoding Unity meshes to draco data/files.

Others

  • GitHub action to build Unity libraries for all platforms in one go
  • Optional coordinate system conversion (required in glTF context)
  • Provide Unity package for easy installation/usage (see DracoUnity)

The latter is nothing new, but I'm open to re-integrate this package into the original repository. We could create a GitHub action that builds the native libaries, adds it to the package and deploys it to a special branch. From there it could be deployed to a package manage server (like verdaccio or OpenUPM)

Let me know your thoughts, Thanks

atteneder avatar Mar 04 '21 11:03 atteneder

@atteneder Thanks for the PR. I'm going to start by going over the GitHub actions and CMake stuff. Frank and l will look more deeply into the code over the next week or so-- things are pretty busy at present.

Re the GH actions stuff: there are some internal policy items that necessitate some changes to our repo configuration before we can accept CI automation that touches third-party actions. This shouldn't impact you much, but it's slowing the process down because Google projects can't accept the addition of third-party actions without these changes. As I currently understand the only change on your side is that CI integration must use specific released versions of third-party actions, but beyond that nothing is jumping out at me.

tomfinegan avatar Mar 05 '21 22:03 tomfinegan

Thank you very much @tomfinegan for the excellent feedback and sorry I wasn't able to pick it back up for so long.

I tried to implement all suggestions and returned some questions where things are not clear to me. Depending on your answer I'll remove the packaging (or not), test if the CI works and make the PR ready for review.

atteneder avatar May 14 '21 16:05 atteneder

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

google-cla[bot] avatar Sep 11 '21 19:09 google-cla[bot]