Is Babylonjs lagging behind?

A new JS game engine claims to achieve higher frame rates with less memory usage, while using much less memory than BabylonJS
Galacean Engine

1 Like

how is three.js only 10% of the perf of babylon? I’m having a hard time believing that : P

They released their benchmark suite here benchmark/src/babylon at main · galacean/benchmark · GitHub if anyone wants to reproduce their result (I will try and report on what I find)

2 Likes

In this benchmark, they tested the performance of the three engines when loading 225 glTF models and playing 255 glTF animations simultaneously.
I believe, it is possible that Three is not good in this regard.

2 Likes

I can’t run the build script on their repo so I can’t have the graphs.

From my testing using their dev script, Babylon is the fastest animation-wise so there is that :person_shrugging:

1 Like

Also how was their setup? They may have kept the option to restore context on for instance.

These tests are simply not usable unless we can carefully look at the options.

You can have a look at their repo I linked above, it looks like they didn’t do anything to squeeze all the performance from the engine. No performance priority flag or picking disabling for example

yup and no restore context suppression. So it is a fairly stupid comparison :smiley:

3 Likes

The memory usage of gltf animations is by design, babylon.js trades memory usage (and possibily performance) for flexiblity. Babylon.js have a fully featured Animation Curve Editor that can change per-frame interpolation (where in gltf it can only be per-channel).
See this rejected proposal for more detail:

2 Likes

Thanks @kzhsw for your hard work on this one. @Evgeni_Popov we do not have a plan to support this optimization planned for now due to the big changes it involves right?

1 Like

I am a rather radical developer, and I have always believed that we should develop a new version that uses various state-of-the-art technologies to remove legacy code that affects performance, in order to ensure the leading position of babylonjs and promote technological progress. Being conservative is not a good thing

Here it is:

However, this investigation has not made any progress for a year, should we reconsider starting babylonjs x development

Well we have a strong commitment to backward compatibility. So if someone wants to start that endeavor , we need to come with a fully backward compatible solution.

Babylon X was implemented in a different way than the one we initially envision (based on community feedback).

Changing the way we store animation data is not a small task and we are losing a lot along the way. We cannot force all our users down this path because not everyone value the same thing. Some will value the flexibility, other will value the memory footprint.

Performance wise we are not convinced that new solution will be better for instance.

2 Likes

So maybe the compat animation should be a plugin, so users can have the choice to install it and patch the gltfloader somehow to enable it.

1 Like

That would be simply perfect. Some configuration could let the system creates either Compact animation or regular Animation.

The cool part is that in that case it is on the user to decide. You want less memory but some constraints or you want full flexibility?

Man! That’s the way!

1 Like

No, no plans at the moment, due to the significant changes that this would entail. Furthermore, I believe there were backward compatibility issues with the PR (?).

1 Like

I don’t think animation performance is a concern at all. If it eventually becomes a popular/real topic; I’m sure it will be caused by new tech/features. Stick the animation in a shader and let AI do the rest I say!

That’s not about shader-based animation, the gltf animations are implemented on cpu.

I’m going to say just a single thing here.. Newer is not always better.. Sure the perf measurements look great. The browser tab explodes in memory consumption to 5GB on some examples and can nearly halt the browser in others. That’s not a good feature. That means someone isn’t paying attention or being excessive in their throughput, as if it’s the only thing going on in the browser. Otherwise, it looks promising. They’ll have to fix those two issues though. Major ones..