[Papervision3D] Particles and RectangleParticleCuller - how to avoid popup?

epologee e at epologee.com
Fri May 1 05:53:21 PDT 2009


Check out this very simple setup for a particle system with just one
particle. There seems to be something wrong with the culling process of
Papervision, or I'm implementing it very wrong.

Because you add a Particles instances (the particle system) to the scene,
and then add instances of Particle (the individual particles) to the system,
there are two places where culling needs to occur. First the bounding box
(or ~sphere) of the system needs to be culled, and then the individual
particles need culling.

However, I seem to find that this is not working properly. The origin of the
system is culled the instant it reaches the viewport edge, and you get a
popup effect with every particle in your system.

Just copy & paste this class in a Particle.as class, compile it, and move
around with the DebugCamera. This class extends the BasicView, which sets
the viewport.autoCulling to true. 


	import org.papervision3d.cameras.CameraType;
	import org.papervision3d.core.geom.Particles;
	import org.papervision3d.core.geom.renderables.Particle;
	import org.papervision3d.materials.special.BitmapParticleMaterial;
	import org.papervision3d.view.BasicView;

	public class ParticleView extends BasicView {
		public function ParticleView() {
			super(740, 500, false, false, CameraType.DEBUG);

			var sys : Particles = new Particles();
			scene.addChild(sys);
			
			var bmd : BitmapData = new BitmapData(100, 200, false, 0xFF9900);
			var mat : BitmapParticleMaterial = new BitmapParticleMaterial(bmd, 1);
			var prt : Particle = new Particle(mat, 1);
			
			sys.addParticle(prt);
			
			startRendering();
		}
	}


Am I doing something wrong, is PV maybe, or have I misunderstood the
principle of the particle system somehow?
-- 
View this message in context: http://www.nabble.com/Particles-and-RectangleParticleCuller---how-to-avoid-popup--tp23331835p23331835.html
Sent from the Papervision3D mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090501/143c3ef4/attachment.html>


More information about the Papervision3D mailing list