Jump to: Board index » General » Fusion

See Render time of each node

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

Fredrik Danell

  • Posts: 4
  • Joined: Sat Jan 07, 2017 2:07 pm

See Render time of each node

PostThu Nov 09, 2017 10:02 am

Hi!
Sorry if this is obvious, but is it possible to see the rendertime of each node to determine bottlenecks? I'm using the freeware version.
Offline

Ryan Bloomer

  • Posts: 263
  • Joined: Tue Jul 09, 2013 6:58 pm

Re: See Render time of each node

PostThu Nov 09, 2017 11:21 pm

One way to do this is to watch the navigator window in to the flow and see what takes the longest to process.

If you don't see the navigator in the flow, use (v) to toggle on and off or RMB in the flow/options - show navigator.

The node will turn green as it's processing.

Not sure if there's a script that will actually print out render times of nodes, but using the navigator usually helps identify processor intensive nodes.
Offline
User avatar

Bryan Ray

  • Posts: 221
  • Joined: Mon Nov 28, 2016 5:32 am

Re: See Render time of each node

PostFri Nov 10, 2017 1:40 am

The attribute TOOL_LastFrameTime contains the amount of time it took a node to render the last time Fusion called for a frame.

Here's a single-line command you can paste into the Console to get the name and render time of all selected tools:

for i,tool in ipairs(tools) do print(tool:GetAttrs().TOOLS_Name..": "..tool:GetAttrs().TOOLN_LastFrameTime); end
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com
Offline

Kel Philm

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

Re: See Render time of each node

PostFri Nov 10, 2017 6:30 am

Very Cool Bryan! This will be very helpful (especially once I can figure out how to sort it by time).

Also Bryan I had to use 'Comp:GetToolList()' instead of 'tools' for this to work on 9.1.
Offline

Kel Philm

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

Re: See Render time of each node

PostFri Nov 10, 2017 11:30 am

Its pretty rough but I created a script in my Comp level Scripts folder and it spits out a list slowest to fastest for all tools that have time greater than 0.

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

   
resTab = {}

for i,tool in ipairs(comp:GetToolList()) do
   resTab[tool:GetAttrs().TOOLS_Name] = 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.2f", v) .. "  " .. k)
   end
end
Offline
User avatar

Bryan Ray

  • Posts: 221
  • Joined: Mon Nov 28, 2016 5:32 am

Re: See Render time of each node

PostFri Nov 10, 2017 7:40 pm

Whoops! Sorry, you're right: you need to get the tool list first. I'd done so and stored it in "tools" already and forgot to replace the variable with the command.

There's a script floating around out there that sets the tools' tile color according to render time, creating a heatmap. I doubt it's been updated for Fusion 8/9, which is why I didn't mention it in the first place.
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com
Offline

Fredrik Danell

  • Posts: 4
  • Joined: Sat Jan 07, 2017 2:07 pm

Re: See Render time of each node

PostSat Nov 11, 2017 12:37 pm

Absolutely amazing guys! Kel Philms script worked like a charm!

Return to Fusion

Who is online

Users browsing this forum: No registered users and 7 guests