Page 1 of 1

Zdepth for basic distance fog

PostPosted: Wed Jul 01, 2015 3:13 pm
by Steve Iskenderian
Sorry for the noob question, but I searched and tried how to make a simple distance fog over a beauty pass in fusion using a zdepth pass, without success.
In photoshop it is very straightforward, you just put the zdepth pass on top of the beauty pass in screen mode and voila.
Thank you for helping.

Re: Zdepth for basic distance fog

PostPosted: Wed Jul 01, 2015 3:23 pm
by Chad Capeland
There's a Fog tool under Deep Pixel.

Code: Select all
{Tools = ordered() {Fog1 = Fog {},},}

Re: Zdepth for basic distance fog

PostPosted: Wed Jul 01, 2015 3:31 pm
by Steve Iskenderian
Thank you : )
I did see this tool but I couldn't make it work, I don't remember why.
May I ask you how do I use the line of code you posted (thank you for it btw :)

Re: Zdepth for basic distance fog

PostPosted: Wed Jul 01, 2015 3:47 pm
by Ryan Bloomer
Hey Steve,

Just copy the line of code in the post and paste it into Fusion. I set up a simple scene for you if you're new to setting these up.

Code: Select all
{
   Tools = ordered() {
      Note2 = Note {
         Inputs = {
            Comments = Input { Value = "DepthPass Render\r\n\r\nDepending on values check the \"Z Near Plane\" and Z Far Plane in the \"Fog1\" tool to start influencing fog into the comp\r\n", },
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 894.264, 32.7252, },
            Flags = {
               Expanded = true,
            },
            Size = { 196, 68.966, },
         },
      },
      Loader2 = Loader {
         Clips = {
            Clip {
               ID = "Clip1",
               Filename = "V:\\_3D render\\Acuity_EP8\\MaruContsturction_RB_1\\MaruConstruction_BackgroundBeauty_v3_IMGseq\\MaruConstruction_v1_Depth_v1_0000.tif",
               FormatID = "TiffFormat",
               LengthSetManually = true,
               TrimIn = 0,
               TrimOut = 0,
               ExtendFirst = 0,
               ExtendLast = 0,
               Loop = 0,
               AspectMode = 0,
               Depth = 0,
               TimeCode = 0,
               GlobalStart = 0,
               GlobalEnd = 0,
            },
         },
         CtrlWZoom = false,
         Inputs = {
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
         },
         ViewInfo = OperatorInfo { Pos = { 987.39, 80.5707, }, },
      },
      Fog1 = Fog {
         Inputs = {
            ZNearPlane = Input { Value = 85.7142857142857, },
            ZFarPlane = Input { Value = -14.4927536231884, },
            ZScale = Input { Value = 8.35, },
            FogOpacity = Input { Value = 0.2809524, },
            Input = Input {
               SourceOp = "Loader1",
               Source = "Output",
            },
            Fog = Input {
               SourceOp = "Loader2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1016.15, 221.817, }, },
      },
      Note1 = Note {
         Inputs = {
            Comments = Input { Value = "Beauty Pass - Replace this loader with your footage\r\n\r\n", },
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 609.38, 87.7772, },
            Flags = {
               Expanded = true,
            },
            Size = { 196, 113.116, },
         },
      },
      Loader1 = Loader {
         Clips = {
            Clip {
               ID = "Clip1",
               Filename = "V:\\_3D render\\Acuity_EP8\\MaruContsturction_RB_1\\MaruConstruction_BackgroundBeauty_v3_IMGseq\\MaruConstruction_v1_BackgroundBeauty_v4_0000_0000.tif",
               FormatID = "TiffFormat",
               LengthSetManually = true,
               TrimIn = 0,
               TrimOut = 0,
               ExtendFirst = 0,
               ExtendLast = 0,
               Loop = 1,
               AspectMode = 0,
               Depth = 0,
               TimeCode = 0,
               GlobalStart = 0,
               GlobalEnd = 0,
            },
         },
         Inputs = {
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
         },
         ViewInfo = OperatorInfo { Pos = { 647.24, 123.107, }, },
      },
   },
}


Good luck.

Re: Zdepth for basic distance fog

PostPosted: Wed Jul 01, 2015 4:01 pm
by Steve Iskenderian
Thank you very much ! : ))

Re: Zdepth for basic distance fog

PostPosted: Wed Jul 01, 2015 8:31 pm
by michael vorberg
other options:

use a merge to put your Zdepth pass over your beauty (use the "apply mode" screen or "normal" with the alpha gain set to 0)

or you could use the zPass as mask in a grading node (colorcorrect or brightness/contrast)

Re: Zdepth for basic distance fog

PostPosted: Wed Jul 01, 2015 8:44 pm
by Steve Iskenderian
Well, I tried to do a merge as you described with screen mode (like I would have done in ps), but it didn't work. Maybe it was the gain option that I wasn't aware of.
Thank you for your reply.