LifeSaver Fuse

User avatar
AndrewHazelden
Fusionator
Posts: 1001
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Been thanked: 92 times
Contact:

LifeSaver Fuse

#1

Post by AndrewHazelden » Fri Jul 13, 2018 3:01 pm

Overview

LifeSaver is a fuse based replacement for the traditional Saver or MediaOut nodes. This fuse uses EXRIO for the file output and supports multi-Channel and multi-part EXR image saving. This node is special in that you can use the same node in comps that are created inside of both Resolve's Fusion page and inside of Fusion Standalone. This dual environment support allows you to move documents between both programs easily via copy/paste, the "Fusion Comp Link" atom in Reactor, or using a .comp file.

Fusion 9.0.2 or Resolve 15 Beta 5+ is required.

Installation

The LifeSaver fuse is available exclusively through the Reactor package manager. You will find LifeSaver in the "Tools > IO" Reactor Category.

Reactor LifeSaver Atom Package.png

Usage

Enter the filename for your image sequence into the Filename field.

Filename-Field.png

The LifeSaver fuse allows you to save additional multi-part EXR image elements to the same EXR file using the following technique:

Step 1. Switch to the Channels tab and click the + button to add a new image input connection.

Add-Extra-Inputs.png

Step 2. In the Channels tab set new the Export Part # ComboControl to 'Enabled', and update the 'Layer Name' so it is relevant.

Step 3. Connect your imagery to the new input connection on the fuse so it is written to the multi-part EXR output.

Node-Connections.png

Step 4. You can use the fuse's Preview Input Connection ComboControl to send a specific input image # to the Fuse's output connection. This makes it easier to work with a specific multi-part EXR exported image element further downstream in your flow, after the LifeSaver node

Preview-Input-Connection.png

If you have added several extra node inputs to the LifeSaver fuse but have no images connected to them you should switch to the Channels tab and set the disconnected input's Export Part # ComboControl menu to 'Disabled'.

Disabled Parts.png

Note: Currently the EXR image format is the only supported output format in the LifeSaver fuse. In the future, it is (theoretically) possible to use the fuse based Clip() function to write out each of the individual flat image channels to disk using other image formats if that was a popular and frequently requested feature.

Fusion Screenshots

The File Tab

LifeSaver File.png

The Channels Tab

LifeSaver Channels.png

The Help Tab

LifeSaver Help.png

Show Help Window

The Help tab has a button labelled "Show Help Window". This can be used to show a quick usage summary of the node in a floating UI Manager window.

Show Help Window.png

Resolve Screenshots

The File Tab

LifeSaver Resolve.png

The Channels Tab

Resolve LifeSaver Channels.png

The Help Tab

Resolve LifeSaver Help.png

The Intool Tab

Resolve LifeSaver Intool.png

Tokens

LifeSaver supports the use of the following pre-defined token values in the Filename field. If any other value is written inside the ${} token format it will be looked up as if it was an environment variable.

  • ${VERSION} - The LifeSaver node 'Version' field (001)
  • ${UUID} - The LifeSaver node 'UUID' field (f9fa311b-904c-4b93-892f-0d772887db88)
  • ${COMP} - The current Fusion comp name (Composition1)
  • ${COMPWIDTH} - The current comp default height (1080)
  • ${COMPHEIGHT} - The current comp default width (1920)
  • ${NODE} - The LifeSaver node name (LifeSaver1)
  • ${FPS} - The current frame rate (24)
  • ${FRAME} - The current unpadded frame number (1001)
  • ${STARTFRAME} - The global start frame (1001)
  • ${ENDFRAME} - The global end frame (1144)
  • ${DURATION} - The global time duration (144)
  • ${DATE} - The date in YYYY-MM-DD format (2018-06-16)
  • ${TIME} - The time in HH.MM.SS format (14.59.05)
  • ${HOME} - The Home folder name (/Users/andrew)
  • ${USER} - The current user account name (andrew)
  • ${HOSTNAME} - The computer's host name (Pine.local)
  • ${SEP} - The file separator slash (/ or \)
  • ${PLATFORM} - The OS Platform (Mac/Windows/Linux)
  • ${FUHOST} - Is Fusion or Resolve the host package (Fusion/Resolve)
  • ${FUVERSION} - The version of Fusion is running (9.02/15)
  • ${SHELL1}-${SHELL4} - The Shell tokens textfield content is run in the Terminal/Command Prompt and the return value captured (echo Hello_World)

Supported Frame Padding Indicators

${FRAME}

The current unpadded frame number (1001).

0000

The number you type in at the end of the filename before the file extension can be used as a frame padding indicator. The number of digits you add define how much padding is added. You can also type a number other then '0000' like '1001' and this value will be used along side the 'Sequence Offset' value on the node when you have the [x] Saver Relative Numbering checkbox enabled.

%04d

The c-code style printf integer number formating symbol can be used to define the frame padding token.

####

The number sign/hash/octothorp # character can be used to define the frame padding (0000).

Filename Examples

Filename Token Example 1:
Comp:/${COMP}/${COMP}_${NODE}_${VERSION}.0000.exr

This would result in a rendered EXR image filename like:
/Volumes/VFX/MultiChannel/MultiChannel_LifeSaver1_v001.0000.exr

Filename Token Example 2:
Comp:/${COMP}/${COMP}_${NODE}.%06d.exr

This would result in a rendered EXR image filename like:
/Volumes/VFX/MultiChannel/MultiChannel_LifeSaver1.000000.exr

Fusion Environment Variable Debugging Tip

You can print out the environment variables that are active inside of Fusion using the following Lua script snippet:

Code: Select all

logFile = comp:MapPath('Temp:/FusionEnvironmentVars.txt');
os.execute('env > "' .. logFile .. '"');
bmd.openfileexternal('Open', logFile);

GUI Controls

Preview Input Connection [Input #1/Input #2/...]

preview-input-connection.png

File Tab:

Filename _____________ (Browse)

filename-control.png

Version Control:

Version ______________
- (Button) / + (Button)
UUID ______________
Update UUID (Button)

version-controls.png

Format:

Output Format [OpenEXR Files]
Save Frames [Full Renders Only/Interactive]
[] Saver-Relative Numbering
Sequence Offset

format-control.png

Folder Creation:

[x] Create Folder During Render
Create Folder (Button)
Open Containing Folder (Button)

folder-ceation.png

Rendering:

Render Current Frame (Button)
Render Selected (Button)
Render All Nodes (Button)
Network Render All Nodes (Button)

rendering-controls.png

Shell Tokens:

${SHELL1} ______________
${SHELL2} ______________
${SHELL3} ______________
${SHELL4} ______________

shell-tokens-controls.png

[x]Verbose Console Output

verbose-controls.png

Channels Tab:

Depth (float16)(float32)

rgba-depth-controls.png

Compression [None/RLE/Zip (1 Line)/Zip (16 Lines)/DWA (32 Line)/DWA (256 Line)]

zip-compression-controls.png

Parts

Export Part # (Enable/Disable)
Layer Name <export_#>
Input Connection <Background1_7_22_2_5_53_2_1>

exr-export-part-controls.png

Channels

[x] Red <R______>
[x] Green <G______>
[x] Blue <B______>
[x] Alpha <A______>
[x] Z <Z______>
[x] Coverage <pixelCover______>
[x] ObjectID <objectID______>
[x] MaterialID <materialID______>
[x] U <U______>
[x] V <V______>
[x] X Normal <NX______>
[x] Y Normal <NY______>
[x] Z Normal <NZ______>
[x] X Velocity <velX______>
[x] Y Velocity <velY______>
[x] X Reverse Velocity <rvelX______>
[x] Y Reverse Velocity <rvelY______>
[x] Z Reverse Velocity <rvelZ______>
[x] X Position <posX______>
[x] Y Position <posY______>
[x] Z Position <posZ______>
[x] X Disparity <dispX______>
[x] Y Disparity <dispY______>

exr-channels-controls.png

Help Tab:

WSL - LifeSaver Fuse (Button)
Show Help Window (Button)

help-button-controls.png

Reading the Metadata Table

You can read the LifeSaver node metadata using:

Code: Select all

meta = comp:FindTool('LifeSaver1').Output[comp.CurrentTime].Metadata
dump(meta)

This results in a Lua table output like:

Code: Select all

table: 0x01db142e58
	UUID = 952edc60-365a-4c58-a8ac-5e5360fc4be0
	Filename = /Volumes/Media/Renders/LifeSaver1.000000.exr
	Node = LifeSaver1
	Composition = 
	Date = 2018-07-19 08.47.10
	VersionControl = 007
	Program = LifeSaver.fuse for Resolve 15.0
	Directory = /Volumes/Media/Renders/

Reading the Metadata Filename

You can read the LifeSaver's node metadata Filename tag using:

Code: Select all

file = comp:FindTool('LifeSaver1').Output[comp.CurrentTime].Metadata["Filename"]
dump(file)

This results in a Lua table output like:

Code: Select all

/Volumes/Media/Renders/LifeSaver1.000000.exr
You do not have the required permissions to view the files attached to this post.
Last edited by AndrewHazelden on Thu Jul 19, 2018 4:53 am, edited 10 times in total.

User avatar
SecondMan
Site Admin
Posts: 2591
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 92 times
Contact:

Re: LifeSaver Fuse

#2

Post by SecondMan » Fri Jul 13, 2018 3:38 pm

Ooooh teasy goodnessss!

User avatar
AndrewHazelden
Fusionator
Posts: 1001
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Been thanked: 92 times
Contact:

Re: LifeSaver Fuse

#3

Post by AndrewHazelden » Fri Jul 13, 2018 3:40 pm

SecondMan wrote:
Fri Jul 13, 2018 3:38 pm
Ooooh teasy goodnessss!

A REGS_HelpTopic tag has to have a URL! It just wouldn't be right not to have it set up in a fuse.

User avatar
SecondMan
Site Admin
Posts: 2591
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 92 times
Contact:

Re: LifeSaver Fuse

#4

Post by SecondMan » Fri Jul 13, 2018 5:09 pm

Bonus thanks for those wise words! :)

User avatar
SecondMan
Site Admin
Posts: 2591
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 92 times
Contact:

Re: LifeSaver Fuse

#5

Post by SecondMan » Sun Jul 15, 2018 6:47 am

Absolutely stupendous release and a stellar example of what Fuses can do in Fusion. Congratulations Andrew, and THANK YOU!

:cheer:

User avatar
pingking
Fusionista
Posts: 669
Joined: Thu Aug 14, 2014 9:10 am
Been thanked: 13 times

Re: LifeSaver Fuse

#6

Post by pingking » Sun Jul 15, 2018 12:24 pm

just speechless on what you do with fusion

User avatar
AndrewHazelden
Fusionator
Posts: 1001
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Been thanked: 92 times
Contact:

Re: LifeSaver Fuse v1.0.1

#7

Post by AndrewHazelden » Sun Jul 15, 2018 1:03 pm

pingking wrote:
Sun Jul 15, 2018 12:24 pm
just speechless on what you do with fusion
Thanks @pingking! :)

In the LifeSaver.fuse there is a built-in version control field with -/+ incrementing buttons. This makes it easy to track your revisions and keep them up to date. The -/+ incrementing buttons automatically handle the leading digit based zero padding, and the buttons will also preserve any words or letters that are entered into the Version field while the digits are incremented. This allows you to seamlessly go from a "073_FINAL_FINAL" version to a "074_FINAL_FINAL" version in a single click.

The content that is stored in the "Version Control > Version" textfield can easily be placed anywhere you want inside your LifeSaver Filename field string by adding a version token element of ${VERSION}.

Version Incrementing Buttons

LifeSaver-Version-Control.gif

Version Incrementing Hotkeys

A new LifeSaver v1.0.1 a mini update is now available for the LiveSaver fuse that adds a Config:/IO/LifeSaver.fu hotkey file. You can update to the revised version of the fuse by opening Reactor, selecting the LifeSaver Atom in the "Tools > IO" category, and then clicking the "Update" button.

To use the new .fu based Hotkeys entries you need to select the LifeSaver node in the flow view. Then you can:

Press the Alt+Up Cursor (Win/Linux) or Option+Up Cursor (macOS) hotkey to increment the selected LifeSaver Node version.

Press Alt+Down Cursor (Win/Linux) or Option+Down Cursor (macOS) hotkey to de-increment the selected LifeSaver Node version.
You do not have the required permissions to view the files attached to this post.

User avatar
SirEdric
Fusionista
Posts: 955
Joined: Tue Aug 05, 2014 10:04 am
Been thanked: 70 times
Contact:

Re: LifeSaver Fuse

#8

Post by SirEdric » Sun Jul 15, 2018 9:19 pm

Wow. Really cool awesome stuff once again!
Now here's for even more bonus points...:-)
When changing the version#, an info box could say something like "Danger! Version already exists" or "Version available"...:-)

Andrew
Posts: 44
Joined: Mon Mar 19, 2018 12:50 pm
Location: Los Angeles
Been thanked: 2 times

Re: LifeSaver Fuse

#9

Post by Andrew » Mon Jul 16, 2018 12:34 am

Nice work! My only suggestion would be to finish it a week earlier so I can use it on the crazy job I delivered last Friday :-P

Andrew
Posts: 44
Joined: Mon Mar 19, 2018 12:50 pm
Location: Los Angeles
Been thanked: 2 times

Re: LifeSaver Fuse

#10

Post by Andrew » Tue Jul 17, 2018 1:10 pm

Is it possible to write separate files for each input? It would be extremely handy just to have naming/versioning for multiple renders in a central place. If not, it could be an idea for a new fuse.

User avatar
SecondMan
Site Admin
Posts: 2591
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 92 times
Contact:

Re: LifeSaver Fuse

#11

Post by SecondMan » Tue Jul 17, 2018 1:24 pm

Andrew wrote:
Tue Jul 17, 2018 1:10 pm
Is it possible to write separate files for each input? It would be extremely handy just to have naming/versioning for multiple renders in a central place. If not, it could be an idea for a new fuse.

Why a new Fuse?

AndrewHazelden wrote:
Fri Jul 13, 2018 3:01 pm
In the future, it is (theoretically) possible to use the fuse based Clip() function to write out each of the individual flat image channels to disk using other image formats if that was a popular and frequently requested feature.