Giter Site home page Giter Site logo

Comments (5)

Calinou avatar Calinou commented on August 15, 2024 3

FPS is not a linear measurement. For example, a drop of 1,000 FPS isn't the same thing at all if you drop from 1050 to 50 FPS (19 mspf difference) compared to dropping from 3050 to 2050 FPS (0.16 mspf difference).

This is why graphics programmers generally never refer to rendering measurements as FPS and always talk in frametime instead (milliseconds per frame, also known as "mspf"). This is a proper linear measurement.

Can you reproduce this issue with an inactive AnimationPlayer node (instead of AnimationTree)?

from godot.

fire avatar fire commented on August 15, 2024 3

What calinou is saying is if enabling AnimationTree drops the frame time from 30 milliseconds to 60 milliseconds it is a very different problem than dropping 30 millisecond to 31 millisecond.

Since you mentioned frame drops one possible interpretation is a 0.3 ms drop to a 0.5 ms drop which is hard to justify work so we need to check in milliseconds per frame units.

So I think we need some justification this drop is too slow for your game.

from godot.

Calinou avatar Calinou commented on August 15, 2024 2

What calinou is saying is if enabling AnimationTree drops the frame time from 30 milliseconds to 60 milliseconds it is a very different problem than dropping 30 millisecond to 31 millisecond.

While the FPS drop might be small here, it has the potential to be larger in a game that has a lot of animated characters, even if you disable animation processing when far away. That's the issue we should aim to resolve if possible 🙂

I ran some profiles with HotSpot using an optimized (optimize=speed lto=full) editor build:

Top-down view with AnimationTree processing expanded

Top-down

Flamegraph (full view)

Flamegraph 1

Flamegraph zoomed on AnimationTree::_blend_pre_process()

Flamegraph 2

Flamegraph zoomed on AnimationTree::_blend_apply_()

Flamegraph 3

from godot.

conde2 avatar conde2 commented on August 15, 2024 1

Thanks for clarification, although this concept is still weird to me, I will learn more about it before making more assumptions.
If you mean setting this to false, yes I still can reproduce the FPS drop and the increase of mspf.

image

I can even remove the AnimationPlayer and I will have the same result. The problem is definitely the AnimationTree.

from godot.

conde2 avatar conde2 commented on August 15, 2024

I usually have around 1k FPS without any AnimationTree

Captura de Tela (9)

My game has a few creatures in the screen, and its enought to notice that frame time is going up. I aim to publish it to mobile, so I was procupied that this could hit the performance on this low end graphic cards devices.

Just to notice thats how I've setup my AnimationTree using AnimationNodeBlendTree with a StateMachine

image
image

from godot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.