Announcement

Collapse
No announcement yet.

making a flare with pflow - how can I set an omni light as a particle?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • making a flare with pflow - how can I set an omni light as a particle?

    Hi all

    I need to make a flare and I have the whole thing done except for the massive glow. I was thinking of using an omni light and then in max post effects just add lens star effect to the light. This is al good and well but I cant figure out how to make the omni light follow my particle.

    Please some advice!

    Regards,
    Morne
    Kind Regards,
    Morne

  • #2
    http://scriptspot.com/bobo/mxs5/pflo...ingObjects.htm

    Regards,
    Thorsten

    Comment


    • #3
      I changed the script to be like this:

      -----------------------------------------------
      on ChannelsUsed pCont do

      (

      pCont.useTM = true


      )



      on Init pCont do

      (

      global My_Flare01 = $OmniFlare01

      My_Flare01.pos = [0,0,-100000]

      )



      on Proceed pCont do

      (

      partcount = pCont.NumParticles()

      count = amin #(partcount,My_Flare01.count)

      for i in 1 to count do

      (

      pCont.particleIndex = i

      My_Flare01[i].transform = pCont.ParticleTM


      )

      )



      on Release pCont do ( )
      ---------------------------------------------

      My onmi in my scene is called OmniFlare01
      I have various particle systems in my scene. How do I know which particle system it will use?

      I save the script as "myscript.ms" but then when I run it it says "--Type error: Call needs function or class, got true"

      HELP Please anybody!
      Last edited by Morne; 19-11-2008, 06:50 AM. Reason: I modified the script that is in maxrsipt tuts that comes with max
      Kind Regards,
      Morne

      Comment


      • #4
        Hi there,

        take a closer look at Bobo's tut. The script is supposed to be in a PFlow script operator (and hence it will of course use this event only)

        I was automatically assuming you were using PFlow. If not things might get quite some more complicated.

        Regards,
        Thorsten

        Comment


        • #5
          I noticed that I was not suppose to make a seperate ms file but rather just add a "script operator" into my pflow event. I've done that and I sort of got it working with the above script except that the light seems to be lagging behind the particle by 1 frame

          Any hints?
          Kind Regards,
          Morne

          Comment


          • #6
            are you sure it is not only displayed wrong ? (PFLow Sources sample less for viewports plus show different particle counts)

            Regards,
            Thorsten

            Comment


            • #7
              Yes I'm 100% sure. Both in my render and my vieport I can clearly see that the light is behind by 1 frame. Anybody have a clue? I really don't want to manually position the light over 1200 frames.
              Kind Regards,
              Morne

              Comment


              • #8
                you can cheat and move the pivot of the light to be behind the omni slightly that should compensate for the 1 frame offset
                Chris Jackson
                Shiftmedia
                www.shiftmedia.sydney

                Comment


                • #9
                  Originally posted by jacksc02 View Post
                  you can cheat and move the pivot of the light to be behind the omni slightly that should compensate for the 1 frame offset
                  thanks for the tip, but the problem is the movement is not linear. The flare shoots out sideways from aircraft, then falls to the ground in an arc.
                  Kind Regards,
                  Morne

                  Comment


                  • #10
                    Just FYI The line:

                    Code:
                    global My_Flare01 = $OmniFlare01
                    Should read:
                    Code:
                    global My_Flare01 = $OmniFlare01*
                    So it will select ALL objects of the given name

                    Or could be better written if you are using more than 1 light/object:
                    global My_Flare01 = $OmniFlare*
                    To select any and use any object with the name of "OmniFlare" as written it will only look for objects with the name of "OmniFlare01"

                    As for the 1 frame lag between you particle and your light create your particle at frame -1 and end on frame -1.

                    Best regards
                    John
                    particle makes perfect

                    Comment

                    Working...
                    X