Page 1 of 1

Multiple bitmaps for particle systems

PostPosted: Sun Oct 23, 2016 7:49 pm
by Remo Fritzsche
Dear Community,

I'm trying to create a particle system with multiple, randomly selected bitmaps. How can I achieve this?

And as a follow-up question: What I would actually like to to is to have a FastNoise-Node generating multiple images (as it's animated per default) generating multiple, random particles. Is that possible? I think in after effects you can randomly select frames out of a sequence of images (in this case my FastNoise) and feed it to the particle system.

Thanks for any help,
Remo

Re: Multiple bitmaps for particle systems

PostPosted: Wed Oct 26, 2016 9:32 pm
by michael vorberg
the pEmitter lets you choose between "particle age", "particle birth time" and "over time"
so if you have an animated source for the bitmap style "particle birth time" is the closest to random select one. but now every particle born on this frame will have the same bitmap.

but you can create several pEmitter with a different offset, pMerge them together and then modify/render them. so you get semi random styles for the particles

Re: Multiple bitmaps for particle systems

PostPosted: Fri Oct 28, 2016 2:59 pm
by Ryan Hays
Create an image sequence of your different bitmaps, pipe that into a time stretcher. Put a Random modifier on the Time Stretcher's source time with the maximum being the number of frames in your image sequence. Pipe that into your particle emitter = random bitmap per particle.

Re: Multiple bitmaps for particle systems

PostPosted: Sat Oct 05, 2019 8:18 pm
by Paul R. Williams
Ryan Hays wrote:Create an image sequence of your different bitmaps, pipe that into a time stretcher. Put a Random modifier on the Time Stretcher's source time with the maximum being the number of frames in your image sequence. Pipe that into your particle emitter = random bitmap per particle.

Thanks, Ryan. Great answer that solved my problem. I used floor(rand(1,13) to select the random frame from the (0 to) 13 frame sequence. I also had to set the Emitter style to Bitmap and the Animate to "Particle Birth Time" to avoid the random bitmap selected on creating the particles changing during their lifetime.

Re: Multiple bitmaps for particle systems

PostPosted: Sat Sep 14, 2024 8:10 am
by Adrian Mcyorian
Create an image sequence of your different bitmaps, pipe that into a time stretcher. Put a Random modifier on the Time Stretcher's source time with the maximum being the number of frames in your image sequence. Pipe that into your particle emitter = random bitmap per particle.

Can you explain this please?

Re: Multiple bitmaps for particle systems

PostPosted: Sat Sep 14, 2024 9:27 am
by KrunoSmithy
If you want random , probably don't need the time stretcher.

Something like this maybe. Replace "SequanceLoader" with your image sequance.

Code: Select all
{
   Tools = ordered() {
      SequanceLoader = Loader {
         Clips = {
            Clip {
               ID = "Clip1",
               Filename = "E:\\--- SandRain\\sssds\\Black & White Portraits\\sequance1.jpg",
               FormatID = "JpegFormat",
               StartFrame = 1,
               Length = 43,
               LengthSetManually = true,
               TrimIn = 0,
               TrimOut = 42,
               ExtendFirst = 0,
               ExtendLast = 0,
               Loop = 0,
               AspectMode = 0,
               Depth = 0,
               TimeCode = 0,
               GlobalStart = 2,
               GlobalEnd = 44
            }
         },
         CtrlWZoom = false,
         NameSet = true,
         ViewInfo = OperatorInfo { Pos = { 995.877, 234.588 } },
         UserControls = ordered() {
            MakeLocal = {
               INP_Default = 0,
               INPID_InputControl = "ButtonControl",
               BTNCS_Execute = "                  args = { tool = comp.ActiveTool, copyTree = true }\n                  path = comp:MapPath(\"Scripts:support/Loader_MakeLocal.lua\")\n                  comp:RunScript(path, args)\n               ",
               IC_ControlPage = 0,
               LINKID_DataType = "Number",
               LINKS_Name = "Make Local",
            }
         }
      },
      pEmitter1 = pEmitter {
         ID = 39,
         Inputs = {
            Number = Input { Value = 1, },
            NumberVariance = Input { Value = 8.6, },
            Lifespan = Input { Value = 250, },
            LifespanVariance = Input { Value = 47.1, },
            PositionVariance = Input { Value = 0.0556, },
            TemporalDistribution = Input { Value = 1, },
            Style = Input { Value = FuID { "ParticleStyleBitmap" }, },
            ["ParticleStyleBitmap.Animate"] = Input { Value = 2, },
            ["ParticleStyleBitmap.DropToolsHere"] = Input {
               SourceOp = "SequanceLoader",
               Source = "Output",
            },
            Region = Input { Value = FuID { "BitmapRgn" }, },
            ["SphereRgn.Size"] = Input { Value = 1, },
            ["BitmapRgn.Bitmap"] = Input {
               SourceOp = "FastNoise1",
               Source = "Output",
            },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1BlurOverLife2D",
               Source = "Value",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1147.88, 234.588 } },
      },
      pEmitter1SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.3, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.7, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 0 },
         NameSet = true,
      },
      pEmitter1BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.3, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.7, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 0 },
         CtrlWZoom = false,
         NameSet = true,
      },
      pRender1 = pRender {
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            GlobalIn = Input { Value = 2, },
            GlobalOut = Input { Value = 251, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            OutputMode = Input { Disabled = true, },
            PreGenerateFrames = Input { Value = 250, },
            KillParticlesThatLeaveTheView = Input { Value = 1, },
            ["MaterialID.MaterialID"] = Input { Value = 1, },
            ["ObjectID.ObjectID"] = Input { Value = 1, },
            Input = Input {
               SourceOp = "pEmitter1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1289.21, 234.588 } },
      },
      Merge3D2 = Merge3D {
         Inputs = {
            SceneInput1 = Input {
               SourceOp = "pRender1",
               Source = "Output",
            },
            SceneInput2 = Input {
               SourceOp = "Camera3D1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1437.88, 234.588 } },
      },
      FastNoise1 = FastNoise {
         Inputs = {
            GlobalIn = Input { Value = 2, },
            GlobalOut = Input { Value = 251, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            XScale = Input { Value = 8.56, },
            Inverted = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 1147.88, 292.164 } },
      },
      Camera3D1 = Camera3D {
         NameSet = true,
         CustomData = {
            Settings = {
               [1] = {
                  Tools = ordered() {
                     Camera3D1 = Camera3D {
                        Inputs = {
                           ApertureW = Input { Value = 0.831496062992126 },
                           AoV = Input { Value = 19.2642683071402 },
                           ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" } },
                           ["MtlStdInputs.MaterialID"] = Input { Value = 1 },
                           ApertureH = Input { Value = 0.467716535433071 },
                           FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" } },
                           ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1 }
                        },
                        Name = "Camera3D1",
                        CtrlWZoom = false,
                        NameSet = true,
                        ViewInfo = OperatorInfo { Pos = { 550, 214.5 } },
                        CustomData = {
                        }
                     }
                  }
               },
               [6] = {
                  Tools = ordered() {
                     Camera3D1 = Camera3D {
                        Inputs = {
                           FLength = Input { Value = 49.0568334445481 },
                           ["Transform3DOp.Translate.Z"] = Input { Expression = "self.ImageInput.Metadata.Translate.Z" },
                           ImagePlaneEnabled = Input { Value = 0 },
                           AoV = Input {
                              Value = 19.2642683071402,
                              Expression = "self.ImageInput.Metadata.RSCameraFOV or self.ImageInput.Metadata['rs/camera/fov']"
                           },
                           AovType = Input { Value = 1 },
                           ["Transform3DOp.Rotate.Y"] = Input { Expression = "self.ImageInput.Metadata.Rotate.Y" },
                           ApertureH = Input { Value = 0.9 },
                           FilmGate = Input { Value = FuID { "HD" } },
                           ["Transform3DOp.Rotate.X"] = Input { Expression = "self.ImageInput.Metadata.Rotate.X" },
                           ["Transform3DOp.Translate.X"] = Input { Expression = "self.ImageInput.Metadata.Translate.X" },
                           PlaneOfFocus = Input { Expression = "self.ImageInput.Metadata.RSCameraDOFFocusDistance or self.ImageInput.Metadata['rs/camera/DOFFocusDistance']" },
                           FilmBack = Input { Value = 1 },
                           ["Transform3DOp.Rotate.RotOrder"] = Input { Value = FuID { "ZXY" } },
                           ["Transform3DOp.Rotate.Z"] = Input { Expression = "self.ImageInput.Metadata.Rotate.Z" },
                           ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" } },
                           ApertureW = Input { Value = 1.6 },
                           ["Transform3DOp.Translate.Y"] = Input { Expression = "self.ImageInput.Metadata.Translate.Y" },
                           ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1 },
                           ["MtlStdInputs.MaterialID"] = Input { Value = 1 }
                        },
                        CtrlWZoom = false,
                        NameSet = true,
                        ViewInfo = OperatorInfo { Pos = { 387, 145 } },
                        CustomData = {
                        }
                     }
                  }
               }
            }
         },
         Inputs = {
            ["Transform3DOp.Translate.Z"] = Input { Value = 1.76, },
            ["Transform3DOp.UseTarget"] = Input { Value = 1, },
            AovType = Input { Value = 2, },
            FLength = Input { Value = 32.9697081995756, },
            ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" }, },
            FilmBack = Input { Value = 1, },
            FilmGate = Input { Value = FuID { "ArriAlexa16x9" }, },
            ApertureW = Input { Value = 0.937007874015748, },
            ApertureH = Input { Value = 0.52755905511811, },
            PlaneOfFocusVis = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 1437.88, 293.376 } },
      },
      Renderer3D1 = Renderer3D {
         CustomData = {
            ToolVersion = 2,
         },
         Inputs = {
            ["RendererSoftware.ShadowsEnabled"] = Input { Value = 1, },
            ["RendererSoftware.Channels.Nest"] = Input { Value = 1, },
            ["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
            GlobalIn = Input { Value = 2, },
            GlobalOut = Input { Value = 251, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            AutoCropDataWindow = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SceneInput = Input {
               SourceOp = "Merge3D2",
               Source = "Output",
            },
            RendererType = Input { Value = FuID { "RendererOpenGL" }, },
            ["RendererOpenGL.AntiAliasing.Channels.RGBA.HighQuality.Enable"] = Input { Value = 1, },
            ["RendererOpenGL.AntiAliasing.Presets.Nest"] = Input { Value = 1, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Supersampling.HighQuality.Rate"] = Input { Value = 5, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Multisampling.LowQuality.SampleCount"] = Input { Value = 2, },
            ["RendererOpenGL.AntiAliasing.Presets.Color.Multisampling.HighQuality.SampleCount"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Supersampling.HighQuality.Rate"] = Input { Value = 3, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Multisampling.LowQuality.SampleCount"] = Input { Value = 2, },
            ["RendererOpenGL.AntiAliasing.Presets.Aux.Multisampling.HighQuality.SampleCount"] = Input { Value = 3, },
            ["RendererOpenGL.AccumQuality"] = Input { Value = 32, },
            ["RendererOpenGL.MaximumTextureDepth"] = Input { Value = 3, },
            ["RendererOpenGL.TransparencySorting"] = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 1598.54, 234.588 } },
         SubInputsData = {
            RendererOpenGL = {
               Version = 1
            }
         }
      }
   }
}

Re: Multiple bitmaps for particle systems

PostPosted: Sun Sep 15, 2024 9:06 am
by Adrian Mcyorian
KrunoSmithy wrote:If you want random , probably don't need the time stretcher.

Something like this maybe. Replace "SequanceLoader" with your image sequance....

Oh Dear! thank you!, that time strecher node from hell was making me crazy, i think Black magic should put attention to some nodes that are really really confusing!

Re: Multiple bitmaps for particle systems

PostPosted: Sun Sep 15, 2024 9:25 am
by KrunoSmithy
Adrian Mcyorian wrote:Oh Dear! thank you!, that time strecher node from hell was making me crazy, i think Black magic should put attention to some nodes that are really really confusing!


Well, TimeStrecher was meant to be in fusion what retime features are in the edit page.

The Time Stretcher node is similar to the Time Speed node but permits the speed of the clip to be animated. Full spline control of the effect is provided, including smoothing. As a result, the Time Stretcher can be used to animate a single clip to 200, back to normal speed, pause for a second, and then play backward.

It is frame interpolation with retiming, using a spline curve to adjust time nonlinearly. To apply constant time changes such as frame rate changes, use a Time Speed instead.

When operating in Flow mode, Optical Flow data is required. This node does not generate optical flow directly; you must create it manually upstream using an Optical Flow node or by loading the forward/ reverse vector channels from disk.

Flow Stretcher does not interpolate the aux channels but instead destroys them. In particular, the Vector/BackVector channels are consumed/destroyed. Add an Optical Flow after the Flow Stretcher if you want to generate flow vectors for the retimed footage.

For fusion studio users for long time that was the only way to retime clips or individual effects and still is in many ways. For Resolve users of fusion page, there are other options in edit page and of course many third party plug ins that are more advanced at this point. ReVission Effects are may favorite. Boris FX also released some retiming machine learning boosted plug ins as well etc.

Time speed and time stretcher are still very useful nodes in fusion, although not the most intuitive nodes to use I would agree. They can be quite useful though. Motion graphics for example. Now just VFX or to slow down or speed up individual nodes and effects.