Jump to: Board index » General » Fusion

Enabling/Disabling Nodes during a long composition

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

Dudley

  • Posts: 2
  • Joined: Mon Mar 15, 2021 7:55 pm
  • Real Name: Zachary Chamberlain

Enabling/Disabling Nodes during a long composition

PostMon Mar 15, 2021 8:00 pm

It's probably been asked a bunch of times but I could not find an answer in a brief search. If I have a long composition with things coming in and out of frame, let's say a 5 minute composition, is there a way to disable nodes so they aren't constant just off screen or unblended? I've done this numerous times with short compositions by just keyframing blend on and off or making them go off screen but these are for short compositions and I assume they aren't taking much rendering power. If I have a long composition though is that the only way? Wouldn't that require massively long node trees that have nodes that don't need to be active anymore after a certain period?
Thank you.
Offline

Kel Philm

  • Posts: 604
  • Joined: Sat Nov 19, 2016 6:21 am

Re: Enabling/Disabling Nodes during a long composition

PostTue Mar 16, 2021 8:30 pm

If they are 'unblended' (Blend = 0) that branch should not get processed. One way to check this approximately is to look at the node graph when playing back (Turn on the view 'v' I think), the active node(s) get highlighted as they are processed. I have a script that prints some basic stats on which nodes are using the most processing time which I will post when I am back at my desk.

Also look into Domain of Definition (DoD), optimising the amount of data you are processing can dramatically speed up processing in some situations, especially if you are merging large images and only using small parts of them. One example would be if you merged a 8K image at original scale over an HD image, Fusion could from then be processing 16 times more data than it needs to as it may display HD but would keep and process the 8K boundary around that.

I personally would love to see a crop option on the Merge node to prevent this.
Offline
User avatar

Chad Capeland

  • Posts: 3017
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: Enabling/Disabling Nodes during a long composition

PostTue Mar 16, 2021 10:17 pm

Kel Philm wrote:Fusion could from then be processing 16 times more data than it needs to as it may display HD but would keep and process the 8K boundary around that.


It won't. It will just request a limited size data window of only the pixels needed.

Now, that data window can be changed by upstream tools, of course. If you're doing an optical flow, for instance, you'll need to analyze pixels across the entire image, so the data window will be set to the full image extents.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Kel Philm

  • Posts: 604
  • Joined: Sat Nov 19, 2016 6:21 am

Re: Enabling/Disabling Nodes during a long composition

PostTue Mar 16, 2021 11:50 pm

I stand corrected regarding the DoD. I think this stems from my misunderstanding of the SDK implementation, some botched testing and also the observation that you can have an image with a domain much larger than its output, apply a node to it (say colour) then transform it and the outer bounds have also had the colour change applied. So it must parse the data window sizing backwards up through the flow before it begins rendering, which I guess makes sense.
Offline
User avatar

Chad Capeland

  • Posts: 3017
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: Enabling/Disabling Nodes during a long composition

PostWed Mar 17, 2021 12:12 am

Kel Philm wrote:So it must parse the data window sizing backwards up through the flow before it begins rendering, which I guess makes sense.


Ideally, yes.

But a badly written tool (or one which cannot know the proper bounds, like CT) will toss the small data window and pass a full image requests upstream.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Kel Philm

  • Posts: 604
  • Joined: Sat Nov 19, 2016 6:21 am

Re: Enabling/Disabling Nodes during a long composition

PostWed Mar 17, 2021 1:45 am

Chad Capeland wrote:But a badly written tool (or one which cannot know the proper bounds, like CT) will toss the small data window and pass a full image requests upstream.


Like the ones I wrote using the SDK and probably ran my erroneous tests on. :?

Back on topic, here is the script:

Code: Select all
function spairs(t, order)
    -- collect the keys
    local keys = {}
    for k in pairs(t) do keys[#keys+1] = k end

    -- if order function given, sort by it by passing the table and keys a, b,
    -- otherwise just sort the keys
    if order then
        table.sort(keys, function(a,b) return order(t, a, b) end)
    else
        table.sort(keys)
    end

    -- return the iterator function
    local i = 0
    return function()
        i = i + 1
        if keys[i] then
            return keys[i], t[keys[i]]
        end
    end
end


-- Main

local sumTime = 0.0   
local resTab = {}


--
for i,tool in ipairs(comp:GetToolList()) do
   resTab[tool:GetAttrs().TOOLS_Name] = tool:GetAttrs().TOOLN_LastFrameTime
   sumTime = sumTime + tool:GetAttrs().TOOLN_LastFrameTime
end

print("======================================================")
print(" Tools from slowest to fastest (Tools with 0 ignored)")
print("======================================================")

for k,v in spairs(resTab, function(t,a,b) return t[b] < t[a] end) do
    if v > 0 then
      print(string.format("%7.1f %%", 100 * v/sumTime) .. "  " .. k)
   end
end


So this basically uses the 'LastFrameTime' parameter for each node to calc the percentage of frame render time used by each node. Note that if some nodes do not appear they are probably cached so Purging the Cache may give a more balanced indication.
Offline

Dudley

  • Posts: 2
  • Joined: Mon Mar 15, 2021 7:55 pm
  • Real Name: Zachary Chamberlain

Re: Enabling/Disabling Nodes during a long composition

PostWed Mar 17, 2021 3:16 pm

Ok, despite not understanding a good majority of the technical stuff you all mentioned, good to know that it's not taking processing power :D . Thank you.

Return to Fusion

Who is online

Users browsing this forum: No registered users and 31 guests