magma flow slow down

While I’m opening magma flow editor, 3dsmax animation playback became slowdown.
If I have a lot of node in the magma editor, it became more slow.
But If I close the editor, no slowdown.
Actually about 18fps when I use the 30 nodes in the Gnome magma, but if I close the editor(not delete), it get 300fps.
Is this normal thing??

All of the magma editor (Krakatoa, Stork Genome) have this problem.

Yes, the Magma Editor creates several callbacks including a time callback. It gets fully redrawn on each time change, because the values in various nodes can change as the time changes - for example if you had keyframed inputValues, or in debug mode where every socket shows the value passing through it.

I could look into make the time callback optional, but most of the time you would want your editor to represent the current frame’s data, so I am not sure if turning that off would be a better alternative to just closing the editor…

I will log it as a Wish List item (it is not a Bug but As Designed right now), and will do some testing to see if I can skip the updates if there is nothing keyframed and Debug mode is off.

You can check “mute all” if you are using Stoke, that will turn off the updating. For Krakatoa and Genome you need to turn off “Auto Update” (right this second I don’t remember them having a mute button).

Edit: Read it a bit wrong, you have the editor open… Should still be a lot faster if you turn off Auto Update (if you haven’t already).

If the editor is open, that won’t help. The slowdown is not from the evaluation of the flow, but from the Editor repainting all nodes on every time change.

Ok, here is a test version that attempts to speed up the updates by only refreshing the names and potentially color swatches of InputValue nodes that are actually keyframed.

This will work only in Stoke 2 RC3 (with Genome). It won’t work in older Genome versions or Krakatoa. Back up the original file in your Stoke installation’s Scripts folder and replace.
MagmaFlowEditor_FastPlayback.zip (81.8 KB)

Bobo, thank you for your explanation.
I want to have a node editor and animation playback same time, actually.
It is bother that I close and open it every time, when I check my animation.

So, I need more better response. Please improve it!!! :wink:

Did you see the update I posted? :question:

I tested the test version of magma editor.
It is clearly better than before! thanks!!
But still happens slowdown. Please improve more!!! :smiley:

I take it you saw my edit :stuck_out_tongue:.

On my machine, there is no slowdown.
Using the BulgeWithScrewOption Genome preset with no animated controls on a Teapot, I had 12.6 seconds playback for 100 frames with the old version, and 2.5 seconds with the new one. With the editor closed, it plays back in 2.3 seconds.

When I keyframe the Phase value and play back with Editor open, I get 3.9 seconds because all 40 nodes have to be redrawn, but only one is actually being touched. I am not going to disable the updates of value display in the nodes, because then other users will come and whine about it :smiling_imp:

If you can give me benchmark results that show it is playing back at 20 fps or something, I will look again. But I am getting 60 to 80 fps even with keyframed controls and Editor open, so that’s good enough for me.

When I close the editor, I get about 160fps with 40 nodes. (BTW, uncheck realtime option).
And When I open the editor, I get about 50-120fps. But that looks very very jaggy. The reason I imagine that it has unstable fps.

So, I found a thing. If I minimized editor, the performance improved and it looks very smooth.
In the old editor, if I minimized it, no change about the slow speed.

Therefore, Is this the windows GDI problem maybe???

Do you have animated parameters in the flow?
When nothing is keyframed in the Magma, no Editor updates should occur at all. The callback function would only check the visible nodes, look for InputValue nodes and if they are not animated, it would skip them and never redraw the Helium control.
If a node is keyframed, the output socket text of that node will be updated and the Helium.redrawView function will be called once per time change.

There is also an update controls call if an InputValue node is currently selected in the Editor to make sure its UI is redrawn correctly. If nothing is selected and nothing is keyframed, I would expect the speed to be the same as with the editor closed.

Oh I see.
I have some of animating parameters.
OK, thank you for your great response :wink: