[Papervision3D] R: Z-ordering demo

Alexander Zadorozhny alexander.zadorozhny at gmail.com
Fri Apr 6 16:50:31 EDT 2007


Hi Jacopo

Well, there is not an easy answer :)

On the one hand, you can try to incorporate extrusive z-ordering in
current Papervision, I think it should fit somewhere in
DisplayObject3D class, just before the line
>  iFaces.sortOn( 'screenZ', Array.DESCENDING | Array.NUMERIC );
Code for that can be found in AnotherRivalFilter class in demo sources.

This isn't going to be very easy though, as you will need to gather
some additional data in (unnamed) IFace class here and there. And
naive z-extrusion implementation efficiency can turn out to be O(N^2)
(require comparation each triangle with another), so you may want to
use more specialized storage for ifaces than array (I used quandrant
tree for that matter) to speed up neighbour lookup.

On the other hand you can try using aforementioned AnotherRivalFilter
with the pv3d sources from demo. Those feature few minor
incompatibilities from the end user side (such as
DisplayObjectContainer3D.addChild() returns void, Collada is built
from xml, rather than loaded from url) and some primitives are
missing. In return you can specify  z-extrusion filter directly in
render call, render clipping is present (defaults to screen if stage
align is TOP_LEFT) and under some circumstances I noticed slight fps
increase while rendering without filters comparing to original
rendering (as for the pv3d revision I started playing with, I guess it
was the 50th rev).

However, doing so you face the risk of missing new features of
Papervision when they will be available in case I will not be able to
adapt my branch to them or having to revert your application back to
pv3d.

Either way has its drawbacks.

wbr,
Alexander

On 4/6/07, Jacopo Dagnino <bekamaster at elventech.com> wrote:
> Very nice work Alex!
> I'm new of papervision3D, I've done some experiment for a RTS-like game in
> PV3D and I immediatly found the z-buffer order bug :(
> How can I use your z-order system in my experiment?
>
> Tnx a lot.
>
> Jacopo "Beka Master" Dagnino
>
> -----Messaggio originale-----
> Da: Papervision3D-bounces at osflash.org
> [mailto:Papervision3D-bounces at osflash.org]Per conto di Alexander
> Zadorozhny
> Inviato: giovedi 5 aprile 2007 15.57
> A: Papervision3D at osflash.org
> Oggetto: Re: [Papervision3D] Z-ordering demo
>
>
> I think forgot to mention the source code for the demo is available as
> well, for those who are interested it's here
> http://away.kiev.ua/flash/
>
> On 4/5/07, Alexander Zadorozhny <alexander.zadorozhny at gmail.com> wrote:
> > Hi all!
> >
> > I just has (half-)completed another demo on second topic that is vital
> > for me in 3d-flash, correct z-ordering. While I'm not completely
> > satisfied with obtained result, I'd like to hear your opinion on it.
> > http://away.kiev.ua/flash/zorder/ZOrderDemo.html
> > Though I managed to render almost any scene without z-ordering
> > artifacts, rendering superposed meshes is now a serious bottleneck, as
> > it requires splitting crossing faces. Fight is not finished yet, but I
> > have a feeling I've overlooked something, and there's an easier way ;)
> >
> > Alexander Zadorozhny
> >
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>



More information about the Papervision3D mailing list