Jump to: Board index » General » Fusion

Mask on pCustom region -

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

Look01

  • Posts: 1
  • Joined: Fri Jun 04, 2021 12:14 am
  • Real Name: Lukasz Starkowiak

Mask on pCustom region -

PostSat Jun 05, 2021 4:50 pm

Hi,
I'm trying to add mask on pCustom region but without results. So, I have simple particle emitter and pCustom which act as collision layer (found in some tutorial) with region mode set to "when intersecting region". Everything works fine and all particles are blocked by given region defined in pCustom. Now this region is simple Rectangle and I want to add mask (PNG image) with custom shape. Instead of adding mask I tried to change Region from "Rectangle" to "Bitmap" but then I don't know how to change position of this region in 3d space.
Many thanks for the advice! ;)

My nodes setup:
Code: Select all
{
   Tools = ordered() {
      pEmitter1_1 = pEmitter {
         ID = 372,
         Inputs = {
            ["SphereRgn.Translate.X"] = Input { Value = 0.058, },
            ["SphereRgn.Size"] = Input { Value = 0.488, },
            RandomSeed = Input { Value = 126, },
            Number = Input {
               SourceOp = "pEmitter1_1Number",
               Source = "Value",
            },
            Lifespan = Input { Value = 394, },
            LifespanVariance = Input { Value = 31.5, },
            InheritVelocity = Input { Value = -2, },
            Angle = Input { Value = -347, },
            AngleVariance = Input { Value = 114.8, },
            AngleZVariance = Input { Value = -216.5, },
            RotationControls = Input { Value = 1, },
            SpinControls = Input { Value = 1, },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["ParticleStyleBitmap.Animate"] = Input { Value = 2, },
            ["ParticleStyleBitmap.TimeOffset"] = Input { Value = -37.7, },
            Region = Input { Value = FuID { "RectRgn" }, },
            ["ParticleStyle.Red"] = Input { Value = 0.299, },
            ["ParticleStyle.Green"] = Input { Value = 0.835, },
            ["ParticleStyle.ColorOverLifeControls"] = Input { Value = 1, },
            ["ParticleStyle.ColorOverLife"] = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0.626, 1, 1, 1 }
                  }
               },
            },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.007, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1_1SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.FadeOut"] = Input { Value = 0, },
            ["ParticleStyle.Blur"] = Input { Value = 0.299, },
            ["ParticleStyle.BlurVariance"] = Input { Value = 0.165, },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1_1BlurOverLife2D",
               Source = "Value",
            },
            ["ParticleStyle.Glow"] = Input { Value = 0.449, },
            ["RectRgn.Width"] = Input { Value = 0.22, },
            ["RectRgn.Height"] = Input { Value = 0.189, },
            ["RectRgn.Translate.Y"] = Input { Value = 0.084, },
            ["RectRgn.Rotate.X"] = Input { Value = -90, },
         },
         ViewInfo = OperatorInfo { Pos = { 598.338, 473.612 } },
      },
      pEmitter1_1Number = BezierSpline {
         SplineColor = { Red = 233, Green = 206, Blue = 78 },
         NameSet = true,
         KeyFrames = {
            [0] = { 2, RH = { 53.3333333333333, 1.33333333333333 }, Flags = { Linear = true } },
            [160] = { 0, LH = { 106.666666666667, 0.666666666666667 }, RH = { 185.333333333333, 0 }, Flags = { Linear = true } },
            [236] = { 0, LH = { 210.666666666667, 0 }, Flags = { Linear = true } }
         }
      },
      pEmitter1_1SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         NameSet = true,
      },
      pEmitter1_1BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.145077720207254, 0.601654846335697 }, Flags = { Linear = true } },
               [0.435233160621762] = { 0.804964539007092, LH = { 0.290155440414508, 0.703309692671395 }, RH = { 0.623488773747841, 0.703309692671395 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.811744386873921, 0.601654846335697 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         NameSet = true,
      },
      pMerge2_1 = pMerge {
         ID = 369,
         Inputs = {
            Particles1 = Input {
               SourceOp = "pCustom2_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 961.222, 474.366 } },
      },
      pCustom2_1 = pCustom {
         ID = 365,
         CtrlWZoom = false,
         Inputs = {
            PositionZExpression = Input { Value = "   pz", },
            VelocityXExpression = Input { Value = "if(rgnhit =1, ((rgnnxmass)n1+(vxn3))+(rand(-n2, n2))mass, vx)", },
            VelocityYExpression = Input { Value = "if(rgnhit =1, abs(((rgnnymass)n1+(vyn3))+(rand(-n2, n2))mass), vy)", },
            VelocityZExpression = Input { Value = "if(rgnhit =1, ((rgnnzmass)n1+(vzn3))+(rand(-n2, n2))mass, vz)", },
            MassExpression = Input { Value = "if(rgnhit = 1, mass*n4, mass)", },
            Input = Input {
               SourceOp = "pEmitter1_1",
               Source = "Output",
            },
            RegionMode = Input { Value = FuID { "Intersecting" }, },
            Region = Input { Value = FuID { "RectRgn" }, },
            ["RectRgn.Width"] = Input { Value = 0.606, },
            ["RectRgn.Height"] = Input { Value = 0.449, },
            ["RectRgn.Translate.Y"] = Input { Value = -0.638, },
            ["RectRgn.Rotate.X"] = Input { Value = -90, },
         },
         ViewInfo = OperatorInfo { Pos = { 771.142, 472.062 } },
      },
      pDirectionalForce1_1_1 = pDirectionalForce {
         ID = 376,
         Inputs = {
            RandomSeed = Input { Value = 409, },
            Strength = Input { Value = 0.013, },
            Input = Input {
               SourceOp = "pMerge2_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1154.87, 476.348 } },
      },
      pRender1_1 = pRender {
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            GlobalOut = Input { Value = 386, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            OutputMode = Input { Disabled = true, },
            ["MaterialID.MaterialID"] = Input { Value = 1, },
            ["ObjectID.ObjectID"] = Input { Value = 1, },
            Input = Input {
               SourceOp = "pDirectionalForce1_1_1",
               Source = "Output",
            },
            Camera = Input {
               SourceOp = "Camera3D1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1322.08, 474.915 } },
      },
      Camera3D1_1 = Camera3D {
         Inputs = {
            ["Transform3DOp.Translate.X"] = Input { Value = -0.00212129318280351, },
            ["Transform3DOp.Translate.Y"] = Input {
               SourceOp = "Camera3D1_1YOffset",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Z"] = Input { Value = -0.00107690713440523, },
            ["Transform3DOp.Rotate.X"] = Input { Value = -90, },
            ["Transform3DOp.Rotate.Y"] = Input {
               SourceOp = "Camera3D1_1YRotation",
               Source = "Value",
            },
            AoV = Input { Value = 19.2642683071402, },
            PlaneOfFocus = Input { Value = 1.098, },
            ["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 = { 1320.26, 419.763 } },
      },
      Camera3D1_1YOffset = BezierSpline {
         SplineColor = { Red = 252, Green = 57, Blue = 47 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0.184663190659516, Flags = { Linear = true } }
         }
      },
      Camera3D1_1YRotation = BezierSpline {
         SplineColor = { Red = 128, Green = 255, Blue = 128 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0, Flags = { Linear = true } }
         }
      },
      Renderer3D1_1 = Renderer3D {
         CustomData = { ToolVersion = 2, },
         Inputs = {
            GlobalOut = Input { Value = 386, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "pRender1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1479.48, 478.218 } },
      },
      MediaOut1_1 = MediaOut {
         Inputs = {
            Index = Input { Value = "0", },
            Input = Input {
               SourceOp = "Renderer3D1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1643.85, 482.463 } },
      }
   }
}

Return to Fusion

Who is online

Users browsing this forum: No registered users and 18 guests