3DStreet / 3dstreet-assets-source

🧊🌳🚗 3DStreet model source files
Other
2 stars 4 forks source link

bake animation to geometry shape keys #54

Closed kfarr closed 1 year ago

kfarr commented 1 year ago

Goal:

Ideally the first frame of a baked animation for each of our 16 characters would exactly match the current static character pose. In other words if we load the character without animation, it looks like the current static pose. If we animate it, it will have a loop that is prebaked without bones. Would that make the file size smaller for each?

Its called Shape Keys in Blender and Morph Targets in Three js here are some examples of Morph targets https://threejs.org/examples/?q=morph#webgl_morphtargets_horse https://threejs.org/examples/?q=morph#webgl_morphtargets_face

I need to experiment If the file size reduces when we use baked Geomrty animation.

Kieran Farr Today 08:45 AM Would there be an alternative to not use bones and just bake the mesh animation to reduce file size as much as possible?

Could you open an issue on Github ? so that we can keep track on it. I can make two versions of walk animation with Bone animation and MorphTargets(Blender shape keys) animations. We can compare the file sizes.

gnansai commented 1 year ago

Hi @kfarr I made a test with baking the shape-keys to the geometry in Blender. Here is the link to the test files https://github.com/gnansai/3dstreet-assets-source/tree/main/models/human-characters/baking_test

gnansai commented 1 year ago

I have baked the bone animation to shape keys for each frame. Here are my observations

  1. The Draco compression does not seems to reduce file size when using the shape keys. image

  2. If we use more shape keys the file size increases. image

kfarr commented 1 year ago

Before tagging other people to help, restating this request in its entirety:

What is best way to achieve the above requirements with the smallest file size?

PS. Should we also be optimizing for rendering? At the moment scenes with many animated pedestrians have low fps. (example)

kfarr commented 1 year ago

thanks @gnansai for doing this research. I'm going to mark this ticket as closed / not doing. Instead we solved this with 2 other things:

kfarr commented 1 year ago

thanks @gnansai for doing this research. I'm going to mark this ticket as closed / not doing. Instead we solved this with 2 other things: