1 Reply Latest reply on May 13, 2006 7:07 PM by fsartist

    Static 3D Star Field using particles

    fsartist

      I'm interested in creating a star field, and I'm assuming particles is the best way to achieve this. I've been looking at some examples of creating particle systems, and the basics aren't too hard. But I'm not looking to create moving particles, I need particles that are spawned immediately and don't move. Essentially, a static star field. So that I can move a camera through the 3d scene and particles myself.

      I'd appreciate any help on achieving this!
        • 1. Re: Static 3D Star Field using particles
          fsartist Level 1

          I've come up with a partial solution, by doing the following in the model's beginsprite:

          repeat with z = -5 to 100
          partres = w3d.newModelResource("pres"&z, #particle)
          partres.emitter.region = [vector( -2000, -1000,z*300),vector( 2000,-1000,z*300),vector(-2000,2000,z*300),vector( 2000,2000,z*300)]
          partres.emitter.numparticles = 500
          partres.emitter.loop=0
          partres.emitter.mode=#burst
          partres.lifetime = 999999999999
          partres.emitter.maxspeed = 0
          partres.emitter.minspeed = 0
          partmod = w3d.newModel("pmod"&z, partres)
          end repeat

          This does what I wanted to a degree.. by creating multiple planes of emitters, I give an illusion of a star field. But the problem I'm encountering is that the particles seem to blink in and out of existence every few seconds. I'm using #burst, so they all spawn at once, and with loop=0 they should not be reborn (since I thought perhaps loop was the problem).. but they still keep blinking in and out. Anyone know what could cause this?