Filters3D don’t work on the view

Software: Away3D 4.x

Avatar
Austen, Newbie
Posted: 16 May 2012 12:52 AM   Total Posts: 21

Hi there,

I’m trying to apply some bloom or dof filters on my view, but the app doesnt work anymore when i do that :

view = new View3D();
  view.scene = scene;
  view.camera = camera;
  view.antiAlias = 4;
  addChild(view);
view.filters3d = [new DepthOfFieldFilter3D(3,3)];

it seemed quite easy…
did i do something wrong?
thanks for your lights

   

Arno, Newbie
Posted: 16 May 2012 01:54 PM   Total Posts: 25   [ # 1 ]

I think you also have to set other properties. focusDistance and focusTarget. Not sure why they aren’t included in the constructor. Here a example:

var depthOfFieldFilter3D:DepthOfFieldFilter3D = new DepthOfFieldFilter3D();
depthOfFieldFilter3D.focusDistance = 2000;
depthOfFieldFilter3D.focusTarget = mesh;
_view.filters3d = [depthOfFieldFilter3D];

==edit

I think AntiAlias is set to 0/1 when you use the DepthOfFieldFilter3D

   

Avatar
Austen, Newbie
Posted: 16 May 2012 06:46 PM   Total Posts: 21   [ # 2 ]

thanks Arno! you made my day.
and well, yes AntiAlias is set to 0 when you add it… that’s sad.
can’t we use a Vector3D for the .focusTarget? would have been nice to play with the focus point.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X