In light of the Coronavirus crisis, please help make sure nothing stands in the way of social distancing in the VFX industry.

This petition asks the MPAA to act accordingly:


Sign the petition on Change.org

Be safe, everyone.

Any alternative to hos_SplitEXR?

User avatar
cdordelly
Posts: 17
Joined: Wed Nov 29, 2017 5:18 am

Re: Any alternative to hos_SplitEXR?

#46

Post by cdordelly » Mon Jan 22, 2018 2:14 pm

Thank you for this release! I only get one issue with the v1.11 release.

The script works perfect if I execute it in the default layout of fusion 9 (win) but, if I execute it in my custom layout I'm getting this error message:

...esign\Fusion\Scripts\Comp\hos_SplitEXR_Ultra_v1.11.0.lua:323: attempt to index local 'flow' (a nil value)

I don't know if someone else get the same issue. Maybe I have a weird issue with my layout?

Thanks again fo all!

User avatar
fmuram
Posts: 1
Joined: Tue Jan 16, 2018 10:57 am

Re: Any alternative to hos_SplitEXR?

#47

Post by fmuram » Thu Jan 25, 2018 9:43 am

AndrewHazelden wrote:
Mon Oct 09, 2017 12:07 pm
RBemendo wrote:Default installation of Fusion 9.0.1 -
- placed hos_SplitEXR_fu9.lua in : C:\Users\Owner\AppData\Roaming\Blackmagic Design\Fusion\Scripts\Tool

i'm getting this error in the console
hos_SplitEXR_fu9.lua:114: attempt to index global 'file' (a nil Value)

not sure how to make the script run.
Any thing I'm doing wrong?
Hi RBemendo.

Thanks for letting me know. I will take a look at the issue tonight and report back with a solution.


Hi Andrew,
I am just now trying this script and I have received the same error as RBemendo. Were you able to figure out why this happens? If so can you direct me to a fix.

Thanks,
fmuram

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

Re: Any alternative to hos_SplitEXR?

#48

Post by AndrewHazelden » Thu Jan 25, 2018 9:54 am

fmuram wrote:
Thu Jan 25, 2018 9:43 am
Hi Andrew,
I am just now trying this script and I have received the same error as RBemendo. Were you able to figure out why this happens? If so can you direct me to a fix.
Hi fmuram. Can you double check which version of the script you installed? What version of Fusion are you running, and on what OS platform?

Try using the absolute latest version of hos_SplitEXR_Ultra that is provided by the new WSL Reactor package manger tool in the category "Scripts/Comp".

From my perspective of things, installing and using the updated version of hos_SplitEXR_Ultra as a Comp script, (or as a Lua Comp script that you have also attached to a hotkey binding for convenience and then run simply the script all the time from a hotkey press) is like 10X more satisfying for the artist working with lots of EXR images then the limitations of still using and installing that tool in the classic old tools script section you would have used a year ago.

The reason why I am saying this is: If you go the comp script install approach with this script you can actually automatically split several EXR loader nodes out into their individual channels with hos_SplitEXR_Ultra all at the same time just by selecting all of the initial loader nodes you want to process at once in the Flow area before you run the script. Then presto they all get split. Very handy in my books. :)

As a tool script installed item, doing multiple selections in a flow and running the script from the right click > tools contextual menu will result in multiple separate Lua scripts being launched by Fusion (one script run per node selected) and so you'd have like 5 task blocking AskUser dialogs pop up on screen for the hos_SplitEXR_Ultra script if you did a mult-selection in the flow area of 5 nodes and then ran a Scripts:/Tools/ installed version of "hos_SplitEXR_Ultra". Less cool in my books - but as always people's milage on how they like to use and setup their copy of Fusion varies.

Let me know how it works out for you.

User avatar
nbyte
Posts: 5
Joined: Wed Jun 29, 2016 2:45 am

Re: Any alternative to hos_SplitEXR?

#49

Post by nbyte » Thu Feb 01, 2018 9:15 am

It's a great tool!
Can I ask for some extension?
If possible it would be great to have some kind of button to update the input file. So it would be possible to load another version and it would be updated on all splitted loaders.
A guy made s a python script which can handle this ...
https://www.youtube.com/watch?v=FFiB9TdynMc

Thanks for your great work you are providing to us.

User avatar
Midgardsormr
Fusionator
Posts: 1620
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 11
Location: Los Angeles, CA, USA
Been thanked: 52 times
Contact:

Re: Any alternative to hos_SplitEXR?

#50

Post by Midgardsormr » Thu Feb 01, 2018 9:27 am

A version control script needs to be tailored to the pipeline where it will be used. Not everybody constructs their filenames the same way, making it difficult, if not impossible, to arrive at a reasonably universal solution. I'm sure you can find some help here to develop a script to do what you need, though. In fact, it's one of the projects I was planning for my book, so helping someone through the process would be a terrific benefit to me, as well!

Stand by, I'll open a new thread…

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

Re: Any alternative to hos_SplitEXR?

#51

Post by AndrewHazelden » Thu Feb 01, 2018 9:33 am

Midgardsormr wrote:
Thu Feb 01, 2018 9:27 am
In fact, it's one of the projects I was planning for my book, so helping someone through the process would be a terrific benefit to me, as well!

Stand by, I'll open a new thread…
Midgardsormr, since you have the Fuse writing skills already, a Fusion 9 EXRIO library based "Shuffle.fuse" node would be possible for direct EXR loading and channel re-ordering. IMHO this might have more benefit in the long term. ;)

User avatar
Midgardsormr
Fusionator
Posts: 1620
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 11
Location: Los Angeles, CA, USA
Been thanked: 52 times
Contact:

Re: Any alternative to hos_SplitEXR?

#52

Post by Midgardsormr » Thu Feb 01, 2018 9:35 am

AndrewHazelden wrote:
Thu Feb 01, 2018 9:33 am
Midgardsormr, since you have the Fuse writing skills already, a Fusion 9 EXRIO library based "Shuffle.fuse" node would be possible for direct EXR loading and channel re-ordering. IMHO this might have more benefit in the long term. ;)
Oh dear, that's a rather bigger job! Though I have to admit that I've been toying with the idea of breaking into EXRIO for other reasons… But for now,
viewtopic.php?f=6&t=1854#p13878

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

Re: Any alternative to hos_SplitEXR?

#53

Post by AndrewHazelden » Thu Feb 01, 2018 9:45 am

With a custom EXRLoader / Shuffle node the user could define a naming pattern or pick a present from a list, and then versioning could be natively managed inside the node cleanly and invisibly.

If that doesn't work for your needs then just branch off what was done for SaverPlus, or use the example script by PingKing that was updated after the chat on the Wishlist thread of AV Club Vid's titled "button, menu, or KB shortcut to upversion a Loader or Saver". That gets things 85% done with less reinventing the wheel. :)

User avatar
Midgardsormr
Fusionator
Posts: 1620
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 11
Location: Los Angeles, CA, USA
Been thanked: 52 times
Contact:

Re: Any alternative to hos_SplitEXR?

#54

Post by Midgardsormr » Thu Feb 01, 2018 10:26 am

Shush. I'm trying to create a learning opportunity here, not just solve a problem! And yeah, I'd already planned on stealing the prior art.

User avatar
Midgardsormr
Fusionator
Posts: 1620
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 11
Location: Los Angeles, CA, USA
Been thanked: 52 times
Contact:

Re: Any alternative to hos_SplitEXR?

#55

Post by Midgardsormr » Sat Feb 03, 2018 3:43 pm

AndrewHazelden wrote:
Thu Feb 01, 2018 9:33 am
Midgardsormr, since you have the Fuse writing skills already, a Fusion 9 EXRIO library based "Shuffle.fuse" node would be possible for direct EXR loading and channel re-ordering. IMHO this might have more benefit in the long term. ;)
Do you happen to have any links to documentation or resources for the EXRIO library? I don't know when or if I'll have time to dig into it, but it would be great to have it on hand if I suddenly get the urge.

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

Re: Any alternative to hos_SplitEXR?

#56

Post by AndrewHazelden » Sat Feb 03, 2018 3:47 pm

Midgardsormr wrote:
Sat Feb 03, 2018 3:43 pm
Do you happen to have any links to documentation or resources for the EXRIO library? I don't know when or if I'll have time to dig into it, but it would be great to have it on hand if I suddenly get the urge.
cryptomatte.fuse

Check out Cedric's and Kristof's work on the latest Cryptomatte v1.2 release to see EXRIO in action. This EXRIO based approach allows the Cryptomatte fuse to read the image data directly and avoids the previous workflow of having to pre-split the EXR image channels in multiple loader nodes beforehand. Also EXRIO allows you to skip the "old school" process of having to re-order the channel data in the Loader nodes channels in advance since you can do all of those operations now right inside of your own fuse.

There is a Reactor installation compatible version of Cryptomatte v1.2.x that is accessible in the Reactor GitLab repository if you want something to skim over. WSL's newest member, Greg Bovine @ StatixVFX, helped to do a quick fix patch to the Reactor distributed Cryptomatte version to make "LuaModules:/" based install paths like "Reactor:/Deploy/Modules/Lua/" possible from a fuse in Fusion 9.0.2+. Thanks Greg!

External Matte Saver.fuse

Also look at Fusion 9's built-in "External Matte Saver.fuse" file that is on your hard disk at:

Code: Select all

 C:/Program Files/Blackmagic Design/Fusion 9/Fuses/Blackmagic/External Matte Saver.fuser
External Matte Saver is the only example that BMD has officially published on the EXRIO library topic:
Code: [Select all] [Expand/Collapse] [Download] (External Matte Saver.fuse)
  1. FuRegisterClass("ExternalMatteSaver", CT_SinkTool, {
  2.     REGS_Name             = "External Matte Saver",
  3.     REGS_Category         = "Resolve Connect",
  4.     REGS_OpIconString     = "EMS",
  5.     REG_Fuse_NoEdit       = true,
  6.     REG_Fuse_NoReload     = true,
  7.     REG_TimeVariant       = true,
  8.     REG_SupportsDoD       = true,
  9.     REG_OpNoMask          = true,
  10.     })
  11.  
  12. function AddMatte(i)
  13.     MaxMatte = math.max(MaxMatte, i)
  14.  
  15.     Mattes[i] = {}
  16.  
  17.     local istr = tostring(i)
  18.  
  19.     local matte = Mattes[i]
  20.  
  21.     self:AddControlPage("Mattes")
  22.  
  23.     matte.InType = self:AddInput("Type " .. istr, "MatteType" .. istr, {
  24.         LINKID_AddBeforeID = "AddMatte",
  25.         LINKID_DataType = "FuID",
  26.         INPID_InputControl = "ComboIDControl",
  27.         INP_DoNotifyChanged = true,
  28.         INP_External = false,
  29.         ICS_Name = "",
  30.         ICD_Width = 0.225,
  31.         INPID_DefaultID = "A",
  32.         { CCS_AddString = "---", CCID_AddID = "None" },
  33.         { CCS_AddString = "A", CCID_AddID = "A" },
  34.         { CCS_AddString = "RGB", CCID_AddID = "RGB" },
  35.         { CCS_AddString = "RGBA", CCID_AddID = "RGBA" },
  36.         LINK_ForceSave = true,
  37.         })
  38.  
  39.     matte.InName = self:AddInput("Name " .. istr, "Name" .. istr, {
  40.         LINKID_AddBeforeID = "AddMatte",
  41.         LINKID_DataType = "Text",
  42.         INPID_InputControl = "TextEditControl",
  43.         INPS_DefaultText = "matte_" .. istr,
  44.         ICS_Name = "",
  45.         ICD_Width = 0.35,
  46.         TEC_Lines = 1,
  47.         })
  48.  
  49.     matte.InImage = self:AddInput("Input " .. istr, "Input" .. istr, {
  50.         LINKID_AddBeforeID = "AddMatte",
  51.         LINKID_DataType = "Image",
  52.         INPID_InputControl = "ImageControl",
  53.         ICS_Name = "  " .. istr,
  54.         ICD_Width = 0.425,
  55.         LINK_Main = i,
  56.         })
  57.  
  58.     matte.InLabel = self:AddInput("", "Label" .. istr, {
  59.         LINKID_AddBeforeID = "AddMatte",
  60.         LINKID_DataType = "Number",
  61.         INPID_InputControl = "LabelControl",
  62.         ICD_Width = 0.425+0.35,
  63.         INP_External = false,
  64.         IC_Visible = false,
  65.         })
  66.  
  67.     self:UpdateControls()
  68. end
  69.  
  70. function Create()
  71.  
  72.     self:RemoveControlPage("Controls")
  73.     self:AddControlPage("File")
  74.  
  75.     InFilename = self:AddInput("Filename", "Filename", {
  76.         LINKID_DataType = "Text",
  77.         INPID_InputControl = "FileControl",
  78.         FC_IsSaver = true,
  79.         FC_ClipBrowse = true,
  80.         FCS_FilterString = "OpenEXR Files (*.exr)|*.exr|",
  81.         })
  82.  
  83.     self:AddControlPage("Mattes")
  84.  
  85.     InAddMatte = self:AddInput("Add Matte", "AddMatte", {
  86.         LINKID_DataType = "Number",
  87.         INPID_InputControl = "ButtonControl",
  88.         INP_DoNotifyChanged = true,
  89.         INP_External = false,
  90.         ICD_Width = 0.225,
  91.         ICS_Name = "+",
  92.         })
  93.  
  94.     InPad = self:AddInput("", "Pad", {
  95.         LINKID_DataType = "Number",
  96.         INPID_InputControl = "LabelControl",
  97.         ICD_Width = 0.425+0.35,
  98.         INP_External = false,
  99.         IC_Visible = true,
  100.         })
  101.  
  102.     OutImage = self:AddOutput("Output", "Output", {
  103.         LINKID_DataType = "Image",
  104.         LINK_Main = 1,
  105.         })
  106.  
  107.     Mattes = {}
  108.     MaxMatte = 0
  109.  
  110.     if self.IsBeingLoaded then
  111.         local inps = self:GetInputIDs()
  112.         local mattes = {}
  113.         for i,v in ipairs(inps) do
  114.             if v:sub(1,9) == "MatteType" then
  115.                 mattes[tonumber(v:sub(10))] = true
  116.             end
  117.         end
  118.         for i,v in pairs(mattes) do
  119.             AddMatte(tonumber(i))
  120.         end
  121.     else
  122.         AddMatte(1)
  123.     end
  124. end
  125.  
  126. function NotifyChanged(inp, param, time)
  127.     if inp == InAddMatte then
  128.         if param.Value > 0.5 then
  129.             AddMatte(MaxMatte+1)
  130.         end
  131.     else
  132.         for i,matte in pairs(Mattes) do
  133.             if inp == matte.InType then
  134.                 local on = (param.Value ~= "None")
  135.  
  136.                 matte.InImage:SetAttrs({ LINK_Visible = on, INP_Disabled = not on, IC_Visible = on, INP_Required = on, })
  137.                 matte.InName:SetAttrs({ INP_Disabled = not on, IC_Visible = on, })
  138.                 matte.InLabel:SetAttrs({ IC_Visible = not on, })
  139.             end
  140.         end
  141.     end
  142. end
  143.  
  144. function Process(req)
  145.     local ok = true
  146.  
  147.     local exr = EXRIO()
  148.  
  149.     if not req:IsPreCalc() and not req:IsInteractive() then
  150.         local filename = InFilename:GetValue(req).Value
  151.  
  152.         filename = self.Comp:MapPath(filename)
  153.  
  154.         exr:WriteOpen(filename, req.Time+1)
  155.  
  156.         local parts = {}
  157.  
  158.         for i,matte in pairs(Mattes) do
  159.             local img = matte.InImage:GetValue(req)
  160.             local name = matte.InName:GetValue(req).Value
  161.             local ctype = matte.InType:GetValue(req).Value
  162.  
  163.             if ctype ~= "None" then
  164.                 local p = exr:Part(name, img.ImageWindow, img.DataWindow, img.XScale/img.YScale)
  165.  
  166.                 if ctype == "A" then
  167.                     exr:Channel(name .. ".A", HALF, img, CHAN_ALPHA)
  168.                 elseif ctype == "RGB" or ctype == "RGBA" then
  169.                     exr:Channel("R", HALF, img, CHAN_RED)
  170.                     exr:Channel("G", HALF, img, CHAN_GREEN)
  171.                     exr:Channel("B", HALF, img, CHAN_BLUE)
  172.  
  173.                     if ctype == "RGBA" then
  174.                         exr:Channel("A", HALF, img, CHAN_ALPHA)
  175.                     end
  176.                 end
  177.  
  178.                 table.insert(parts, p)
  179.             end
  180.         end
  181.  
  182.         if exr:WriteHeader() then
  183.             for i,v in ipairs(parts) do
  184.                 ok = ok and exr:WritePart(v, {  })
  185.             end
  186.         else
  187.             ok = false
  188.         end
  189.  
  190.         exr:Close()
  191.     end
  192.  
  193.     local err = exr:GetLastError()
  194.     if #err > 0 then
  195.         printerr(err)
  196.  
  197.         ok = false
  198.     end
  199.  
  200.     if ok then
  201.         OutImage:Set(req, Mattes[1].InImage:GetValue(req))
  202.     end
  203. end
  204.  
Links to documentation.... Ha! That's a good one @Midgardsormr. Fusion 9 doesn't believe in doing updated SDK or API documentation... ;)

If you do make a new Fusion 9 GUI for auto building comps and use the EXRIO library too, please say no to using the IUP GUI framework on new projects. It just isn't fair to the Mac and Linux Fusion users to make a new tool that is intentionally not cross platform compatible on day 0 of its release. :wip:

User avatar
Dunn
Moderator
Posts: 488
Joined: Mon Aug 04, 2014 4:27 am
Location: Hamburg, Germany
Been thanked: 1 time
Contact:

Re: Any alternative to hos_SplitEXR?

#57

Post by Dunn » Sun Feb 04, 2018 3:28 am

Wow, this fuse does open the new possibilities of fuse UI creation. :o
Finally we know how to remove the Controls tab " self:RemoveControlPage("Controls") "

User avatar
edenexposito
Posts: 29
Joined: Fri Mar 23, 2018 2:36 am

Re: Any alternative to hos_SplitEXR?

#58

Post by edenexposito » Mon Apr 02, 2018 7:11 am

It would be great that a new versión of HOS_splitEXR_ultra have a checkbox to avoid split "crypto_" AOV channels...

User avatar
SecondMan
Site Admin
Posts: 4247
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 16
Location: Vancouver, Canada
Been thanked: 63 times
Contact:

Re: Any alternative to hos_SplitEXR?

#59

Post by SecondMan » Mon Sep 17, 2018 3:46 pm

hos_SplitEXR_Ultra v2.1 release on Reactor

hos_SplitEXR_Ultra_2.1.png

Resolve 15.1's addition of Loader node support in the Fusion page unlocks the potential for multi-channel EXR image splitting via the classic hos_SplitEXR_Ultra script. This makes it dramatically simpler to break apart multi-channel images in Resolve so artists can acess each of the individual elements in their EXR imagery.

The hos_SplitEXR_Ultra v2.1 atom package in Reactor has been updated to support installation in both Fusion Standalone 9.02+ and Resolve 15.1+.

You can use the hos_SplitEXR_Ultra script in Resolve via the Nodes view as a tool script by right clicking on a Loader node, or as a comp script via the "Fusion > Script > hos_SplitEXR_Ultra" menu item.
You do not have the required permissions to view the files attached to this post.

User avatar
bfloch
Fusioneer
Posts: 95
Joined: Wed Aug 06, 2014 4:25 pm
Been thanked: 1 time

Re: Any alternative to hos_SplitEXR?

#60

Post by bfloch » Tue Oct 01, 2019 7:05 am

Fix for blender. Replace line 367:

Code: Select all

			local channel = string.match(channelName, "[.]([^.]+)$")
This essentially makes sure that the channel name splits at the LAST dot.
Sorry I am not yet into rector. Can some one help me out getting the fix in?