Combining fogfilter (or zdepthfilter) and ownCanvas

3 views
Skip to first unread message

Benoit Beausejour

unread,
Jun 11, 2008, 12:36:42 PM6/11/08
to away3d.dev

Hi !

I've been toying around with Fog filtering and encountered some
problems on object that use ownCanvas. From looking over the code (I'm
not yet familiar with all the internals) and it seems that ownCanvas
actually create a render session for the object, then it's treated at
filtering at one single screen vertex.

This is causing some problems when you combine fog filtering with
ownCanvas on large objects for example , causing the center of the
object to be the z for all it's polygons so fogging doesn't appear
correctly.

I'm not sure how to address this as I'm not yet familiar with the
pipeline. I think it's the kind of combination that can prove useful
in certain projects.

Any pointers ?

-b

Fabrice

unread,
Jun 11, 2008, 3:14:58 PM6/11/08
to away3...@googlegroups.com
yes the fog filter sets layers at screen size between the sprites set
on screen, it does not make the difference if its a sprite with nested
children.
so its in front or behind.

so say we would change the render loop for the fog and trace the fog
within the container: bye bye filter... because it is screen size.

One possible option for this technic would be using the xy coordinates
of each tris within the layered child, and draw a sort of masked fog
shape, not impossible but it might be very expensive.
but we would know for sure if someone try it...

Another option would be to calculate the in betweens of the fog layers
and their influence, then set the resulting color to each tri within
the container using a colortransform.

And there is probably another one: the one that works....

Fabrice

Reply all
Reply to author
Forward
0 new messages