DepthOfFieldFilter3D doesn’t include ground plane

Software: Away3D 4.x

mattmogford, Newbie
Posted: 10 July 2013 01:39 PM   Total Posts: 23

Hi All,

As described in the title I get a strange effect as shown in the screenshot.

My code is as follows :

private function setupAway3D():void
{
 _view 
= new View3D();
 
_view.stage3DProxy = Global.stage3DProxy;
 
_view.shareContext true;
 
 
_dofFilter = new DepthOfFieldFilter3D2020 );
 
_dofFilter.range 3000;
 
_view.filters3d [ _dofFilter ];
 
this.addChild_view );
   
 
_view.camera _camera = new Camera3D;
 
_dofFilter.focusTarget _camera;
   
 
stage.addEventListenerflash.events.Event.RESIZEonResize );
 
onResize();

I hope someone can help with this.

Thanks
Matt

 

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 10 July 2013 07:42 PM   Total Posts: 166   [ # 1 ]

Hi, again.

_dofFilter = new DepthOfFieldFilter3D2020 );
 
_dofFilter.range 3000;
 
_dofFilter.distance 1000//If you dont have a target, set distance from camera.
 
_view.filters3d [ _dofFilter ];
 
this.addChild_view );

 
_view.camera _camera = new Camera3D;
// _dofFilter.focusTarget = _camera; //You have to set a target that forcused by camera. 

 

   

mattmogford, Newbie
Posted: 11 July 2013 09:07 AM   Total Posts: 23   [ # 2 ]

Thanks for the help.
Though still having some problems.

The property .distance on _dofFilter doesn’t exist.
But focusDistance does, so I tried that and get the same effect.

Also, I would want all objects to be subject to the DoF, so setting a single target wouldn’t be enough;

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 11 July 2013 09:43 AM   Total Posts: 166   [ # 3 ]
// _view.stage3DProxy = Global.stage3DProxy;
// _view.shareContext = true; 

Can you test to comment out these lines?

   

mattmogford, Newbie
Posted: 16 July 2013 01:33 PM   Total Posts: 23   [ # 4 ]

Hi,

Those two lines are integral to the game starting as I’m using a Starling overlay for score and time counters.

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 16 July 2013 04:38 PM   Total Posts: 166   [ # 5 ]

Did you test without these lines?
If you get correct working with the test,
the problem is in sharing the context or sharing the proxy.
At first, you should find where is the problem.
We can’t see all of your code.
Cheers.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X