-
-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Animated Poses Per Model #701
Comments
I've been using |
It's helpful to hear that |
This made me think of something else too: multithreading. Multiple threads trying to record render passes can't all animate the same Model object because it only has 1 animation state, so they'd need to use different clones of the model anyway. So |
Rough plan
With this, models would always be able to use their current animated pose when they're drawn, and |
Currently animated models only store a single copy of their vertices, and these get animated using a compute shader. This means that a single Model object can only be rendered using a single animation per frame. If you set up a different animated pose and draw the model a second time, it will use the animation from the first draw.
This is really confusing and annoying.
Model:clone
was recently added to alleviate this a bit, by allowing you to create lightweight copies of a Model, each with a separate set of vertices and animation state. However it's still not really acceptable to force people to manage multiple objects like this.LÖVR should probably do the work behind the scenes to support multiple animated poses for a single Model object. It improves usability and LÖVR will probably do a better job at managing multiple mesh copies internally than Lua is able to do.
At a high level each animated pose that gets rendered during a frame would allocate and use its own dedicated set of vertices. In pathological scenarios this can start to use huge amounts of memory.
Random notes about implementation:
The text was updated successfully, but these errors were encountered: