Jump to: Board index » General » Fusion

"Cache to disk" in Fusion?

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

Dazzer

  • Posts: 228
  • Joined: Sat Aug 24, 2019 8:31 am
  • Real Name: Daz Harris

"Cache to disk" in Fusion?

PostWed Oct 16, 2019 10:05 pm

Hi folks,

I'm working in a composition is fusion.

I've got a quite complicated set of clips, nodes, masks etc and it's taxing my computer which is no longer able to play back in realtime.

So i i want to put them all in a group and "Cache to disk", so i can go further with my composition (i no longer need to tweak any more of these nodes, so they can in effect be "flattended").

I right click on the group and choose "Cache to disk". The composition plays all the way through and the nodes inside the group flash frantically as they do their thing and "Cache to disk". Once it's played through, they glow a solid, cosy green, indicating they're cached.

However, when i try to play the composition, nothing actually seems to have cached and it just seems to start caching all over again.

Any ideas on how to reliably and repeatedly cache or "flatten" certain blocks of nodes that no longer need to be tweaked?

Thanks!
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: "Cache to disk" in Fusion?

PostWed Oct 16, 2019 11:58 pm

I've never trusted Fusion's cache—it's too fragile. I instead just use a Saver to pre-render branches that aren't likely to change then bring the results back in a Loader.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Dazzer

  • Posts: 228
  • Joined: Sat Aug 24, 2019 8:31 am
  • Real Name: Daz Harris

Re: "Cache to disk" in Fusion?

PostThu Oct 17, 2019 6:55 am

Thanks Bryan,

Does that work reliably for you in Resolve, or only in Fusion Studio?
Offline

Dazzer

  • Posts: 228
  • Joined: Sat Aug 24, 2019 8:31 am
  • Real Name: Daz Harris

Re: "Cache to disk" in Fusion?

PostThu Oct 17, 2019 9:22 am

Ok, so i'm experimenting a bit more, and i'm really baffled by this loader / saver thing.

I performed the following experiment:

I've got a Fusion comp (inside of Resolve 16) that is quite complicated.

At the end of the node tree i've placed a saver directed to a certain folder.

I go to Fusion > Render all savers and start the render.

It takes 13 minutes.

Once it's done, my saver folder contains about 234 files, all ending with .exr and numbered sequentially.

I open a new Resolve project, create a new Fusion comp, create a loader and browse to my previously mentioned saver folder.

There i see 234 .exr files........... "hmmmm, which to load?"

After some experimentation i discover it doesn't matter, they all lead to the same result.

Ok, so now i have the saved comp loaded in my new Resolve / Fusion session.

I hit play. But it doesn't play smoothly. It still needs about 100 seconds to render.

But render what? I thought i'd flattened it down!

I'm really confused by all of this. I notice that the folder contains 2.5 gigs of data.

What purpose do these 234 files serve? Why doesn't it just export to one file?

Is there a way to export my comp into a format that contains the alpha channel but doesn't need any more rendering when i load it into a new comp so i can use it straight away?

Thanks for your time and sorry for the long-winded explanation / stupidity!
Offline

Philippe Metro

  • Posts: 90
  • Joined: Mon Nov 03, 2014 9:11 pm

Re: "Cache to disk" in Fusion?

PostThu Oct 17, 2019 10:52 am

Each exr file is a frame of your comp with very little compression, so, to playback smoothly, you need fast storage.
Offline

Dazzer

  • Posts: 228
  • Joined: Sat Aug 24, 2019 8:31 am
  • Real Name: Daz Harris

Re: "Cache to disk" in Fusion?

PostThu Oct 17, 2019 1:24 pm

Ah, ok, thanks!

Another question: when in loop mode, why is that the green "cached" bar under the frames ruler never fully turns green?

It'll turn green as the play line moves over the ruler, but then turns un-green a few seconds later. So the play line is never cathes up to what is green.

Like a cheeky dog perpetually trying and failing to catch his own tail!
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: "Cache to disk" in Fusion?

PostThu Oct 17, 2019 5:29 pm

Ah, you didn't say you were in Resolve. I honestly don't really know the 'ins and outs' of the Fusion page in Resolve very well. It's probable that there is a better, more cache-friendly way to prerender there, but I don't know about it.

Fusion itself works best with image sequences—the numbered, discrete images you noted. It's not designed for real-time playback, but for pixel-perfect frame-by-frame processing. Optimizing for playback necessarily means compressing, which is something compositors don't generally want.

The green cache line chasing its tail is likely because you don't have enough memory available to store the entire clip. Again, I'm not familiar enough with Resolve to be able to say much more than that, but it can take quite a lot of memory to cache the images.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Dazzer

  • Posts: 228
  • Joined: Sat Aug 24, 2019 8:31 am
  • Real Name: Daz Harris

Re: "Cache to disk" in Fusion?

PostThu Oct 17, 2019 6:48 pm

Many thanks Bryan,

Think i'm starting to understand it.

So the reason that each frame is rendered separately is so that if you need to do some hardcore tweaking on a frame by frame basis (say in Photoshop), that's possible, right?

I notice that when you render a saver, it saves exr files, but if i right-click on a node, then "cache to disk", it saves as a RAW file per frame.

Is there any advantage of EXR over RAW?

I tried to do the saver / loader thing, but it seems that when you do that, it renders every saver in your comp, even if it's already saved. So i don't see the use of it as you get bogged down with long render times even when making a small change on only one node branch.

Anyway, gonna mess around with it some.

At the moment i've got a pretty weak computer and videocard set-up, but i think in the long run that might be a blessing in disguise as it's forcing me to work out the most optimized and efficient way to use Fusion!
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: "Cache to disk" in Fusion?

PostThu Oct 17, 2019 10:52 pm

If you disable a Saver it doesn't render. Sorry if that wasn't clear.

EXR is the currently accepted 'best' image format for vfx data exchange. It can use both lossy and lossless compression, have any number of channels and layers, and the channels need not all be the same bit depth or even have the same compression format. For instance, you can compress photographic channels with a lossy jpeg-like algorithm at 16 bit and have lossless 32-bit z-depth information in the same file.

The Raw file type is Fusion's native raster—it's almost identical to the actual image that gets passed from node to node and is therefore very fast for Fusion to decode and display. It's not readable by other software, though.

A Saver in Fusion standalone can render to any file type that Fusion understands, but the one in Resolve was purpose built for a narrower application, so it only does EXR (for now). You might be able to load that RAW file sequence from caching with a Loader; I'm not sure if that works in Resolve or not. That could be a way to get what you need.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Dazzer

  • Posts: 228
  • Joined: Sat Aug 24, 2019 8:31 am
  • Real Name: Daz Harris

Re: "Cache to disk" in Fusion?

PostFri Oct 18, 2019 9:54 am

Thanks for the explanation.


--------------------------------------------------------------------

EDIT!!!

I think i worked it out: i had forgot about the fact that you said in your first post that you brought it back in a Loader.

So it seems that one needs to save, then disable that Saver......next, and importantly, break the output from that Saver, so it doesn't output anywhere. Next, make a Loader, load, and connect that to the place the Saver was connected to downstream.

Now, you still have all your nodes available (for future tweaks?) from the branch upstream from the Saver, but they'll remain "dormant" until you EITHER re-enable the Saver at the end that branch, OR reconnect that Saver to the comp.

Phew, I think i got it now, right?

----------------

EDIT 2:

Sorry, just one little fly in the ointment:

Say i have a one minute long comp.

I have a branch that i only need to render from 20 seconds to 40 seconds. So i put my yellow left / right brackets (in the frame ruler) at 20 and 40 seconds.

I go ahead and do the Saver / Loader thing and i notice that indeed, it has only rendered (and imported) the video [that WAS residing] between 20 & 40 seconds.

Now, all is hunky dory accept for one thing: the saved video plays from the start of the comp.

But i don't want that, i want it to play from the 20 second mark, because that's where it was playing before i saved it.

So is it the case that you MUST always have the left bracket at frame 1?

Or is there some way to embed timecode (or some other time stamp) into the EXR files so that they play back at the correct moment?

I can think of a workaround using the Time Speed node, but it would be nice to know how the pros deal with it! :)
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: "Cache to disk" in Fusion?

PostFri Oct 18, 2019 6:10 pm

I'm not sure how it looks in Resolve, but in RealFusion, the Loader has a GlobalIn control that determines when it starts. TimeSpeed is also a useful way to do it. I wouldn't call that a workaround at all.

Or you could render empty frames to pad out the sequence to the correct length.

If you use the GlobalIn control or TimeSpeed, you will probably need to do a bit to account for when the image becomes invalid. The simplest way is to make a Background, set all four channels to 0, and connect both your Loader and the Background to a Dissolve node. That way, when the Loader fails for not having a valid image, the Dissolve will automatically fall back to the Background node, preventing an error.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Dazzer

  • Posts: 228
  • Joined: Sat Aug 24, 2019 8:31 am
  • Real Name: Daz Harris

Re: "Cache to disk" in Fusion?

PostFri Oct 18, 2019 9:59 pm

Ah-ha, thanks, that global Loader offset fixes it.

I've been messing around all day in Fusion Studio, and it certainly seems more stable and nicer to work in then Resolve.
Offline

groslaine

  • Posts: 43
  • Joined: Sun Sep 16, 2018 1:53 pm
  • Real Name: lecointre leny

Re: "Cache to disk" in Fusion?

PostWed May 25, 2022 7:34 am

I have a question concerning the "cache to disk".
If I cache a node, then I copy paste a instance of this node. Will it be faster and cached for the instance as well ?

Return to Fusion

Who is online

Users browsing this forum: No registered users and 26 guests