Page 1 of 1

Flatten transform on multiple Merge nodes 'Out of Memory'

PostPosted: Thu Feb 03, 2022 9:13 am
by peterbaumann
Just ran into this issue on my MacBook Pro M1 Max.

I've set up a composition with lots of node trees in Fusion Standalone 17.4.3. On each of my main Merges I had enabled 'Flatten Transform' (this often fixes an issue with transforms and masks playing up).

During rendering, when it gets to a DVE animation with Motion Blur (Quality: 4), the application freezes up and I get the following System warning:

Screenshot 2022-02-03 at 08.52.02.png
Screenshot 2022-02-03 at 08.52.02.png (293.62 KiB) Viewed 711 times


Disabling Flatten Transform on all the nodes allows the render to proceed past that section.

Furthermore, my overall frame rate on export was approximately twice what it was with the 'Flatten Transform' button enabled on the Merges. Is this expected?

Re: Flatten transform on multiple Merge nodes 'Out of Memory

PostPosted: Thu Feb 03, 2022 5:26 pm
by Bryan Ray
You may need to adjust the settings in the Memory section of the Preferences. I think the default is to leave only 200MB, which is very likely not enough for today's operating systems.

Flattening transforms shouldn't cause a huge slowdown, unless you just have a gigantic number of Merges you're doing that with. The way Fusion usually works, the transform matrix is passed downstream accumulating changes as it goes, until it hits a node that isn't a transform, then it applies the transformation all at once. The reason to do it this way is that calculating the matrix is very fast. Applying it to pixels is much slower.

By enabling Flatten Transform, you're forcing the matrix to be applied at that point instead of passing it along. So where normally you'd have two or three operations at the end of a chain, you're instead getting an operation at every single Merge. Even if nothing is actually changing, Fusion still makes the calculations.

And incidentally, by flattening at every step, you also risk filtering the pixels multiple times, which can soften the image. If there isn't a transform actually happening, that won't be an issue, but I thought I'd mention it. The instances where Flatten Transforms fixes a problem are fairly rare, so I'd only turn it on if it actually does fix something.

Re: Flatten transform on multiple Merge nodes 'Out of Memory

PostPosted: Thu Feb 03, 2022 5:40 pm
by Sander de Regt
I'm wondering if this isn't a memory leak.
600+ Gb of memory for Fusion seems like a lot.

Re: Flatten transform on multiple Merge nodes 'Out of Memory

PostPosted: Thu Feb 03, 2022 9:57 pm
by Bryan Ray
Oh wow; I hadn't looked at that screenie carefully enough. My brain placed the decimal where I expected it to be instead of where it actually was.