Page 1 of 1

Lights through Transparent pixels

PostPosted: Mon May 02, 2016 12:41 pm
by Gary Hanna
I have a video file with a transparency of two characters. It is on a 3D image plane and set into a merge 3D with a camera projected room using 3d image planes.

Is there a way to get the light to shine through the transparent parts of the video file to create a cast shadow of the characters? As of right now it only cast shadows in the shape of the plane as a whole.

PS - the cast shadow of the window in the floor is painted in the texture so that's not real.

Image

Re: Lights through Transparent pixels

PostPosted: Mon May 02, 2016 7:25 pm
by michael vorberg
if you use the software renderer then you get the right shadows

softshadows.JPG
softshadows.JPG (152.6 KiB) Viewed 2818 times

Re: Lights through Transparent pixels

PostPosted: Mon May 02, 2016 8:44 pm
by Gary Hanna
michael vorberg wrote:if you use the software renderer then you get the right shadows

softshadows.JPG


But no depth of field...buzzkill.

Re: Lights through Transparent pixels

PostPosted: Mon May 02, 2016 10:01 pm
by michael vorberg
but you can use the depthblur node (or a macro with defocus) for the DoF after the renderer

Re: Lights through Transparent pixels

PostPosted: Mon May 02, 2016 10:27 pm
by Gary Hanna
michael vorberg wrote:but you can use the depthblur node (or a macro with defocus) for the DoF after the renderer


Ok thanks, I'll try that instead, but was hoping to avoid software renderer. Plus it makes my transparent window matte opaque, even when setting it to t. matte in software renderer...argh. Hopefully there's a better workaround in the future.

But Fusion still is the most practical way to do actual 3D comps.

Re: Lights through Transparent pixels

PostPosted: Mon May 02, 2016 10:28 pm
by Chad Capeland
Another option would be to use a projector light.

Re: Lights through Transparent pixels

PostPosted: Tue May 03, 2016 5:02 am
by Eric Westphal
Or use a little workaround to get *both* Softshadows and DOF in 3D....:-)

Code: Select all
{
   Tools = ordered() {
      ReplaceMaterial3D1 = ReplaceMaterial3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            ["ReplaceMode.Nest"] = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "Catcher1",
               Source = "MaterialOutput",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 5, },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 115.5, }, },
      },
      Catcher1 = TexCatcher {
         Inputs = {
            MaterialID = Input { Value = 6, },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 82.5, }, },
      },
      Instance_Camera3D1 = Camera3D {
         CtrlWZoom = false,
         SourceOp = "Camera3D1",
         Inputs = {
            SceneInput = Input { },
            ["Transform3DOp.Translation"] = Input { },
            ["Transform3DOp.Rotation"] = Input { },
            ["Transform3DOp.PivotNest"] = Input { },
            ["Transform3DOp.ScaleNest"] = Input { },
            ["Transform3DOp.TargetNest"] = Input { },
            ["Stereo.Nest"] = Input { },
            ["Stereo.RightCamera"] = Input { },
            FilmBack = Input { },
            ControlVis = Input { Value = 1, },
            Import = Input { },
            ["SurfacePlaneInputs.Visibility.Nest"] = Input { },
            ["SurfacePlaneInputs.Lighting.Nest"] = Input { },
            ["SurfacePlaneInputs.Matte.Nest"] = Input { },
            ["SurfacePlaneInputs.BlendMode.Nest"] = Input { },
            ["SurfacePlaneInputs.Controls.Nest"] = Input { },
            ["SurfacePlaneInputs.ObjectID.Nest"] = Input { },
            ImageInput = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            },
            ["MtlStdInputs.Diffuse.Nest"] = Input { },
            ["MtlStdInputs.Specular.Nest"] = Input { },
            ["MtlStdInputs.Transmittance.Nest"] = Input { },
            ["MtlStdInputs.MaterialIDNest"] = Input { },
            StartEndRenderScripts = Input { },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, -49.5, }, },
      },
      Merge3D2 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "ReplaceMaterial3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Instance_Camera3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1430, 115.5, }, },
      },
      Renderer3D2 = Renderer3D {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            SceneInput = Input {
               SourceOp = "Merge3D2",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL", }, },
            ["RendererOpenGL.AccumulationEffects"] = Input { Value = 1, },
            ["RendererOpenGL.EnableAccumEffects"] = Input { Value = 1, },
            ["RendererOpenGL.AccumQuality"] = Input { Value = 8, },
            ["RendererOpenGL.DoFBlur"] = Input { Value = 0.02, },
            ["RendererOpenGL.TransparencySorting"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1595, 115.5, }, },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "ImagePlane3D1",
               Source = "Output",
            },
            SceneInput4 = Input {
               SourceOp = "Duplicate3D1",
               Source = "Data3D",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 770, 115.5, }, },
      },
      Renderer3D1 = Renderer3D {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            SceneInput = Input {
               SourceOp = "Merge3D1_1",
               Source = "Output",
            },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1045, 49.5, }, },
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.535499452634878, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.580433615147737, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.840155936335953, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -24.3999996185303, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 37.2000045776367, },
            FLength = Input { Value = 18.2123442718302, },
            PlaneOfFocus = Input { Value = 1, },
            ["Stereo.Mode"] = Input { Value = FuID { "OffAxis", }, },
            PlaneOfFocusVis = Input { Value = 1, },
            Import = Input { Value = 1, },
            ImagePlaneEnabled = Input { Value = 0, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 5, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ProjectionEnabled = Input { Value = 1, },
            ProjectionFitMethod = Input { Value = FuID { "Outside", }, },
            ProjectionMode = Input { Value = 2, },
         },
         ViewInfo = OperatorInfo { Pos = { 660, -49.5, }, },
      },
      Merge3D1_1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "SpotLight1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 880, 49.5, }, },
      },
      SpotLight1 = LightSpot {
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 1.5139798618137, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 2.10329272162723, },
            ["Transform3DOp.UseTarget"] = Input { Value = 1, },
            ["Transform3DOp.Target.Y"] = Input { Value = 0.186654182933765, },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 16.5, }, },
      },
      ImagePlane3D1 = ImagePlane3D {
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.202435360370257, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "Text1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 115.5, }, },
      },
      Text1 = TextPlus {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            Size = Input { Value = 0.5, },
            Font = Input { Value = "Arial", },
            StyledText = Input { Value = "A", },
            Style = Input { Value = "Bold", },
            ManualFontKerningPlacement = Input {
               Value = StyledText {
                  Array = {
                  },
                  Value = "",
               },
            },
            Red1 = Input { Value = 0.6887301992019, },
            Green1 = Input { Value = 0.757543109040757, },
            ShadingGradient1 = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1, },
                     [1] = { 1, 1, 1, 1, },
                  },
               },
            },
            RenderToDPTFile = Input { Disabled = true, },
            DPTType = Input { Disabled = true, },
            DPTResolution = Input { Disabled = true, },
         },
         ViewInfo = OperatorInfo { Pos = { 440, 115.5, }, },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            ["Transform3DOp.Rotate.X"] = Input { Value = -90, },
            ["Transform3DOp.Scale.X"] = Input { Value = 4.65007, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 181.5, }, },
      },
      Shape3D2 = Shape3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = -0.533519850132279, },
            Shape = Input { Value = FuID { "SurfaceSphereInputs", }, },
            ["MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.721189093619762, },
            ["MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.46900512662027, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
            ["SurfaceSphereInputs.Radius"] = Input { Value = 0.125, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 4, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 280.5, }, },
      },
      Duplicate3D1 = Duplicate3D {
         Inputs = {
            LastCopy = Input { Value = 6, },
            ["Translate.Z"] = Input { Value = -0.3131313, },
            SceneInput = Input {
               SourceOp = "Shape3D2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 280.5, }, },
      },
   },
}

Re: Lights through Transparent pixels

PostPosted: Tue May 03, 2016 9:04 am
by Gary Hanna
Eric Westphal wrote:Or use a little workaround to get *both* Softshadows and DOF in 3D....:-)

Code: Select all
{
   Tools = ordered() {
      ReplaceMaterial3D1 = ReplaceMaterial3D {
         Inputs = {
            SceneInput = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            ["ReplaceMode.Nest"] = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "Catcher1",
               Source = "MaterialOutput",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 5, },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 115.5, }, },
      },
      Catcher1 = TexCatcher {
         Inputs = {
            MaterialID = Input { Value = 6, },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, 82.5, }, },
      },
      Instance_Camera3D1 = Camera3D {
         CtrlWZoom = false,
         SourceOp = "Camera3D1",
         Inputs = {
            SceneInput = Input { },
            ["Transform3DOp.Translation"] = Input { },
            ["Transform3DOp.Rotation"] = Input { },
            ["Transform3DOp.PivotNest"] = Input { },
            ["Transform3DOp.ScaleNest"] = Input { },
            ["Transform3DOp.TargetNest"] = Input { },
            ["Stereo.Nest"] = Input { },
            ["Stereo.RightCamera"] = Input { },
            FilmBack = Input { },
            ControlVis = Input { Value = 1, },
            Import = Input { },
            ["SurfacePlaneInputs.Visibility.Nest"] = Input { },
            ["SurfacePlaneInputs.Lighting.Nest"] = Input { },
            ["SurfacePlaneInputs.Matte.Nest"] = Input { },
            ["SurfacePlaneInputs.BlendMode.Nest"] = Input { },
            ["SurfacePlaneInputs.Controls.Nest"] = Input { },
            ["SurfacePlaneInputs.ObjectID.Nest"] = Input { },
            ImageInput = Input {
               SourceOp = "Renderer3D1",
               Source = "Output",
            },
            ["MtlStdInputs.Diffuse.Nest"] = Input { },
            ["MtlStdInputs.Specular.Nest"] = Input { },
            ["MtlStdInputs.Transmittance.Nest"] = Input { },
            ["MtlStdInputs.MaterialIDNest"] = Input { },
            StartEndRenderScripts = Input { },
         },
         ViewInfo = OperatorInfo { Pos = { 1210, -49.5, }, },
      },
      Merge3D2 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "ReplaceMaterial3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Instance_Camera3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1430, 115.5, }, },
      },
      Renderer3D2 = Renderer3D {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            SceneInput = Input {
               SourceOp = "Merge3D2",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL", }, },
            ["RendererOpenGL.AccumulationEffects"] = Input { Value = 1, },
            ["RendererOpenGL.EnableAccumEffects"] = Input { Value = 1, },
            ["RendererOpenGL.AccumQuality"] = Input { Value = 8, },
            ["RendererOpenGL.DoFBlur"] = Input { Value = 0.02, },
            ["RendererOpenGL.TransparencySorting"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1595, 115.5, }, },
      },
      Merge3D1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "ImagePlane3D1",
               Source = "Output",
            },
            SceneInput4 = Input {
               SourceOp = "Duplicate3D1",
               Source = "Data3D",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 770, 115.5, }, },
      },
      Renderer3D1 = Renderer3D {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            SceneInput = Input {
               SourceOp = "Merge3D1_1",
               Source = "Output",
            },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 1045, 49.5, }, },
      },
      Camera3D1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = 0.535499452634878, },
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.580433615147737, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 0.840155936335953, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -24.3999996185303, },
            ["Transform3DOp.Rotate.Y"] = Input { Value = 37.2000045776367, },
            FLength = Input { Value = 18.2123442718302, },
            PlaneOfFocus = Input { Value = 1, },
            ["Stereo.Mode"] = Input { Value = FuID { "OffAxis", }, },
            PlaneOfFocusVis = Input { Value = 1, },
            Import = Input { Value = 1, },
            ImagePlaneEnabled = Input { Value = 0, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 5, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 4, },
            ProjectionEnabled = Input { Value = 1, },
            ProjectionFitMethod = Input { Value = FuID { "Outside", }, },
            ProjectionMode = Input { Value = 2, },
         },
         ViewInfo = OperatorInfo { Pos = { 660, -49.5, }, },
      },
      Merge3D1_1 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "Merge3D1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            },
            SceneInput3 = Input {
               SourceOp = "SpotLight1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 880, 49.5, }, },
      },
      SpotLight1 = LightSpot {
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 1.5139798618137, },
            ["Transform3DOp.Translate.Z"] = Input { Value = 2.10329272162723, },
            ["Transform3DOp.UseTarget"] = Input { Value = 1, },
            ["Transform3DOp.Target.Y"] = Input { Value = 0.186654182933765, },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 16.5, }, },
      },
      ImagePlane3D1 = ImagePlane3D {
         Inputs = {
            ["Transform3DOp.Translate.Y"] = Input { Value = 0.202435360370257, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "Text1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 115.5, }, },
      },
      Text1 = TextPlus {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            Size = Input { Value = 0.5, },
            Font = Input { Value = "Arial", },
            StyledText = Input { Value = "A", },
            Style = Input { Value = "Bold", },
            ManualFontKerningPlacement = Input {
               Value = StyledText {
                  Array = {
                  },
                  Value = "",
               },
            },
            Red1 = Input { Value = 0.6887301992019, },
            Green1 = Input { Value = 0.757543109040757, },
            ShadingGradient1 = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1, },
                     [1] = { 1, 1, 1, 1, },
                  },
               },
            },
            RenderToDPTFile = Input { Disabled = true, },
            DPTType = Input { Disabled = true, },
            DPTResolution = Input { Disabled = true, },
         },
         ViewInfo = OperatorInfo { Pos = { 440, 115.5, }, },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            ["Transform3DOp.Rotate.X"] = Input { Value = -90, },
            ["Transform3DOp.Scale.X"] = Input { Value = 4.65007, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 181.5, }, },
      },
      Shape3D2 = Shape3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = -0.533519850132279, },
            Shape = Input { Value = FuID { "SurfaceSphereInputs", }, },
            ["MtlStdInputs.Diffuse.Color.Green"] = Input { Value = 0.721189093619762, },
            ["MtlStdInputs.Diffuse.Color.Blue"] = Input { Value = 0.46900512662027, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 3, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
            ["SurfaceSphereInputs.Radius"] = Input { Value = 0.125, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 4, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 280.5, }, },
      },
      Duplicate3D1 = Duplicate3D {
         Inputs = {
            LastCopy = Input { Value = 6, },
            ["Translate.Z"] = Input { Value = -0.3131313, },
            SceneInput = Input {
               SourceOp = "Shape3D2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 280.5, }, },
      },
   },
}



Thanks, though too new to know how to implement that though I see a code slot.

Re: Lights through Transparent pixels

PostPosted: Tue May 03, 2016 10:31 am
by michael vorberg
Copy all and paste into the fusion flow

Re: Lights through Transparent pixels

PostPosted: Tue May 03, 2016 3:52 pm
by Gary Hanna
michael vorberg wrote:Copy all and paste into the fusion flow


Ok thanks. Is there a video tutorial anywhere on how this works. So hard to find specific featuers/questions and most of the docs/vids I seen are the basics.

Curious how to get sorted/quick sort to work in the renderer - it always gives me red light errors when I do that. I'll dig around this some more. Thanks.

EDIT - Yeah you can tell it's a flat surface, the DOF stops at the projection...damn.

Re: Lights through Transparent pixels

PostPosted: Tue May 03, 2016 5:53 pm
by Eric Westphal
EDIT - Yeah you can tell it's a flat surface, the DOF stops at the projection...damn.


Well....it's *not* a flat surface...:-)
The Softshadow'd render is projected back onto the original 3D-Mesh / -Scene.
(Else DOF won't work correctly)

If you want a larger groundplane, just enlarge the shape3D which is used for that purpose.
(Or pipe in an other 3D Scene you want to render that way)