Jump to: Board index » General » Fusion

Houdini to Fusion..Fog?

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

Steve Mutch

  • Posts: 2
  • Joined: Sun Aug 21, 2016 11:52 am

Houdini to Fusion..Fog?

PostSun Aug 21, 2016 12:21 pm

Hi, I am a total novice when it comes to compositing and I recently picked up the free version of fusion to try and absolutely loving it, great app.

Would one of you be able to help with what is no doubt a easy problem for many....my mystical reversed fog.

I created a simple single frame in Houdini and rendered it out as an exr with zdepth information.

Using the deep pixel "depth blur" node everything works as expected, but using the fog node the fog appears reversed.

I have attached the .exr I'm using and my bizarre reversed fog :)

Any help or explanation of the correct workflow would be very much appreciated.

Thanks.

Fog-Reversed.PNG
Fog-Reversed.PNG (176.38 KiB) Viewed 2460 times


DoF-Test.mantra1.zip
(745.65 KiB) Downloaded 156 times
Offline

Ryan Bloomer

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

Re: Houdini to Fusion..Fog?

PostMon Aug 22, 2016 6:32 pm

Hopefully someone else can elaborate on Z depth in EXR files. I've always copied the Z channel to RGB and used it that way. Hopefully this can get you started.

Code: Select all
{
   Tools = ordered() {
      Fog1 = Fog {
         CtrlWZoom = false,
         Inputs = {
            ZNearPlane = Input { Value = 171.428571428571, },
            ZFarPlane = Input { Value = -14.4927536231884, },
            ZScale = Input { Value = 0.1, },
            FogOpacity = Input { Value = 0.9761905, },
            Input = Input {
               SourceOp = "ChannelBooleans1",
               Source = "Output",
            },
            Fog = Input {
               SourceOp = "Loader1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 964, 241, }, },
      },
      ChannelBooleans1 = ChannelBoolean {
         Inputs = {
            ToRed = Input { Value = 18, },
            ToGreen = Input { Value = 18, },
            ToBlue = Input { Value = 18, },
            ToAlpha = Input { Value = 8, },
            EnableExtraChannels = Input { Value = 1, },
            ToZBuffer = Input { Value = 0, },
            Background = Input {
               SourceOp = "Loader1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 571, 307, }, },
      },
      Loader1 = Loader {
         Clips = {
            Clip {
               ID = "Clip1",
               Filename = "C:\\Users\\Owner\\Desktop\\DoF-Test.mantra1.exr",
               FormatID = "OpenEXRFormat",
               StartFrame = 1,
               LengthSetManually = true,
               TrimIn = 0,
               TrimOut = 0,
               ExtendFirst = 0,
               ExtendLast = 0,
               Loop = 0,
               AspectMode = 0,
               Depth = 0,
               TimeCode = 0,
               GlobalStart = 0,
               GlobalEnd = 0,
            },
         },
         Inputs = {
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            ["Clip1.OpenEXRFormat.Channels"] = Input { Value = 1, },
            ["Clip1.OpenEXRFormat.RedName"] = Input { Value = FuID { "R", }, },
            ["Clip1.OpenEXRFormat.GreenName"] = Input { Value = FuID { "G", }, },
            ["Clip1.OpenEXRFormat.BlueName"] = Input { Value = FuID { "B", }, },
            ["Clip1.OpenEXRFormat.AlphaName"] = Input { Value = FuID { "A", }, },
            ["Clip1.OpenEXRFormat.ZName"] = Input { Value = FuID { "Z", }, },
         },
         ViewInfo = OperatorInfo { Pos = { 476, 134, }, },
      },
      Loader1_1 = Loader {
         Clips = {
            Clip {
               ID = "Clip1",
               Filename = "C:\\Users\\Owner\\Desktop\\DoF-Test.mantra1.exr",
               FormatID = "OpenEXRFormat",
               StartFrame = 1,
               LengthSetManually = true,
               TrimIn = 0,
               TrimOut = 0,
               ExtendFirst = 0,
               ExtendLast = 0,
               Loop = 0,
               AspectMode = 0,
               Depth = 0,
               TimeCode = 0,
               GlobalStart = 0,
               GlobalEnd = 0,
            },
         },
         Inputs = {
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            ["Clip1.OpenEXRFormat.Channels"] = Input { Value = 1, },
            ["Clip1.OpenEXRFormat.RedName"] = Input { Value = FuID { "R", }, },
            ["Clip1.OpenEXRFormat.GreenName"] = Input { Value = FuID { "G", }, },
            ["Clip1.OpenEXRFormat.BlueName"] = Input { Value = FuID { "B", }, },
            ["Clip1.OpenEXRFormat.AlphaName"] = Input { Value = FuID { "A", }, },
            ["Clip1.OpenEXRFormat.ZName"] = Input { Value = FuID { "Z", }, },
         },
         ViewInfo = OperatorInfo { Pos = { 359, 317, }, },
      },
   },
}
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: Houdini to Fusion..Fog?

PostMon Aug 22, 2016 7:02 pm

fusion expects the z depth to be negative not normalized (range from 0 to -inf)

you would need to multiply your Z depth with -1 and then the fog tool works as expected

or you can surely wire something in houdini to render in the way fusion expects the Z depth
Offline

Ryan Bloomer

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

Re: Houdini to Fusion..Fog?

PostTue Aug 23, 2016 9:23 pm

Thanks for the clarification Michael, I couldn't remember the exact reasoning why most default applications render Z depth that needs to be inverted in Fusion.

Stephanein Boulet wrote:If you add a ChannelBoolean node, you can select "Negative" as the operation. That should invert RGBA. You can also enable extra channels to do the Z.


I had gotten this response for pretty much the same question you had Steve, and if I remember correctly, it's why I embedded the z channel into RGB values.
Offline
User avatar

Chad Capeland

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

Re: Houdini to Fusion..Fog?

PostTue Aug 23, 2016 9:45 pm

The way Fusion is doing it is faster. The other applications likely have to either invert themselves or are using a method to generate the values that is slower. Practically, there isn't much difference, but there's no reason to make something slower if you don't have to.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Steve Mutch

  • Posts: 2
  • Joined: Sun Aug 21, 2016 11:52 am

Re: Houdini to Fusion..Fog?

PostThu Aug 25, 2016 6:00 pm

Thanks all for the help.

The negating of the Z channel worked great, I simply had no idea how it was achieved in Fusion.

"channel boolean" ... with a name like that its no wonder I couldn't find it, curse my limited knowledge.

Ryan the cut and paste code into the app, haven't seen that before but was extremely helpful...wondered what I was supposed to do with it at first :)

Thanks again.

Return to Fusion

Who is online

Users browsing this forum: No registered users and 42 guests