Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Any Alpha Culling in WPF/3D ?

 
 
Old 04-02-2006   #1 (permalink)
Lois Lacroux


 
 

Any Alpha Culling in WPF/3D ?

I want to draw multiple objects, in a 3D Viewport, with textures possibly
having an alpha channel on them. The material itself is not transparent, its
opacity is 1.0.

What I see for the moment is a strange behavior, the "transparent" part of
some objects hides the rest of the scene. This seems to comes from the
zBuffer conflicting with the transparency.
As far as I understood there is no way to disable zWriting in WPF (except
using Emissive Material, but I don't want to blend the whole objects, I just
need some transparency on textures.)
So my question is , is there some sort of alpha culling in WPF. Avoiding the
contribution of a pixel, under a certain alpha threshold, in the colorBuffer
AND the zBuffer?


My System SpecsSystem Spec
Old 04-02-2006   #2 (permalink)
TheRHogue


 
 

RE: Any Alpha Culling in WPF/3D ?

WPF 3D doesn't z order the objects. When dealing with transparency on
materials, the author must handle the z-order.

I have a sample in my sample pack at http://www.therhogue.com/WinFX - the
collageview sample.

As one poster commented, this is a lot of heavy lifting, and I agree. When
dealing with circular transparency, the app must be architected correctly to
allow for proper arrangement of geometries with transparent
material...without proper architecture the devloper will hit a dead end.

I can only hope zbuffer sorting is a feature for WPF version 2.0 as it may
be easier for the WPF team to create a flat tree for ordering rather than
have everyone else have to invent this framework wheel.


"Lois Lacroux" wrote:

> I want to draw multiple objects, in a 3D Viewport, with textures possibly
> having an alpha channel on them. The material itself is not transparent, its
> opacity is 1.0.
>
> What I see for the moment is a strange behavior, the "transparent" part of
> some objects hides the rest of the scene. This seems to comes from the
> zBuffer conflicting with the transparency.
> As far as I understood there is no way to disable zWriting in WPF (except
> using Emissive Material, but I don't want to blend the whole objects, I just
> need some transparency on textures.)
> So my question is , is there some sort of alpha culling in WPF. Avoiding the
> contribution of a pixel, under a certain alpha threshold, in the colorBuffer
> AND the zBuffer?
>

My System SpecsSystem Spec
Old 04-02-2006   #3 (permalink)
Jordan Parker [MSFT]


 
 

Re: Any Alpha Culling in WPF/3D ?

Not that this helps you, but SpecularMaterial doesn't write to Z either.

Jordan

>I want to draw multiple objects, in a 3D Viewport, with textures possibly
> having an alpha channel on them. The material itself is not transparent,
> its
> opacity is 1.0.
>
> What I see for the moment is a strange behavior, the "transparent" part of
> some objects hides the rest of the scene. This seems to comes from the
> zBuffer conflicting with the transparency.
> As far as I understood there is no way to disable zWriting in WPF (except
> using Emissive Material, but I don't want to blend the whole objects, I
> just
> need some transparency on textures.)
> So my question is , is there some sort of alpha culling in WPF. Avoiding
> the
> contribution of a pixel, under a certain alpha threshold, in the
> colorBuffer
> AND the zBuffer?
>



My System SpecsSystem Spec
Old 04-03-2006   #4 (permalink)
Lois Lacroux


 
 

RE: Any Alpha Culling in WPF/3D ?

Thanks for the answer,

It's too bad that zWriting cannot be disabled, at least I could have perform
a non-orderer drawing pass only for "transparent" objects.

It's strongly limiting the capacity of WPF/3D regarding transparent objects,
and I'm sure that there is plenty of 3D scene or UIs where transparency is
involved.
And I'm not speaking of intersecting transparent objects.

Lois

"TheRHogue" wrote:

> WPF 3D doesn't z order the objects. When dealing with transparency on
> materials, the author must handle the z-order.
>
> I have a sample in my sample pack at http://www.therhogue.com/WinFX - the
> collageview sample.
>
> As one poster commented, this is a lot of heavy lifting, and I agree. When
> dealing with circular transparency, the app must be architected correctly to
> allow for proper arrangement of geometries with transparent
> material...without proper architecture the devloper will hit a dead end.
>
> I can only hope zbuffer sorting is a feature for WPF version 2.0 as it may
> be easier for the WPF team to create a flat tree for ordering rather than
> have everyone else have to invent this framework wheel.
>
>
> "Lois Lacroux" wrote:
>
> > I want to draw multiple objects, in a 3D Viewport, with textures possibly
> > having an alpha channel on them. The material itself is not transparent, its
> > opacity is 1.0.
> >
> > What I see for the moment is a strange behavior, the "transparent" part of
> > some objects hides the rest of the scene. This seems to comes from the
> > zBuffer conflicting with the transparency.
> > As far as I understood there is no way to disable zWriting in WPF (except
> > using Emissive Material, but I don't want to blend the whole objects, I just
> > need some transparency on textures.)
> > So my question is , is there some sort of alpha culling in WPF. Avoiding the
> > contribution of a pixel, under a certain alpha threshold, in the colorBuffer
> > AND the zBuffer?
> >

My System SpecsSystem Spec
Old 04-15-2006   #5 (permalink)
damien morton


 
 

Re: Any Alpha Culling in WPF/3D ?

The trick here, if you can get away with it, is to use an emssive
material with alpha - the operation is strictly additive, and so
order-independant.

Works best for me against dark backgrounds.

As for intersecting objects - its not just about intersection, but you
can also set up non-intersecting polygons A,B,C so that A overlaps B
which overlaps C which overlaps A. Theonly way to resolve that is to
split one of the polygons.

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Alpha-Sign VB Script
Fastest Image Viewer/Culling tool for Vista, WIC and DirectX based Vista General
Alpha Five Printer Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46