Hi there!
I’m not sure if there is a concrete question here… But i’d like to be pointed to the right direction regarding this issue.
I am not sure if Playcanvas has support for per vertex animation, but I noticed the model viewer does offer some kind of support by creating a morph target for every frame, although I haven’t yet figured out what are the export configurations to acheive that.
What I am trying to do here is use PLA animations (or per vertex animations) in my models.
Here’s the result so far: https://launch.playcanvas.com/1262505?debug=true
To acheive this I do three steps:
- Import a mesh for every frame and store the positions, indices and normals
- Create and download a json file containing all the data
- Use that json file data to set the positions, indices and normals and redraw the mesh on each frame.
Here’s a link to the proyect:
https://playcanvas.com/editor/scene/1262505
I don’t actually NEED the json, but it helps holding data toghether.
The downside is that it’s pretty expensive storage-wise… the json asset alone is 20.5Mb for a 3 second animation (90 frames at 30fps for a 3.2K poly mesh).
I can imagine some improvements ignoring every other frame and tweening linearly between the remaining ones. That could down the file size to half or a third maybe at the expense of rendering a less accurate animation.
So the question here is:
Can anyone think of a better way to do this? Something tells me there has to be a faster/ lighter way
Sorry for the long post, and thanks for reading!