Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Any Alpha Culling in WPF/3D ?

Closed Thread
 
Thread Tools Display Modes
Old 04-02-2006   #1 (permalink)
Lois Lacroux
Guest


 

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?

Old 04-02-2006   #2 (permalink)
TheRHogue
Guest


 

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?
>

Old 04-02-2006   #3 (permalink)
Jordan Parker [MSFT]
Guest


 

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?
>



Old 04-03-2006   #4 (permalink)
Lois Lacroux
Guest


 

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?
> >

Old 04-15-2006   #5 (permalink)
damien morton
Guest


 

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.

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OT] Sparc/Alpha emulators Jack Virtual PC 5 3 Weeks Ago 03:58 AM
Windows 7 Alpha Debuting Tonight d0od Vista News 9 06-20-2008 03:10 PM
Alpha Five Printer Bill Vista hardware & devices 0 06-19-2006 03:35 PM
About the alpha blend and alpha test in 3D Arthur_liu Avalon 2 01-10-2006 03:54 PM








Vistax64.com 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 2005-2008

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 47 48 49 50