Looking for a light and quick way to animate people and animals

Let’s see what I can do to help here. The demo sometimes doesn’t load properly, by the way. It took a couple of reloads to get it working.

First, animations. If you are looking for characters animations, Mixamo is awesome. Free, tons of animations, easy to use. I never actually used with BabylonJS to be honest, but I think you can easily convert the exported models. I saw Pixcap a while ago too, and it’s really awesome for custom animations.

Second, meshes and skeletons. You should strive to reduce the number of polygons and make skeletons as simple as possible. At least your meshes are quite small and simple.

Third, optimizations. If your bottleneck is the CPU, Baked Texture Animations | Babylon.js Documentation can help you (these are the VATs @PirateJC mentioned). It’s essentially a way to pre-compute the animations and store them in textures, so it can all be done on the GPU later. Docs and examples should help you, though there’s a small open issue on some types of animations that I intend to finally do a proper fix one of these days. I still have to wrap my head around how to play the animation groups independently and frame by frame.

One thing you should take notice, coming from your Z80 background, is that bottlenecks changed considerably. For the “average scene”, memory isn’t an issue anymore. The number of polygons isn’t the usual bottleneck anymore either, like it was in the early 2000s. When working with JS the usual bottleneck is CPU, since browsers for some reason refuse to provide a decent multi-thread model. This is why VATs are interesting, you offload the mesh/bone computation, which is a sure bottleneck when you start having multiple models.

4 Likes