Page 1 of 1

Dissolve 3D

PostPosted: Tue Apr 25, 2017 9:09 pm
by Yannick Tholomier
Hello!
I hope this is a simple question, and i hope sombody can help me a bit :)

In 2D, there blend in any merge and dissolve tool.
How to do that in with 3D Tool?
Thank you

Re: Dissolve 3D

PostPosted: Wed Apr 26, 2017 7:30 am
by michael vorberg
You could control the opacity of the material of the 3d object

But more information what you want to achieve can help to answer the questions

Re: Dissolve 3D

PostPosted: Wed Apr 26, 2017 8:43 pm
by Yannick Tholomier
Thank you!
I have 2 imagePlane3D.
One received a low resolution bipmap image.
The other received a high resolution bipmap image.
I wan't to fade from one to the other depending of the camera proximity.
:)

Re: Dissolve 3D

PostPosted: Wed Apr 26, 2017 10:13 pm
by Chad Capeland
The material will have an opacity slider, you can just use that.

Re: Dissolve 3D

PostPosted: Thu Apr 27, 2017 1:29 pm
by Sander de Regt
Why would you want to do this btw? To save on memory usage? Or is there an artistic reason to do this?
Fusion will deal with hi-res images as easily as lo-res ones.

Re: Dissolve 3D

PostPosted: Thu Apr 27, 2017 5:13 pm
by michael vorberg
Yannick Tholomier wrote:Thank you!
I have 2 imagePlane3D.
One received a low resolution bipmap image.
The other received a high resolution bipmap image.
I wan't to fade from one to the other depending of the camera proximity.
:)


in that case i would dissolve the images before they get onto the card and use only one card

Re: Dissolve 3D

PostPosted: Thu Apr 27, 2017 9:27 pm
by Chad Capeland
Yannick Tholomier wrote:Thank you!
I have 2 imagePlane3D.
One received a low resolution bipmap image.
The other received a high resolution bipmap image.
I wan't to fade from one to the other depending of the camera proximity.
:)


You can generate MIP maps using Texture2D.

Re: Dissolve 3D

PostPosted: Thu Apr 27, 2017 9:41 pm
by michael vorberg
Chad Capeland wrote:
Yannick Tholomier wrote:Thank you!
I have 2 imagePlane3D.
One received a low resolution bipmap image.
The other received a high resolution bipmap image.
I wan't to fade from one to the other depending of the camera proximity.
:)


You can generate MIP maps using Texture2D.


chad i love your great wisdom of all things fusion, but dont assume that everyone has the same knowledge. some times your answers leaves most user with a :?:
could you please eloborate how and not just "node xy can do it"?
i think that is more helpful to anyone and people can learn from your incredible deep knowledge of fusion

Re: Dissolve 3D

PostPosted: Fri Apr 28, 2017 2:40 pm
by Chad Capeland
Sorry. If you set the Texture2D.FilterMode.GL.HiQ to Trilinear or Anisotropic, Fusion will make MIP maps for your input. It takes a tiny bit longer to upload the texture, but it's roughly the same speed to render.
Trilinear textures will evaluate the screenspace partial derivative of the UV coordinates and sample between MIP levels based on that. If your fragment is far away, small, whatever, it will use the lower resolution texture. If it's close, large, whatever, it will use the higher resolution texture. It blends between them smoothly (which is where the trilinear part comes in). Anisotropic is the similar, it just makes the MIP maps where instead of uniformly scaling the texture down, it does it in X and Y separately. Then it evaluates the partial derivative in separate components, so if your texture is small in U but large in V, you'd sample from a MIP level where the X is scaled down more than the Y. If you're just moving a facing image plane towards and away from the camera, trilinear is fine. If you have things receding into the distance, like a floor or something, then you'd want to use anisotropic filtering.

Re: Dissolve 3D

PostPosted: Fri Apr 28, 2017 5:45 pm
by Sander de Regt
You're doing this on purpose aren't you? :-)

Re: Dissolve 3D

PostPosted: Fri Apr 28, 2017 7:25 pm
by Chad Capeland
Check this example:

Code: Select all
{
   Tools = ordered() {
      ChannelBoolean1_1 = MtlChanBool {
         Inputs = {
            OperationR = Input { Value = 6, },
            OperandBR = Input { Value = 3, },
            OperationG = Input { Value = 6, },
            OperandBG = Input { Value = 3, },
            OperationB = Input { Value = 6, },
            OperandBB = Input { Value = 3, },
            OperationA = Input { Value = 1, },
            BackgroundMaterial = Input {
               SourceOp = "Texture2D1_1",
               Source = "MaterialOutput",
            },
            ForegroundMaterial = Input {
               SourceOp = "Transform1_1",
               Source = "Output",
            },
            MaterialID = Input { Value = 5, },
         },
         ViewInfo = OperatorInfo { Pos = { 1375, 313.5 } },
      },
      Transform1_1_1 = Transform {
         Inputs = {
            Center = Input { Value = { 0.7, 0.5 }, },
            Input = Input {
               SourceOp = "Transform1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1485, 280.5 } },
      },
      Rectangle1 = RectangleMask {
         Inputs = {
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input { Value = { 0.1, 0.5 }, },
            Width = Input { Value = 0.2, },
            Height = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 990, 247.5 } },
      },
      BrightnessContrast1 = BrightnessContrast {
         Inputs = {
            Gain = Input { Value = 0.998, },
            Input = Input {
               SourceOp = "MatteControl1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 880, 181.5 } },
      },
      Texture2D1 = Texture2DOperator {
         CtrlWZoom = false,
         Inputs = {
            Input = Input {
               SourceOp = "BrightnessContrast1_1",
               Source = "Output",
            },
            ["FilterMode.Nest"] = Input { Value = 1, },
            ["FilterMode.GL.LowQ"] = Input {
               Value = FuID { "Nearest" },
               Expression = "FilterMode.GL.HiQ",
            },
            ["FilterMode.GL.HiQ"] = Input { Value = FuID { "Nearest" }, },
            MaterialID = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 214.5 } },
      },
      ChannelBoolean1_1_1 = MtlChanBool {
         Inputs = {
            OperationR = Input { Value = 6, },
            OperandBR = Input { Value = 3, },
            OperationG = Input { Value = 6, },
            OperandBG = Input { Value = 3, },
            OperationB = Input { Value = 6, },
            OperandBB = Input { Value = 3, },
            OperationA = Input { Value = 1, },
            BackgroundMaterial = Input {
               SourceOp = "Texture2D1_1_1",
               Source = "MaterialOutput",
            },
            ForegroundMaterial = Input {
               SourceOp = "Transform1_1_1",
               Source = "Output",
            },
            MaterialID = Input { Value = 5, },
         },
         ViewInfo = OperatorInfo { Pos = { 1540, 313.5 } },
      },
      MaterialMerge1_1_1_1 = MtlMerge3D {
         Inputs = {
            BackgroundMaterial = Input {
               SourceOp = "ChannelBoolean1_2",
               Source = "MaterialOutput",
            },
            ForegroundMaterial = Input {
               SourceOp = "ChannelBoolean1",
               Source = "MaterialOutput",
            },
            MaterialID = Input { Value = 6, },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 379.5 } },
      },
      ChannelBoolean1_1_2 = MtlChanBool {
         Inputs = {
            OperationR = Input { Value = 6, },
            OperandBR = Input { Value = 3, },
            OperationG = Input { Value = 6, },
            OperandBG = Input { Value = 3, },
            OperationB = Input { Value = 6, },
            OperandBB = Input { Value = 3, },
            OperationA = Input { Value = 1, },
            BackgroundMaterial = Input {
               SourceOp = "Texture2D1_1_2",
               Source = "MaterialOutput",
            },
            ForegroundMaterial = Input {
               SourceOp = "Transform1_1_2",
               Source = "Output",
            },
            MaterialID = Input { Value = 5, },
         },
         ViewInfo = OperatorInfo { Pos = { 1705, 313.5 } },
      },
      MaterialMerge1 = MtlMerge3D {
         Inputs = {
            BackgroundMaterial = Input {
               SourceOp = "MaterialMerge1_1",
               Source = "MaterialOutput",
            },
            ForegroundMaterial = Input {
               SourceOp = "ChannelBoolean1_1_2",
               Source = "MaterialOutput",
            },
            MaterialID = Input { Value = 6, },
         },
         ViewInfo = OperatorInfo { Pos = { 1705, 379.5 } },
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.313199105145414, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 2.40867199760902, },
            AoV = Input { Value = 19.2642683071402, },
            ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" }, },
            FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" }, },
            ApertureW = Input { Value = 0.831496062992126, },
            ApertureH = Input { Value = 0.467716535433071, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
         },
         ViewInfo = OperatorInfo { Pos = { 2035, 544.5 } },
      },
      Renderer3D1 = Renderer3D {
         Inputs = {
            Width = Input { Value = 3840, },
            Height = Input { Value = 2160, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D2",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererOpenGL.SSRateX"] = Input { Value = 1, },
            ["RendererOpenGL.Texturing"] = Input { Value = 1, },
            ["RendererOpenGL.TextureDepth"] = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 2255, 412.5 } },
      },
      ChannelBoolean1 = MtlChanBool {
         Inputs = {
            OperationR = Input { Value = 6, },
            OperandBR = Input { Value = 3, },
            OperationG = Input { Value = 6, },
            OperandBG = Input { Value = 3, },
            OperationB = Input { Value = 6, },
            OperandBB = Input { Value = 3, },
            OperationA = Input { Value = 1, },
            BackgroundMaterial = Input {
               SourceOp = "Texture2D1",
               Source = "MaterialOutput",
            },
            ForegroundMaterial = Input {
               SourceOp = "Transform1",
               Source = "Output",
            },
            MaterialID = Input { Value = 5, },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 313.5 } },
      },
      Transform3D1_1 = Transform3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "ImagePlane3D1",
               Source = "Output",
            },
            ["Transform3DOp.Translate.X"] = Input { Value = 3.026097572656, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.9887896, },
            ["Transform3DOp.Translate.Z"] = Input { Value = -13.7383237770863, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -86.0281691, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = -9.6338028, },
            ["Transform3DOp.ScaleLock"] = Input { Value = 0, },
            ["Transform3DOp.Scale.Y"] = Input { Value = 34.1215693023256, },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 346.5 } },
      },
      Transform3D1 = Transform3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "ImagePlane3D1",
               Source = "Output",
            },
            ["Transform3DOp.Translate.X"] = Input { Value = 2.62478974883158, },
            ["Transform3DOp.Translate.Y"] = Input { Value = -1.2709483065318, },
            ["Transform3DOp.Translate.Z"] = Input { Value = -11.289674119395, },
            ["Transform3DOp.Scale.X"] = Input { Value = 0.466023255813953, },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 379.5 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Transform3D1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "ImagePlane3D1",
               Source = "Output",
            },
            SceneInput4 = Input {
               SourceOp = "Transform3D1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 412.5 } },
      },
      ChannelBoolean1_2 = MtlChanBool {
         Inputs = {
            OperationR = Input { Value = 6, },
            OperandBR = Input { Value = 3, },
            OperationG = Input { Value = 6, },
            OperandBG = Input { Value = 3, },
            OperationB = Input { Value = 6, },
            OperandBB = Input { Value = 3, },
            OperationA = Input { Value = 1, },
            BackgroundMaterial = Input {
               SourceOp = "PipeRouter2",
               Source = "Output",
            },
            ForegroundMaterial = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            MaterialID = Input { Value = 5, },
         },
         ViewInfo = OperatorInfo { Pos = { 990, 313.5 } },
      },
      Plasma1 = Plasma {
         Inputs = {
            Width = Input { Value = 512, },
            Height = Input { Value = 512, },
            Depth = Input { Value = 3, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Circle1Type = Input { Value = 2, },
            Circle1Scale = Input { Value = 0.111627906976744, },
            Circle2Scale = Input { Value = 7.4046511627907, },
            Circle3Scale = Input { Value = 7.4046511627907, },
            Circle4Type = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 110, 148.5 } },
      },
      Texture2D1_1_2 = Texture2DOperator {
         Inputs = {
            Input = Input {
               SourceOp = "BrightnessContrast1_4",
               Source = "Output",
            },
            ["FilterMode.Nest"] = Input { Value = 1, },
            ["FilterMode.GL.LowQ"] = Input {
               Value = FuID { "SAT" },
               Expression = "FilterMode.GL.HiQ",
            },
            ["FilterMode.GL.HiQ"] = Input { Value = FuID { "SAT" }, },
            MaterialID = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 1705, 214.5 } },
      },
      Texture2D1_1_1 = Texture2DOperator {
         Inputs = {
            Input = Input {
               SourceOp = "BrightnessContrast1_3",
               Source = "Output",
            },
            ["FilterMode.Nest"] = Input { Value = 1, },
            ["FilterMode.GL.LowQ"] = Input {
               Value = FuID { "Trilinear" },
               Expression = "FilterMode.GL.HiQ",
            },
            ["FilterMode.GL.HiQ"] = Input { Value = FuID { "Trilinear" }, },
            MaterialID = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 1540, 214.5 } },
      },
      Texture2D1_1 = Texture2DOperator {
         Inputs = {
            Input = Input {
               SourceOp = "BrightnessContrast1_2",
               Source = "Output",
            },
            ["FilterMode.Nest"] = Input { Value = 1, },
            ["FilterMode.GL.LowQ"] = Input { Expression = "FilterMode.GL.HiQ", },
            MaterialID = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 1375, 214.5 } },
      },
      BrightnessContrast1_3 = BrightnessContrast {
         Inputs = {
            Gain = Input { Value = 0.998, },
            Input = Input {
               SourceOp = "PipeRouter1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1540, 181.5 } },
      },
      BrightnessContrast1_4 = BrightnessContrast {
         Inputs = {
            Gain = Input { Value = 0.998, },
            Input = Input {
               SourceOp = "PipeRouter1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1705, 181.5 } },
      },
      ReplaceMaterial3D1 = ReplaceMaterial3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            ["ReplaceMode.Nest"] = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "MaterialMerge1",
               Source = "MaterialOutput",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 4, },
         },
         ViewInfo = OperatorInfo { Pos = { 1815, 412.5 } },
      },
      Transform1_1 = Transform {
         Inputs = {
            Center = Input { Value = { 0.7, 0.5 }, },
            Input = Input {
               SourceOp = "Transform1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1320, 280.5 } },
      },
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 512, },
            Height = Input { Value = 512, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
            EffectMask = Input {
               SourceOp = "Rectangle1",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 990, 280.5 } },
      },
      Transform1 = Transform {
         Inputs = {
            Center = Input { Value = { 0.7, 0.5 }, },
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1155, 280.5 } },
      },
      MaterialMerge1_1 = MtlMerge3D {
         Inputs = {
            BackgroundMaterial = Input {
               SourceOp = "MaterialMerge1_1_1",
               Source = "MaterialOutput",
            },
            ForegroundMaterial = Input {
               SourceOp = "ChannelBoolean1_1_1",
               Source = "MaterialOutput",
            },
            MaterialID = Input { Value = 6, },
         },
         ViewInfo = OperatorInfo { Pos = { 1540, 379.5 } },
      },
      BrightnessContrast1_2 = BrightnessContrast {
         Inputs = {
            Gain = Input { Value = 0.998, },
            Input = Input {
               SourceOp = "PipeRouter1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1375, 181.5 } },
      },
      BrightnessContrast1_1 = BrightnessContrast {
         Inputs = {
            Gain = Input { Value = 0.998, },
            Input = Input {
               SourceOp = "PipeRouter1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 181.5 } },
      },
      MaterialMerge1_1_1 = MtlMerge3D {
         Inputs = {
            BackgroundMaterial = Input {
               SourceOp = "MaterialMerge1_1_1_1",
               Source = "MaterialOutput",
            },
            ForegroundMaterial = Input {
               SourceOp = "ChannelBoolean1_1",
               Source = "MaterialOutput",
            },
            MaterialID = Input { Value = 6, },
         },
         ViewInfo = OperatorInfo { Pos = { 1375, 379.5 } },
      },
      Transform1_1_2 = Transform {
         Inputs = {
            Center = Input { Value = { 0.7, 0.5 }, },
            Input = Input {
               SourceOp = "Transform1_1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1650, 280.5 } },
      },
      Merge3D2 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "ReplaceMaterial3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 2035, 412.5 } },
      },
      MatteControl1 = MatteControl {
         Inputs = {
            MatteCombine = Input { Value = 5, },
            Background = Input {
               SourceOp = "Plasma1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 330, 148.5 } },
      },
      ImagePlane3D1 = ImagePlane3D {
         Inputs = {
            ["Transform3DOp.Scale.X"] = Input { Value = 0.768288372093023, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "MatteControl1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 412.5 } },
      },
      PipeRouter2 = PipeRouter {
         CtrlWZoom = false,
         Inputs = {
            Input = Input {
               SourceOp = "BrightnessContrast1",
               Source = "Output",
            },
         },
         ViewInfo = PipeRouterInfo { Pos = { 894.553, 223.915 } },
      },
      PipeRouter1 = PipeRouter {
         Inputs = {
            Input = Input {
               SourceOp = "MatteControl1",
               Source = "Output",
            },
         },
         ViewInfo = PipeRouterInfo { Pos = { 1375, 148.5 } },
      }
   }
}


This is comparing the 4 different filtering modes with the default (which we can determine empirically as Bilinear).

The BC's are there because of a newly discovered bug.

Note that Nearest and Bilinear are almost the same for the small plane. The Trilinear and Anisotropic are also almost the same, but clearly better than Nearest and Bilinear. On the large plane, Nearest and Bilinear look different, but Trilinear and Anisotropic look the same as Bilinear. On the tilted plane, though, you can see how Trilinear is too blurry, while Anisotropic looks good.

Re: Dissolve 3D

PostPosted: Fri Apr 28, 2017 10:12 pm
by Bryan Ray
Very nice! Thanks for that demo; I think I'll keep it on hand.

Uregent!!!!!!! Dissolve 3D

PostPosted: Thu Jun 08, 2017 9:27 am
by Jens Noelte
same question, need help quick please!
Need to fade in a 3d merge connected to another 3d merge. Fade 2dmerge won't work cause reflections need to come from one 3dmerge. Fade opacity on material won't work cause of duplicate tool's time offset downstream. Need to fade 3dmerge after duplicate tool. So once again: how can I fade/dissolve output of 3d merge before 3d renderer? Heeeeeeeeeelp!

Re: Dissolve 3D

PostPosted: Thu Jun 08, 2017 3:43 pm
by Bryan Ray
ReplaceMaterial3D will do what you need. Put it after the Merge3D you want to fade. In the Replace Mode, set all of the color channels to "Keep" but leave Alpha on "Replace." When you adjust the Opacity in the Material tab, you'll be able to fade everything out.

If you have some refractions or transparency going on already, though, you'll need to switch the Alpha's Replace Mode to "Multiply" in order to preserve it.

Re: Dissolve 3D

PostPosted: Thu Jun 08, 2017 4:44 pm
by Jens Noelte
That's it! Thanks Bryan!