Thanks Geoff,
That's a geat help
Danny
-----Original Message-----
From:
[hidden email]
[mailto:
[hidden email]] On Behalf Of Geoff
Hinchcliffe
Sent: 24 April 2008 12:09
To:
[hidden email]
Subject: Re: [Papervision3D] DOF: Blur effects
Hi Dan,
that DOF example does use the effects layer approach.
It's been a while since I played around with it, so I had to remind
myself as to what I'd done...
I think ou could use the effects on a dynamic object with interactive
content.
The effects layers are much like typical Flash effects so they
shouldn't prevent other functionality.
I had a previous version of the DOF where the letters could be
dragged and dropped.
Anyway, the main part of the script is this:
// blur each object relative to z position
for (var c:uint = 1; c<msg.length+1; c++) {
var obj:DisplayObject3D =
planes["plane"+c];
var nm:String = obj.name;
// Remove effect
fxObj[nm].removeEffect(fxObj["fx"+nm]);
// Set blur amount based on sceneZ - z
distance from scene 0 point
var blurAmt:Number =
Math.round((Math.abs(obj.sceneZ)/50)/
blurInc)*blurInc;
fxObj["fx"+nm] =
AbstractEffect(fxObj[nm].addEffect(new
LayerEffect(new BlurFilter(blurAmt, blurAmt, 2))));
obj.renderLayer = fxObj[nm];
}
renderer.renderScene(scene, camera, viewport);
I'm sure it could be more elegantly put together, but you can see the
basic idea.
The loop refers to the planes which are all named in numerical order.
(I've stored them all in an Object because the getChildByName function
wouldn't work for me)
Blur is set using the sceneZ value.
The blurInc is just testing different increments for the blur effect.
Finally the effect is added to the plane.
Hope this helps.
I think there has been mention of plans to integrate effects into GW
but perhaps in a different way to the Effects Branch approach.
cheers, Geoff
On 23/04/2008, at 7:44 PM, Daniel O' Brian wrote:
> Hi Geoff,
>
> Crude you may say it is but it looks like magic to me. Is this using
> the
> effects layer approach?
>
> Also would this allow the effect to be applied to a dynamic object
> with
> interactive content?
>
> On another note is there any indication of how long it will be before
> any of this functionality is merged into GW. I know you guys are busy
> working on GW beta but there's a world of people crying out for this
> stuff out here.
>
> Dan
_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.orgThis email transmission is confidential and intended solely
for the person or organisation to whom it is addressed. If you
are not the intended recipient, you must not copy, distribute
or disseminate the information, or take any action in relation
to it and please delete this e-mail. Any views expressed in
this message are those of the individual sender, except where
the sender specifically states them to be the views of any
organisation or employer. If you have received this message
in error, do not open any attachment but please notify the
sender (above). This message has been checked for all known
viruses powered by Messagelabs. For further information
visit www.messagelabs.com/stats.asp Please rely on your own
virus check as no responsibility is taken by the sender for
any damage rising out of any virus infection this communication
may contain.
LIDA Ltd 36 Golden Square, Soho, London, W1F 9EE, United Kingdom
Reg No. 03860916, registered in the United Kingdom.
_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org