Jump to: Board index » General » Fusion

pEmitter/Style/Blob/Color over life not using alpha

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

Richard Bang

  • Posts: 3
  • Joined: Fri Sep 11, 2015 10:54 am

pEmitter/Style/Blob/Color over life not using alpha

PostFri Sep 11, 2015 11:47 am

This is probably a noob question.

I have a pEmitter driving a Shape3d through Replicate3D, almost everything works.
The color of the instance changes over time but the alpha does not.

I guess its because the 3d shape has an alpha and its not combining it with the color alpha, but I cant see how to fix this.

Can anyone point me in the right direction?
Offline
User avatar

Chad Capeland

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

Re: pEmitter/Style/Blob/Color over life not using alpha

PostFri Sep 11, 2015 6:50 pm

It's working for me here...

Code: Select all
{
   Tools = ordered() {
      Shape3D1 = Shape3D {
         Inputs = {
            MaterialInput = Input {
               SourceOp = "Text1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 82.5, }, },
      },
      Replicate3D1 = Replicate3D {
         Inputs = {
            ScaleNest = Input { Value = 1, },
            Destination = Input {
               SourceOp = "pRender1",
               Source = "Output",
            },
            Input1 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 770, 82.5, }, },
      },
      Text1 = TextPlus {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 512, },
            Height = Input { Value = 512, },
            Size = Input { Value = 1, },
            Font = Input { Value = "Arial", },
            StyledText = Input { Value = "#", },
            Style = Input { Value = "Bold", },
            ManualFontKerningPlacement = Input {
               Value = StyledText {
                  Array = {
                  },
                  Value = "",
               },
            },
            ShadingGradient1 = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1, },
                     [1] = { 1, 1, 1, 1, },
                  },
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 82.5, }, },
      },
      pRender1 = pRender {
         Inputs = {
            ["_MotionBlurWarning"] = Input { Disabled = true, },
            Width = Input { Value = 2048, },
            Height = Input { Value = 1536, },
            OutputMode = Input { Disabled = true, },
            IntegrationMethod = Input { Value = FuID { "RK4", }, },
            ["MaterialID.MaterialID"] = Input { Value = 3, },
            ["ObjectID.ObjectID"] = Input { Value = 2, },
            Input = Input {
               SourceOp = "pEmitter1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 115.5, }, },
      },
      pEmitter1 = pEmitter {
         ID = 5,
         Inputs = {
            Number = Input {
               SourceOp = "pEmitter1Number",
               Source = "Value",
            },
            Lifespan = Input { Value = 30, },
            Style = Input { Value = FuID { "ParticleStyleBlob", }, },
            ["ParticleStyle.ColorControls"] = Input { Value = 1, },
            ["ParticleStyle.Red"] = Input { Value = 0.5, },
            ["ParticleStyle.Green"] = Input { Value = 0.5, },
            ["ParticleStyle.Blue"] = Input { Value = 0.5, },
            ["ParticleStyle.Alpha"] = Input { Value = 0.5, },
            ["ParticleStyle.ColorVariance"] = Input { Value = 1, },
            ["ParticleStyle.RedLow"] = Input { Value = -1, },
            ["ParticleStyle.RedHigh"] = Input { Value = 1, },
            ["ParticleStyle.GreenLow"] = Input { Value = -1, },
            ["ParticleStyle.GreenHigh"] = Input { Value = 1, },
            ["ParticleStyle.BlueLow"] = Input { Value = -1, },
            ["ParticleStyle.BlueHigh"] = Input { Value = 1, },
            ["ParticleStyle.AlphaLow"] = Input { Value = -1, },
            ["ParticleStyle.AlphaHigh"] = Input { Value = 1, },
            ["ParticleStyle.LockColorVariance"] = Input { Value = 0, },
            ["ParticleStyle.ColorOverLifeControls"] = Input { Value = 1, },
            ["ParticleStyle.ColorOverLife"] = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 1, 1, 1, 1, },
                     [1] = { 1, 1, 1, 0, },
                  },
               },
            },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.0497076, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1SizeoverLife",
               Source = "Value",
            },
            ["ParticleStyle.FadeControls"] = Input { Value = 1, },
            ["ParticleStyle.FadeOut"] = Input { Value = 0.1981982, },
            ["ParticleStyle.MergeControls"] = Input { Value = 1, },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1BluroverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 115.5, }, },
      },
      pEmitter1Number = BezierSpline {
         SplineColor = { Red = 233, Green = 206, Blue = 78, },
         NameSet = true,
         KeyFrames = {
            [0] = { 10, RH = { 0.333333333333333, 6.66666666666667, }, Flags = { Linear = true, }, },
            [1] = { 0, LH = { 0.666666666666667, 3.33333333333333, }, Flags = { Linear = true, }, },
         },
      },
      pEmitter1SizeoverLife = 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,
      },
      pEmitter1BluroverLife2D = 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,
      },
   },
}
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Richard Bang

  • Posts: 3
  • Joined: Fri Sep 11, 2015 10:54 am

Re: pEmitter/Style/Blob/Color over life not using alpha

PostSat Sep 12, 2015 7:31 am

Hi Chad,

Unfortunately its not really working. Yours fades because your using the fade control, not because your using alpha. Setting the fade control to 1 results in the alpha being ignored. Here is a modified example showing the problem.

Code: Select all
Composition {
   CurrentTime = 20,
   RenderRange = { 0, 100, },
   GlobalRange = { 0, 100, },
   CurrentID = 8,
   Version = "Fusion 8.0 build 16",
   SavedOutputs = 0,
   HeldTools = 0,
   DisabledTools = 0,
   LockedTools = 0,
   AudioOffset = 0,
   AutoRenderRange = true,
   Resumable = true,
   OutputClips = {
   },
   Tools = {
      Shape3D1 = Shape3D {
         Inputs = {
            MaterialInput = Input {
               SourceOp = "Text1",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 82.5, }, },
      },
      Replicate3D1 = Replicate3D {
         Inputs = {
            ScaleNest = Input { Value = 1, },
            Destination = Input {
               SourceOp = "pRender1",
               Source = "Output",
            },
            Input1 = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 770, 82.5, }, },
      },
      Text1 = TextPlus {
         Inputs = {
            GlobalOut = Input { Value = 100, },
            Width = Input { Value = 512, },
            Height = Input { Value = 512, },
            Size = Input { Value = 1, },
            Font = Input { Value = "Arial", },
            StyledText = Input { Value = "#", },
            Style = Input { Value = "Bold", },
            ManualFontKerningPlacement = Input {
               Value = StyledText {
                  Array = {
                  },
                  Value = "",
               },
            },
            ShadingGradient1 = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1, },
                     [1] = { 1, 1, 1, 1, },
                  },
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 82.5, }, },
      },
      pRender1 = pRender {
         Inputs = {
            ["_MotionBlurWarning"] = Input { Disabled = true, },
            GlobalOut = Input { Value = 100, },
            Width = Input { Value = 2048, },
            Height = Input { Value = 1536, },
            OutputMode = Input { Disabled = true, },
            IntegrationMethod = Input { Value = FuID { "RK4", }, },
            ["MaterialID.MaterialID"] = Input { Value = 3, },
            ["ObjectID.ObjectID"] = Input { Value = 2, },
            Input = Input {
               SourceOp = "pEmitter1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 115.5, }, },
      },
      pEmitter1 = pEmitter {
         ID = 5,
         CtrlWZoom = false,
         Inputs = {
            Number = Input { Value = 0.1, },
            Lifespan = Input { Value = 10, },
            Style = Input { Value = FuID { "ParticleStyleBlob", }, },
            ["ParticleStyle.ColorControls"] = Input { Value = 1, },
            ["ParticleStyle.Alpha"] = Input { Value = 0.5, },
            ["ParticleStyle.ColorVariance"] = Input { Value = 1, },
            ["ParticleStyle.RedLow"] = Input { Value = -1, },
            ["ParticleStyle.RedHigh"] = Input { Value = 1, },
            ["ParticleStyle.GreenLow"] = Input { Value = -1, },
            ["ParticleStyle.GreenHigh"] = Input { Value = 1, },
            ["ParticleStyle.BlueLow"] = Input { Value = -1, },
            ["ParticleStyle.BlueHigh"] = Input { Value = 1, },
            ["ParticleStyle.AlphaLow"] = Input { Value = -1, },
            ["ParticleStyle.AlphaHigh"] = Input { Value = 1, },
            ["ParticleStyle.LockColorVariance"] = Input { Value = 0, },
            ["ParticleStyle.ColorOverLifeControls"] = Input { Value = 1, },
            ["ParticleStyle.ColorOverLife"] = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 1, 1, },
                     [0.213675213675214] = { 1, 0.04, 0, 1, },
                     [1] = { 1, 1, 1, 0, },
                  },
               },
            },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.0497076, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1SizeoverLife",
               Source = "Value",
            },
            ["ParticleStyle.FadeControls"] = Input { Value = 1, },
            ["ParticleStyle.MergeControls"] = Input { Value = 1, },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1BluroverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 114.5, }, },
      },
      pEmitter1SizeoverLife = 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,
      },
      pEmitter1BluroverLife2D = 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,
      },
   },
   Views = {
      {
         FrameTypeID = "ChildFrame",
         Mode = 3,
         LayoutPreset = 0,
         Left = 0,
         Top = 27,
         Width = 2560,
         Height = 1271,
         Views = ordered() {
            Main = MultiView {
               Active = "Flow",
               ViewList = ordered() {
                  Flow = "FlowView",
                  Console = "ConsoleView",
                  Timeline = "TimelineView",
                  Spline = "SplineEditorView",
                  Info = "InfoView",
                  Chat = "ChatView",
               },
               Flow = FlowView {
                  Flags = {
                     AutoHideNavigator = true,
                     AutoSnap = true,
                     RemoveRouters = true,
                  },
                  NavigatorSize = { 200, 140, },
                  Direction = "Horizontal",
                  PipeStyle = "Direct",
                  Scale = 1,
                  Offset = { 26, 29, },
               },
               Timeline = TimelineView {
                  TreeControlState = {
                  },
                  DisplayMode = "All Tools",
                  ShowCurrentTimeTools = false,
                  Filter = "Show All",
                  ShowSelectedTools = false,
                  ShowAnimatedToolsOnly = false,
                  ShowEditBoxes = false,
                  KeyFrameView = {
                     Position = { Left = 150, Bottom = 350, },
                     ScaleX = 0.00214424951267057,
                     OffsetX = -0.0514619883040934,
                     OffsetY = 0,
                     AutoScaling = "scroll",
                     AutoSnapTo = "frame",
                     AutoSnapToGuidelines = false,
                     GuidelinesGrabEnabled = true,
                     GuidelinesSnapTo = "none",
                  },
                  Spreadsheet = { LeftPos = 150, Visible = false, },
               },
               Spline = SplineEditorView {
                  LeftPos = 238,
                  ScaleX = 0.2,
                  ScaleY = 0.00338983050847458,
                  OffsetX = -4,
                  OffsetY = 0,
                  AutoScaling = "scroll",
                  AutoSnapTo = "frame",
                  AutoSnapToGuidelines = false,
                  GuidelinesSnapTo = "frame",
                  ShowKeyMarkers = false,
                  IndependentHandles = false,
                  ShowNonSplineModifiers = false,
                  GuidelinesGrabEnabled = true,
                  ShowOneToolOnly = false,
                  ShowSelectedTools = false,
                  ShowAllInputs = false,
                  Filter = "Show All",
               },
            },
            Controls = MultiView {
               Active = "Tools",
               ViewList = ordered() {
                  Tools = "ControlView",
                  Modifiers = "ModifierView",
               },
            },
            Left = "PreviewContainer",
            Right = "PreviewContainer",
            Transport = "TransportView",
            Time = "TimeView",
         },
         Layout = {
            Columns = 2,
            RatioX = 1,
            RatioY = 1,
            {
               Rows = 3,
               RatioX = 0.875146771037182,
               RatioY = 100,
               {
                  Columns = 2,
                  RatioX = 1,
                  RatioY = 0.477434679334917,
                  { ID = "Left", RatioX = 0.500223914017017, RatioY = 100, Pop = true, },
                  { ID = "Right", RatioX = 0.499776085982983, Pop = true, },
                  Pop = true,
               },
               { ID = "Main", RatioY = 0.476642913697546, Pop = true, },
               { ID = "Time", SnapY = 56, Flat = true, },
            },
            {
               Rows = 2,
               PixelX = 317,
               { ID = "Controls", RatioX = 1, RatioY = 1, },
               { ID = "Transport", FixedY = -2, },
            },
         },
      },
   },
   Prefs = {
      Comp = {
         Views = {
            Right = {
               Viewer = {
                  ScaleMode = 1,
               },
               View3D = {
                  CameraName = "Perspective",
                  CamPersp = {
                     Position = {
                        X = -0.00183365494012833,
                        Y = 0.00625180453062058,
                        Z = 0.000470772385597229,
                     },
                     Rotation = {
                        X = 30,
                        Y = -5.00895612276508e-006,
                        Z = 0,
                     },
                     Scale = 8.12543201446533,
                  },
                  CamFront = {
                     Position = {
                        X = 0,
                        Y = 0,
                        Z = 0,
                     },
                     Rotation = {
                        X = 0,
                        Y = 0,
                        Z = 0,
                     },
                     Scale = 1,
                  },
                  CamTop = {
                     Position = {
                        X = 0,
                        Y = 0,
                        Z = 0,
                     },
                     Rotation = {
                        X = 90,
                        Y = 0,
                        Z = 0,
                     },
                     Scale = 1,
                  },
                  CamRight = {
                     Position = {
                        X = 0,
                        Y = 0,
                        Z = 0,
                     },
                     Rotation = {
                        X = 0,
                        Y = -90,
                        Z = 0,
                     },
                     Scale = 1,
                  },
                  CamLeft = {
                     Position = {
                        X = 0,
                        Y = 0,
                        Z = 0,
                     },
                     Rotation = {
                        X = 0,
                        Y = 90,
                        Z = 0,
                     },
                     Scale = 1,
                  },
               },
            },
            Left = {
            },
            View1 = {
            },
         },
         Unsorted = {
            GlobalEnd = 100,
         },
         Paths = {
         },
         QuickTime = {
         },
      },
   },
}

 
Offline
User avatar

Chad Capeland

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

Re: pEmitter/Style/Blob/Color over life not using alpha

PostMon Sep 14, 2015 9:11 pm

Your particles don't fade out, therefore your Replicate3D doesn't. My particles fade out, therefore my Replicate3D does.

If you don't want to use the Fade Out control, that's fine. But if you want it to work, you probably should. :D
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Richard Bang

  • Posts: 3
  • Joined: Fri Sep 11, 2015 10:54 am

Re: pEmitter/Style/Blob/Color over life not using alpha

PostTue Sep 15, 2015 7:09 am

So what your saying is that ramping the alpha from 1 to 0 will not cause it to fade, but using fade does!

Having said that I cant use replicate3d anyway as it reorders the sprites whenever one particle reaches end of life which causes them all to suddenly change.

I've ended up using 6 emitters all on top of each other so that I can have different sprites that don't randomly reorder themselves!

Thanks for your help.
Offline
User avatar

Chad Capeland

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

Re: pEmitter/Style/Blob/Color over life not using alpha

PostTue Sep 15, 2015 4:36 pm

Richard Bang wrote:So what your saying is that ramping the alpha from 1 to 0 will not cause it to fade, but using fade does!

Having said that I cant use replicate3d anyway as it reorders the sprites whenever one particle reaches end of life which causes them all to suddenly change.

I've ended up using 6 emitters all on top of each other so that I can have different sprites that don't randomly reorder themselves!

Thanks for your help.


It's goofy, I know. The vertex alpha of the particle isn't changing with alpha, just fade. I think the alpha is just used for the material assigned to the particle, not the particle vertex color. That's just what I can see with 2 minutes of debugging.

As to Replicate3D, yeah, that's also a bummer. Would be nicer if you could control the assignments based on a channel in the particles, but once you hit the pRender, there's not much there. Maybe if you didn't care about color, you could use that? But then you can't use the color.
Chad Capeland
Indicated, LLC
www.floweffects.com

Return to Fusion

Who is online

Users browsing this forum: DoubleTwistedCoil, nixerman and 29 guests