14-10-2020, 09:15 AM
(This post was last modified: 14-10-2020, 09:20 AM by josemendez.)
(14-10-2020, 08:40 AM)Yotingo Wrote: Are there any limitations with animated bones further down the hierarchy, below a simulation?
Example: Arms are simulated (no animations) and attached hands are animated (no simulation).
No issues, as long as key elements in the hierarchy (mainly joints) are animated. Say you simulate the entire arm, from wrist to shoulder: You'd then have a "spaghetti" arm that follows wrist and shoulder, but the elbow would not follow the animation and instead wobble around.
(14-10-2020, 08:40 AM)Yotingo Wrote: Does this mean you end up with thousands of bones?
How do you control the number of bones created?
When you set particle sizing and spacing, this automatically determines the amount of bones, as there's one bone per particle. Large particles = fewer bones. Smaller particles = more bones, up to one per vertex. See: http://obi.virtualmethodstudio.com/tutor...setup.html
Linear blend skinning is extremely cheap (one matrix multiplication per vertex), so having many bones is not an issue at all.
Quote:Are the bones regenerated each frame?
I don't understand how the bones deform their shape to match the simulation, unless they are re-created each frame.
No, bones are generated once and the mesh skinned to them, at edit time. This is an expensive operation so we avoid doing it at runtime. At runtime there's a simple loop that does this:
for all bones{
bones[i].position = particles[i].position;
}
This makes sure bones follow the simulation. Compared to what the simulation does, updating bone positions is basically free in terms of performance.