DepthOfFieldFilter3D doesn’t work, but RadialBlurFilter3D does… what am I doing wrong ?

Software: Away3D 4.x

SuperSam, Sr. Member
Posted: 07 November 2013 05:11 PM   Total Posts: 102

Hi,

I must be dumb or something: I can’t get DepthOfFieldFilter3D to work. It keeps displaying a black screen. Scout shows that the scene is rendered correctly and then the filter is processed and everything turns black.

I tried RadialBlurFilter3D and it works properly. What’s up ? I stumbled on this because I made a custom filter and encountered the same issue as DepthOfFieldFilter3D. Both filters seem to suffer the same problem so let’s concentrate on depth of field.

// Doesn't work
view.filters3d [new DepthOfFieldFilter3D()];

// Works
view.filters3d [new RadialBlurFilter3D()]


Also, what is the most straightforward way to make the 3D filters ignore the skybox ?


Thanks !

   

SuperSam, Sr. Member
Posted: 08 November 2013 01:02 PM   Total Posts: 102   [ # 1 ]

I put this issue on the side after posting this. Coming back to it, I noticed that it’s stupidly simple, DepthOfField requires that properties are set, like distance and range. I wrongly assumed that since no constructor arguments are mandatory, other values had decent defaults or could retrieve distance and range from the view camera. Silly me.

I’ve been set off track because my custom filter seemed to have the same issue. But there are countless ways to get a black screen and shader debugging is hell, which means it had nothing to do with DepthOfField ^^’

So both issues are fixed now.


The side-but-more-important question about the skybox still stands though !

I don’t see any simple way to achieve this. Even if that means modifying Away3D, do you guys see something ?

This could be useful to you as well because due to a bug you currently can’t use a Filter3D, a ParticleGroup and a Skybox together in one scene. (ParticleGroup is from effecthub.com and made by Cheng Liao)
(more on that bug here)

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X