Performance issues with duplicated instances containing animation players.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dynamite-ready
:warning: Old Version Published before Godot 3 was released.

I have an animated node containing one low polygon mesh (200 polys) and an animation imported from a Collada file.

Using a new Timer() I duplicate each node, add it to the scene root, and then call the animation player’s play() method to play the default animation. This works fine, and the frame rate stays high (60fps) when I generate 5 - 8 duplicates, but at 10 -16 duplicates the performance is awful.

How can I optimise the performance here?

Can the problem here have something to do with running an animationPlayer node for each clone? Or is there perhaps a better way to share animationPlayer data from one node between multiple nodes?

can you make an sample project to reproduce it?
It’s hard to say what can improve in your case.

volzhs | 2017-01-19 12:19

:bust_in_silhouette: Reply From: dynamite-ready

I managed to fix the issue by generating a new Collada file.

In the original version exported from Blender, I used a constraint to produce the animation, and Blender’s ‘bake action’ feature to ‘freeze’ the animation. I also chose Blender’s standard Collada exporter to produce the Godot scene.

For the fix, I used the same Blend file, but used the official Godot Collada exporter,
which appears to bake animation constraints on export automatically.

I still need to perform more tests, but it’s certainly running faster than it did before.

Perhaps Blender’s standard exporter was generating too much redundant data, slowing down the renderer.

¯_(ツ)_/¯