I have a scene where I have a skyball and a terrain extrusion with
characters on the terrain.

To save processor I have applied farfield culling to the terrain, I
added the terrain and all characters on the terrain to an
ObjectContainer3D and use a ZDepthFilter renderer on that:

container3D=new ObjectContainer3D()
container3D.ownCanvas=true
var zdepth:ZDepthFilter=new ZDepthFilter(cull_distance)
container3D.renderer=new BasicRenderer(zdepth)



This works very nicely though I'd like to soften the abruptness of the
culling. Is there anyway I could implement some kind of fade?

I've looked at the fog filter, thinking I could use some kind of alpha
fading. I can't even get the fog filter to work on the
ObjectContainer3D though.
I'm trying:

var fogMaterial = new ColorMaterial(0xFF0000) //red to definitely see
if something happens
var fog=new FogFilter({minZ:cull_near, maxZ:cull_far, subdivisions:8,
material:fogMaterial})
container3D.renderer=new BasicRenderer(fog)



Can anybody suggest a solution here?
Is it possible to fogfilter an object container?
Is there a better way to implement a faded culling?

Thanx


Reply via email to