tyFlow Forum
Log overall simulation time or average frame time - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: Log overall simulation time or average frame time (/thread-4805.html)



Log overall simulation time or average frame time - Findus - 06-03-2025

Is there a way to display not only the individual frame times, but also the average frame times or the time needed for the last simulation to be completed after hitting play?
I have found the debug settings printed to the Listener as well as the Profiler in the Utilities, but they only seem to display individual frames.


Edit: Here's an AI-script that seems to work fairly well:

Code:
t1 = timestamp()
-- Advance the time slider to the last frame (forces sim to compute)
slidertime = animationrange.end
t2 = timestamp()
timeTaken = (t2 - t1) / 1000.0
format "Simulation time: %.2f seconds\n" timeTaken



RE: Log overall simulation time or average frame time - tyFlow - 06-03-2025

Advance the time slider forward and tyFlow will print the total time to the listener. It only shows per-frame time if you advance one frame at a time.


RE: Log overall simulation time or average frame time - Findus - 06-03-2025

Thank you, that makes sense. No idea why I didn't figure that out myself.

Right now, jumping ahead to the end of the timeline seems to have caused a state where tyFlow calculates very fast and ignores at least cloth self collisions. (clothSelfCollision example scene changed to Cuda collision solver with Particle Physics deactivated but that might be a coincidence). Same thing happened yesterday once with the script. Unticking/ticking/changing the respective settings after that did nothing, restarting Max fixed it. Might be a lot of things, of course, including a feature like a preview mode. I'll try a couple more things if it happens again.


RE: Log overall simulation time or average frame time - tyFlow - 06-03-2025

There's nothing about skipping forward that would disable collisions. Sounds more like a GPU driver crash is occurring. Check the editor/listener for error messages.


RE: Log overall simulation time or average frame time - Findus - 06-04-2025

Thanks! Will do when it happens again.


RE: Log overall simulation time or average frame time - Findus - 06-06-2025

Yep, it's a CUDA crash: "error: -100| code 700" "CUDA crash info: [code: 700 | file: __file__. | line: 21]."