Klepto minib3d particles

BlitzMax Modules Forums/MiniB3D/Klepto minib3d particles

Hello,

Is the particle extension functionnal? Anytime I have something happening it crashes. Could someone post a simple example or just indicate me how to initilaise an emitter and update it?

Thanks

hi LAB[au],
here is a small sample just a simple emitter without any aditional emitters. But I will provide a better sample as soon as I have finished my particle Editor.

http://klepto2.kl.funpic.de/DL/smallparticlesample.rar

Thanks! There is just this part of the Emitter.Update method that I am not understanding ... seems there is no way of having 1 particle emitted each 5 seconds f.e.

Local Mode:Int = (TParticleSystem.Cam.range_far / 10)
			Local MM:Int = (Mode/(TParticleSystem.Cam.range_far/TParticleSystem.Cam.VectorDistance(Position) ))	
			If MM = 0 Then MM = 1
			Local Diff:TVector = Position.Subtract(OldPosition)
			Local Rate:Int = Max(Emitter_Rate/MM,1)
			Diff = Diff.Divide(Rate)
			If Emitter_Rate = 0 Then Rate = 0
			'Print Emitter_Rate + ":" + Mode + "-->"+(Emitter_Rate/Max(Mode,1)) + " / " + (Mode/(TParticleSystem.Cam.range_far/TParticleSystem.Cam.VectorDistance(Position) ))					
			For Local I:Int = 0 To Rate-1
...


In fact what I am missing is how you keep track of time (I assume Rate is expressed in particles/second).

the particle code ic currently early beta and this part is some kind of LOD handling. eg: if you're near the Emitter it will emit the full particles, if you go further away from the emitter the particle count is reduced by the distance. Currently it acts very fast so you have to be really near if you want to have the full particle count. In the future I will provide an option to disable the LOD and I will optimize it that LOD will act first at a certain distance.