![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| 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? |
| | #2 (permalink) |
| 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? > |
| | #3 (permalink) |
| 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? > |
| | #4 (permalink) |
| 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? > > |
| | #5 (permalink) |
| 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. |
| |
| |
![]() |
| 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 |