[Papervision3D] Effects branch ParticleField
-a-
aYo at binitie.com
Wed Dec 26 01:47:33 PST 2007
Hi Andy,
Sorry about this but, I cannot seem to find my blur on the
ParticleField. Can you give this the once over?
a/
public function createFXLayer():void
{
//CREATE THE EFFECT LAYER
_fx = new EffectLayer();
//_vport.addRenderLayer(_fx);
//_fx.addEffect(new LayerEffect(new BlurFilter(12, 12, 4)));
//_fx.addEffect(new LayerEffect(new GlowFilter(0xff0000)));
_bfx = new BitmapEffectLayer(_c.width,_c.height, true, 0,
BitmapClearMode.CLEAR_POST, true, false);
_bfx.addEffect(new BitmapLayerEffect(new BlurFilter(6, 4,
4), false));
_vport.addRenderLayer(_bfx);
_bfx.drawCommand = new BitmapDrawCommand(null, new
ColorTransform(0.1, 1, 0.1, 0.25), BlendMode.ADD);
}
> For the bitmap effect layer, add a BitmapLayerEffect instead of a
> LayerEffect. It applies the affect on pre/post render (whichever you
> choose) on the bitmap data, instead of adding a filter to the container.
>
> _bfx.addEffect(new BitmapLayerEffect(new BlurFilter(12, 12, 2)));
>
> A blur of 12 will wipe out pixel data really fast, so if you want to have
> the affect applied as a pre-render affect - you need to tell the
> BitmapLayerEffect that it is NOT a post effect. You can do this by passing
> false to the second parameter of the BitmapLayerEffect.
>
> _bfx.addEffect(new BitmapLayerEffect(new BlurFilter(12, 12, 2), false
> /*isPostRender*/));
>
> Now, the blur will be applied to the bitmapdata before the content is
> rendered each time - so you will still get clear pixels, but the trails will
> blur out behind them :)
>
> Hth!
>
> -----Original Message-----
> From: papervision3d-bounces at osflash.org
> [mailto:papervision3d-bounces at osflash.org] On Behalf Of -a-
> Sent: Tuesday, December 25, 2007 8:05 PM
> To: papervision3d at osflash.org
> Subject: Re: [Papervision3D] Effects branch ParticleField
>
> Thanks thats cracked that, now how to I associate the pfield with an
> effect, at the moment this is what I have and I get diddly squat:
> public function createFXLayer():void
> {
> //CREATE THE EFFECT LAYER
> _fx = new EffectLayer();
> _vport.addRenderLayer(_fx);
>
> _fx.addEffect(new LayerEffect(new BlurFilter(12, 12, 4)));
> _fx.addEffect(new LayerEffect(new GlowFilter()));
>
> _bfx = new BitmapEffectLayer(_c.width,_c.height, true, 0,
> BitmapClearMode.CLEAR_POST, false, false);
> _bfx.addEffect(new LayerEffect(new BlurFilter(12, 12, 2)));
> _vport.addRenderLayer(_bfx);
>
>
>
> }
>
> What am I missing??
>
> a/
>
>> What a wicked man you are. Thats simply vicious. I love it.
>>
>>
>>> The trail is actually a "feature" of the BitmapEffects - the persistence
>>> lets you create cool effects. To have the bitmap cleared each render,
>>>
> you
>
>>> need to pass the clearBeforeRender variable through the bfx constructor:
>>>
>>>
>>> bfx = new BitmapEffectLayer(stage.stageWidth, stage.stageHeight, true
>>> /*transparent*/,
>>> 0 /*fillColor*/,
>>> BitmapClearMode.CLEAR_PRE /*clearMode*/,
>>> true /*renderAbove*/,
>>> true /*clearBeforeRender*/);
>>>
>>>
>>> If you want to create vapors/ghosts - you can also apply a Blur Effect to
>>> the layer which will fade those trails over time.
>>>
>>> Hth!
>>>
>>> -----Original Message-----
>>> From: papervision3d-bounces at osflash.org
>>> [mailto:papervision3d-bounces at osflash.org] On Behalf Of -a-
>>> Sent: Monday, December 24, 2007 9:26 PM
>>> To: papervision3d at osflash.org
>>> Subject: [Papervision3D] Effects branch ParticleField
>>>
>>> Oh Andy, whilst enjoying your birthday cake, just something to think
>>> about. There is something wrong with the ParticleField class in the
>>> Effects branch. When it is animated it leaves a bitmap trail.
>>>
>>> a/
>>>
>>> _______________________________________________
>>> Papervision3D mailing list
>>> Papervision3D at osflash.org
>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>>
>>> _______________________________________________
>>> Papervision3D mailing list
>>> Papervision3D at osflash.org
>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>>
>>>
>>>
>>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>>
>>
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
>
More information about the Papervision3D
mailing list