Jump to: Board index » General » Fusion

How to deform a plane in 3D triangles

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

Robin Doelly

  • Posts: 64
  • Joined: Mon Mar 28, 2016 10:34 pm

How to deform a plane in 3D triangles

PostTue Apr 25, 2017 10:56 am

Hi there,
I am sure that there is an easier way to achieve what I am trying in Fusion ...

I need to create a 3D plane that is deformed into hard edge interconnecting triangles and then light it ...I have seen this on some Fusion reels and countdowns ..... can anyone give me some pointers on it ?

many thanks
Robin
Offline

Bob Place

  • Posts: 54
  • Joined: Thu Jan 21, 2016 10:13 pm
  • Location: Atlanta, Ga. USA

Re: How to deform a plane in 3D triangles

PostWed Apr 26, 2017 2:48 am

not sure what you are talking about but I would try working with duplicate 3d to do what you want to do.
Bob Place
Offline
User avatar

Bryan Ray

  • Posts: 2478
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: How to deform a plane in 3D triangles

PostWed Apr 26, 2017 9:45 pm

Something like this?

Untitled.png
Untitled.png (752.62 KiB) Viewed 4812 times


Code: Select all
{
   Tools = ordered() {
      FastNoise1 = FastNoise {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            GlobalOut = Input { Value = 2000, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            XScale = Input { Value = 6.46808510638298, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 935, 49.5 } },
      },
      AmbientLight1 = LightAmbient {
         Inputs = {
            Intensity = Input { Value = 0.0135744680851064, },
         },
         ViewInfo = OperatorInfo { Pos = { 1100, 49.5 } },
      },
      Displace3D1 = Displace3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Triangulate3D1",
               Source = "Output",
            },
            Scale = Input { Value = 0.314893617021277, },
            Bias = Input { Value = -1, },
            Input = Input {
               SourceOp = "FastNoise1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 935, 115.5 } },
      },
      SpotLight1 = LightSpot {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 1.53284475569876, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.706730805669036, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 1.77192086926302, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -28.7323944, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 33.8028169, },
            PenumbraAngle = Input { Value = 13.6170212765957, },
            ["ShadowLightInputs3D.Nest"] = Input { Value = 1, },
            ["ShadowLightInputs3D.ShadowMapSize"] = Input { Value = 3439, },
            ["ShadowLightInputs3D.ShadowMapProxy"] = Input { Value = 0.586976744186047, },
            ["ShadowLightInputs3D.SoftnessType"] = Input { Value = FuID { "Variable" }, },
            ["ShadowLightInputs3D.ConstantSoftness"] = Input { Value = 0.0586046511627907, },
            ["ShadowLightInputs3D.Spread"] = Input { Value = 2.88372093023256, },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 49.5 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "ReplaceNormals3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "SpotLight1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
            SceneInput4 = Input {
               SourceOp = "AmbientLight1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 115.5 } },
      },
      Triangulate3D1 = Triangulate3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 770, 115.5 } },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            ["Transform3DOp.Rotate.X"] = Input { Value = -59.1549296, },
            ["MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.552131558641975, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.SubdivisionWidth"] = Input { Value = 16, },
            ["SurfacePlaneInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfacePlaneInputs.Visibility.CullBackFace"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 660, 115.5 } },
      },
      ReplaceNormals3D1 = ReplaceNormals3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Displace3D1",
               Source = "Output",
            },
            ["Normals.SmoothingAngle"] = Input { Value = 0, },
            ["Tangents.Recompute"] = Input { Value = 0, },
            ["Tangents.SmoothingAngle"] = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1100, 115.5 } },
      },
      Renderer3D1 = Renderer3D {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            GlobalOut = Input { Value = 2000, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.LightingEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.ShadowsEnabled"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1375, 148.5 } },
      },
      Renderer3D2 = Renderer3D {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            GlobalOut = Input { Value = 2000, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererOpenGL.Supersampling"] = Input { Value = 1, },
            ["RendererOpenGL.ShadingModel"] = Input { Value = 0, },
            ["RendererOpenGL.Wireframe"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1375, 82.5 } },
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.Z"] = Input { Value = 2.18096234926164, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -5.0704226, },
            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 = { 1100, 181.5 } },
      },
      ErodeDilate1 = ErodeDilate {
         Inputs = {
            XAmount = Input { Value = 0.000468085106382979, },
            Input = Input {
               SourceOp = "Renderer3D2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1485, 82.5 } },
      },
      Background1 = Background {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            GlobalOut = Input { Value = 2000, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftGreen = Input { Value = 0.161957168352171, },
            TopLeftBlue = Input { Value = 0.544356038072576, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
            EffectMask = Input {
               SourceOp = "ErodeDilate1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1595, 82.5 } },
      },
      Merge1 = Merge {
         Inputs = {
            Blend = Input { Value = 0.587234042553191, },
            Background = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1595, 148.5 } },
      },
      Blur1 = Blur {
         CtrlWZoom = false,
         Inputs = {
            XBlurSize = Input { Value = 5.1063829787234, },
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1705, 115.5 } },
      },
      Merge2 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Blur1",
               Source = "Output",
            },
            Gain = Input { Value = 0, },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1705, 148.5 } },
      }
   }
}
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Robin Doelly

  • Posts: 64
  • Joined: Mon Mar 28, 2016 10:34 pm

Re: How to deform a plane in 3D triangles

PostThu Apr 27, 2017 1:34 am

oh my ! Bryan
you are a source of great knowledge .. very very good and exactly what I was asking. :D

I have a couple of questions if you have the time

1.) just out of interest whilst I was exploring a different way of actually taking in triangles into image planes and joining them up doing a little maths to make things fit I found that it seems impossible to join two planes together ... Fusion always has a slight gap where the planes meet .. I was thinking weld might fix the issue but no ... is this a limitation from Fusion?

2.) using your displace method ... which is just the look... if I want certain colours on individual triangle tiles ... I'm guessing that I will just have to draw mattes in the input plane and tweak them to fit to make a patchwork of colours that will follow the distortion.

3.) Going back to point 1 ... if they want a fairly specific model with less planes that your demo but to match some existing flat artwork ... I guess the best plan is to just experiment drawing shapes instead of the noise to try and copy their artwork?

... but basically brilliant and now I understand much more on the 3D. A shame that you can't have depth of field on the software render but maybe I can fake a little in.

thank you
Offline
User avatar

Bryan Ray

  • Posts: 2478
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: How to deform a plane in 3D triangles

PostThu Apr 27, 2017 10:08 pm

1.) If the edges are in the exact same spot, the render shouldn't have a gap. Make sure the HiQ button is on. If you still have a gap, perhaps a very small dilate could fill it. There is no way to weld vertices or otherwise combine two 3d objects into one, as far as I know. You couldn't smooth the normals across two distinct planes, for instance.

2.) You can texture the plane prior to displacement, but I am not sure if you could "automagically" assign color by facet. At least, not with built-in tools. The plane's subdivision and tessellation is regular, though, so you could certainly create a grid and use that as a guide to create your texture.

3.) It depends on exactly what you need and the nature of the artwork. You could do a sort of quick depth painting process—roto outlines, blur the roto, mask by the unblurred shape, then a Brightness/Contrast to get the luminance at the edges to match. Then use that depth map in the Displace3D.

For the depth-of-field issue, you could render your soft shadows in a separate software renderer. Use a Replace Material node to turn off Receives Lighting but leave Receives Shadows on. That will give you a white render with shadows. Then your main and wireframe renderers could be OpenGL with DoF and also output a Z buffer for use in a DepthBlur of the shadows. Or if you don't need soft shadows you could just do it all in OpenGL.

There may be a bug in the version of Fusion I'm using—I can't seem to get either Position or Z buffers from my renderer. But here's the set-up anyway:

Code: Select all
{
   Tools = ordered() {
      FastNoise1 = FastNoise {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            GlobalOut = Input { Value = 2000, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            XScale = Input { Value = 6.46808510638298, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 280.5 } },
      },
      AmbientLight1 = LightAmbient {
         Inputs = {
            Intensity = Input { Value = 0.0135744680851064, },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 280.5 } },
      },
      Shape3D2 = Shape3D {
         CtrlWZoom = false,
         Inputs = {
            ["Transform3DOp.Translate.Z"] = Input { Value = -10, },
            ["Transform3DOp.Scale.X"] = Input { Value = 5, },
            ["MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0, },
            ["MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0, },
            ["MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0, },
            ["MtlStdInputs.ReceivesLighting"] = Input { Value = 0, },
            ["MtlStdInputs.ReceivesShadows"] = Input { Value = 0, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ["SurfacePlaneInputs.Width"] = Input { Value = 3.48936170212766, },
            ["SurfacePlaneInputs.Lighting.Nest"] = Input { Value = 1, },
            ["SurfacePlaneInputs.Lighting.IsAffectedByLights"] = Input { Value = 0, },
            ["SurfacePlaneInputs.Matte.Nest"] = Input { Value = 1, },
            ["SurfacePlaneInputs.Matte.IsMatte"] = Input { Value = 1, },
            ["SurfacePlaneInputs.Matte.OpaqueAlpha"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.Nest"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, }
         },
         ViewInfo = OperatorInfo { Pos = { 825, 214.5 } },
      },
      SpotLight1 = LightSpot {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 1.53284475569876, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.706730805669036, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 1.77192086926302, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -28.7323944, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 33.8028169, },
            PenumbraAngle = Input { Value = 13.6170212765957, },
            ["ShadowLightInputs3D.Nest"] = Input { Value = 1, },
            ["ShadowLightInputs3D.ShadowMapSize"] = Input { Value = 3439, },
            ["ShadowLightInputs3D.ShadowMapProxy"] = Input { Value = 0.586976744186047, },
            ["ShadowLightInputs3D.SoftnessType"] = Input { Value = FuID { "Variable" }, },
            ["ShadowLightInputs3D.ConstantSoftness"] = Input { Value = 0.0586046511627907, },
            ["ShadowLightInputs3D.Spread"] = Input { Value = 2.88372093023256, },
         },
         ViewInfo = OperatorInfo { Pos = { 825, 280.5 } },
      },
      ReplaceNormals3D1 = ReplaceNormals3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Displace3D1",
               Source = "Output",
            },
            ["Normals.SmoothingAngle"] = Input { Value = 0, },
            ["Tangents.Recompute"] = Input { Value = 0, },
            ["Tangents.SmoothingAngle"] = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 346.5 } },
      },
      Displace3D1 = Displace3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Triangulate3D1",
               Source = "Output",
            },
            Scale = Input { Value = 0.314893617021277, },
            Bias = Input { Value = -1, },
            Input = Input {
               SourceOp = "FastNoise1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 346.5 } },
      },
      Renderer3D1_2 = Renderer3D {
         Inputs = {
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
            GlobalIn = Input { Value = 1, },
            GlobalOut = Input { Value = 2000, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererOpenGL.Channels.Nest"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.RGBASS"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.Normal"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.WorldCoord"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.WorldCoordSS"] = Input { Value = 1, },
            ["RendererOpenGL.AccumulationEffects"] = Input { Value = 1, },
            ["RendererOpenGL.EnableAccumEffects"] = Input { Value = 1, },
            ["RendererOpenGL.AccumQuality"] = Input { Value = 120, },
            ["RendererOpenGL.DoFBlur"] = Input { Value = 0.06, },
            ["RendererOpenGL.LightingEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.ShadowsEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.Wireframe"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 990, 313.5 } },
      },
      ReplaceMaterial3D1 = ReplaceMaterial3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            LimitByObjectID = Input { Value = 1, },
            ["MtlStdInputs.ReceivesLighting"] = Input { Value = 0, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 990, 247.5 } },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            ["Transform3DOp.Rotate.X"] = Input { Value = -59.1549296, },
            ["MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.552131558641975, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.SubdivisionWidth"] = Input { Value = 16, },
            ["SurfacePlaneInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfacePlaneInputs.Visibility.CullBackFace"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.Nest"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 275, 346.5 } },
      },
      Triangulate3D1 = Triangulate3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 346.5 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "ReplaceNormals3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "SpotLight1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
            SceneInput4 = Input {
               SourceOp = "AmbientLight1",
               Source = "Output",
            },
            SceneInput5 = Input {
               SourceOp = "Shape3D2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 825, 346.5 } },
      },
      Renderer3D1 = Renderer3D {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            GlobalOut = Input { Value = 2000, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Override3D1",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.Nest"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.RGBASS"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.Z"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.Normal"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.WorldCoord"] = Input { Value = 1, },
            ["RendererOpenGL.Channels.WorldCoordSS"] = Input { Value = 1, },
            ["RendererOpenGL.AccumulationEffects"] = Input { Value = 1, },
            ["RendererOpenGL.EnableAccumEffects"] = Input { Value = 1, },
            ["RendererOpenGL.AccumQuality"] = Input { Value = 120, },
            ["RendererOpenGL.DoFBlur"] = Input { Value = 0.06, },
            ["RendererOpenGL.LightingEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.ShadowsEnabled"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1100, 379.5 } },
      },
      ErodeDilate1 = ErodeDilate {
         Inputs = {
            XAmount = Input { Value = 0.000468085106382979, },
            Input = Input {
               SourceOp = "Renderer3D1_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1100, 313.5 } },
      },
      Override3D1 = Override3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            ["Lighting.DoShadowCaster"] = Input { Value = 1, },
            ["Lighting.IsShadowCaster"] = Input { Value = 0, },
            ["Exclusions.LimitByObjectID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 935, 379.5 } },
      },
      Renderer3D1_1 = Renderer3D {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            GlobalOut = Input { Value = 2000, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "ReplaceMaterial3D1",
               Source = "Output",
            },
            ["RendererOpenGL.AccumulationEffects"] = Input { Value = 1, },
            ["RendererOpenGL.EnableAccumEffects"] = Input { Value = 1, },
            ["RendererOpenGL.AccumQuality"] = Input { Value = 60, },
            ["RendererOpenGL.LightingEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.ShadowsEnabled"] = Input { Value = 1, },
            ["RendererSoftware.Channels.Nest"] = Input { Value = 1, },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 247.5 } },
      },
      Background1 = Background {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            GlobalOut = Input { Value = 2000, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftGreen = Input { Value = 0.161957168352171, },
            TopLeftBlue = Input { Value = 0.544356038072576, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
            EffectMask = Input {
               SourceOp = "ErodeDilate1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 313.5 } },
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.Z"] = Input { Value = 2.18096234926164, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -5.0704226, },
            AoV = Input { Value = 19.2642683071402, },
            PlaneOfFocus = Input { Value = 2.11702127659574, },
            ["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 = { 715, 412.5 } },
      },
      Merge1 = Merge {
         Inputs = {
            Blend = Input { Value = 0.587234042553191, },
            Background = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1320, 379.5 } },
      },
      ChannelBooleans1 = ChannelBoolean {
         Inputs = {
            ToRed = Input { Value = 4, },
            ToGreen = Input { Value = 4, },
            ToBlue = Input { Value = 4, },
            ToAlpha = Input { Value = 4, },
            EnableExtraChannels = Input { Value = 1, },
            ToZBuffer = Input { Value = 18, },
            Background = Input {
               SourceOp = "Renderer3D1_1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1320, 247.5 } },
      },
      DepthBlur2 = DepthBlur {
         Inputs = {
            Input = Input {
               SourceOp = "ChannelBooleans1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1430, 247.5 } },
      },
      Merge3 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "DepthBlur2",
               Source = "Output",
            },
            ApplyMode = Input { Value = FuID { "Multiply" }, },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1430, 379.5 } },
      },
      Renderer3D2 = Renderer3D {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            GlobalOut = Input { Value = 2000, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererOpenGL.Channels.Nest"] = Input { Value = 1, },
            ["RendererOpenGL.Supersampling"] = Input { Value = 1, },
            ["RendererOpenGL.AccumulationEffects"] = Input { Value = 1, },
            ["RendererOpenGL.ShadingModel"] = Input { Value = 0, },
            ["RendererOpenGL.Wireframe"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 825, 478.5 } },
      },
      Blur1 = Blur {
         Inputs = {
            XBlurSize = Input { Value = 5.1063829787234, },
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1540, 313.5 } },
      },
      Merge2 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Merge3",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Blur1",
               Source = "Output",
            },
            Gain = Input { Value = 0, },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1540, 379.5 } },
      }
   }
}
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline
User avatar

Chad Capeland

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

Re: How to deform a plane in 3D triangles

PostFri Apr 28, 2017 4:23 am

You could also render lighting in the SW renderer and project that image back onto the geometry and render in the GL renderer with DoF. It's surprisingly effective.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Bob Place

  • Posts: 54
  • Joined: Thu Jan 21, 2016 10:13 pm
  • Location: Atlanta, Ga. USA

Re: How to deform a plane in 3D triangles

PostFri Apr 28, 2017 11:32 am

Bryan Ray wrote:1.)...Use a Replace Material node to turn off Receives Lighting but leave Receives Shadows on. That will give you a white render with shadows....


That was the simplest explanation of how to create a psuedo-shadow pass. I hated Fusion shadows until right this moment...

Thanks!
Bob Place
Offline
User avatar

Chad Capeland

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

Re: How to deform a plane in 3D triangles

PostFri Apr 28, 2017 3:00 pm

Bob Place wrote:
Bryan Ray wrote:1.)...Use a Replace Material node to turn off Receives Lighting but leave Receives Shadows on. That will give you a white render with shadows....


That was the simplest explanation of how to create a psuedo-shadow pass. I hated Fusion shadows until right this moment...

Thanks!


Not in front of Fusion right now, but I can't see how that would work. There is no separate shadow loop.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Bob Place

  • Posts: 54
  • Joined: Thu Jan 21, 2016 10:13 pm
  • Location: Atlanta, Ga. USA

Re: How to deform a plane in 3D triangles

PostFri Apr 28, 2017 6:44 pm

Maybe I am doing something wrong, but it seems to work as I would expect it to work.

Code: Select all
{
   Tools = ordered() {
      Shape3D1_1 = Shape3D {
         Inputs = {
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.36935588461444, },
            ["Transform3DOp.Translate.Y"] = Input { Value = -0.710320690667039, },
            ["Transform3DOp.Translate.Z"] = Input { Value = -0.839457901197737, },
            Shape = Input { Value = FuID { "SurfaceCubeInputs" }, },
            ["MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.290196078431373, },
            ["MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.407843137254902, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 5, }
         },
         ViewInfo = OperatorInfo { Pos = { 440, 49.5 } },
      },
      ReplaceMaterial3D1_1 = ReplaceMaterial3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Shape3D1_1",
               Source = "Output",
            },
            ["MtlStdInputs.ReceivesLighting"] = Input { Value = 0, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 4, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 49.5 } },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.36935588461444, },
            ["Transform3DOp.Translate.Y"] = Input { Value = -0.710320690667039, },
            ["Transform3DOp.Translate.Z"] = Input { Value = -0.839457901197737, },
            Shape = Input { Value = FuID { "SurfaceCubeInputs" }, },
            ["MtlStdInputs.Diffuse.Color.Red"] = Input { Value = 0.290196078431373, },
            ["MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.407843137254902, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 5, }
         },
         ViewInfo = OperatorInfo { Pos = { 550, 214.5 } },
      },
      Camera3D1_1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 1.41746401696624, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 6.55731827870837, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -12.5176940076053, },
            AoV = Input { Value = 19.2642683071402, },
            ["Stereo.Mode"] = Input { Value = FuID { "Mono" }, },
            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 = { 605, 115.5 } },
      },
      Shape3D2_1 = Shape3D {
         Inputs = {
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
            ["Transform3DOp.Translate.X"] = Input { Value = 0.34598904272528, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.225429716515507, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.185840442109593, },
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["SurfaceSphereInputs.Radius"] = Input { Value = 0.212765957446809, },
            ["SurfaceSphereInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceSphereInputs.Visibility.IsUnseenByCameras"] = Input { Value = 1, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 4, }
         },
         ViewInfo = OperatorInfo { Pos = { 660, 16.5 } },
      },
      Merge3D1_1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "ReplaceMaterial3D1_1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1_1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "SpotLight1_1",
               Source = "Output",
            },
            SceneInput4 = Input {
               SourceOp = "Shape3D2_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 49.5 } },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1_1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "SpotLight1_1",
               Source = "Output",
            },
            SceneInput4 = Input {
               SourceOp = "Shape3D2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 214.5 } },
      },
      SpotLight1_1 = LightSpot {
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 2.69103476630913, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 3.82846977288166, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -39.8266335013323, },
            ["ShadowLightInputs3D.Nest"] = Input { Value = 1, },
            ["ShadowLightInputs3D.SoftnessType"] = Input { Value = FuID { "Constant" }, },
            ["ShadowLightInputs3D.ConstantSoftness"] = Input { Value = 0.0418604651162791, },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 115.5 } },
      },
      Renderer3D2 = Renderer3D {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.LightingEnabled"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 770, 214.5 } },
      },
      Renderer3D1_1 = Renderer3D {
         Inputs = {
            ["RendererOpenGL.Channels.Nest"] = Input { Value = 1, },
            ["RendererOpenGL.LightingEnabled"] = Input { Value = 1, },
            ["RendererOpenGL.ShadowsEnabled"] = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D1_1",
               Source = "Output",
            },
            ["RendererSoftware.Channels.Nest"] = Input { Value = 1, },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 770, 49.5 } },
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Renderer3D2",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Renderer3D1_1",
               Source = "Output",
            },
            ApplyMode = Input { Value = FuID { "Multiply" }, },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 880, 214.5 } },
      },
      Shape3D2 = Shape3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.34598904272528, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.225429716515507, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.185840442109593, },
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
            ["SurfaceSphereInputs.Radius"] = Input { Value = 0.212765957446809, },
            ["SurfaceSphereInputs.Visibility.Nest"] = Input { Value = 1, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 4, }
         },
         ViewInfo = OperatorInfo { Pos = { 660, 280.5 } },
      }
   }
}


thoughts?
Bob Place
Offline
User avatar

Bryan Ray

  • Posts: 2478
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: How to deform a plane in 3D triangles

PostFri Apr 28, 2017 6:56 pm

Chad Capeland wrote:
Not in front of Fusion right now, but I can't see how that would work. There is no separate shadow loop.


Here's a screenshot of my comp. The ReplaceMaterial3D in Viewer 2 has Receives Lighting off but Receives Shadows on. As you can see, it produces the shadows only. This works for both cast shadows and self-shadowing.

The floating Viewer shows the result if both switches are turned on.

Untitled.png
Untitled.png (246.98 KiB) Viewed 4717 times
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline
User avatar

Chad Capeland

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

Re: How to deform a plane in 3D triangles

PostFri Apr 28, 2017 7:32 pm

Ah, that's using SW renderer. I see. I was thinking of GL, where that definitely won't work.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Robin Doelly

  • Posts: 64
  • Joined: Mon Mar 28, 2016 10:34 pm

Re: How to deform a plane in 3D triangles

PostFri May 19, 2017 3:10 pm

That is all fantastic .. gives me a great place to start from ...

Many thanks to you all
R

Return to Fusion

Who is online

Users browsing this forum: Majestic-12 [Bot] and 27 guests