• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Model3DGroup behavior

#1
I have 2 identical surfaces, one at -z and other at +z location. They both
have a transparent Material on the front side and a non-transparent
BackMaterial on the other side.

<Model3DGroup>
<AmbientLight ... />
<DirectionalLight .../>
<DirectionalLight .../>
<GeometryModel3D x:Name="Side1">...</GeometryModel3D>
<GeometryModel3D x:Name="Side2">...</GeometryModel3D>
</Model3DGroup>

When I rotate this model group around the y-axis, the behavior appears to be
different depending on the order the GeometryModel3D shows up on the list.
The first one seems to be non-transparent. I can reverse the order and the
other surface become non-transparent. Is this the expected behavior or am I
doing something wrong?
 

My Computer

T

TheRHogue

#2
Expected behavior for Version 1 of WPF. You will need to sort the geometries
per render cycle.

I have a simple example of this at http://www.therhogue.com/WinFX -
collageview sample.

"PT" wrote:

> I have 2 identical surfaces, one at -z and other at +z location. They both
> have a transparent Material on the front side and a non-transparent
> BackMaterial on the other side.
>
> <Model3DGroup>
> <AmbientLight ... />
> <DirectionalLight .../>
> <DirectionalLight .../>
> <GeometryModel3D x:Name="Side1">...</GeometryModel3D>
> <GeometryModel3D x:Name="Side2">...</GeometryModel3D>
> </Model3DGroup>
>
> When I rotate this model group around the y-axis, the behavior appears to be
> different depending on the order the GeometryModel3D shows up on the list.
> The first one seems to be non-transparent. I can reverse the order and the
> other surface become non-transparent. Is this the expected behavior or am I
> doing something wrong?
>
 

My Computer

#3
Thanks for the help. This is some heavy lifting. Especially since I'm
making a spinning cube.

"TheRHogue" wrote:

> Expected behavior for Version 1 of WPF. You will need to sort the geometries
> per render cycle.
>
> I have a simple example of this at http://www.therhogue.com/WinFX -
> collageview sample.
>
> "PT" wrote:
>
> > I have 2 identical surfaces, one at -z and other at +z location. They both
> > have a transparent Material on the front side and a non-transparent
> > BackMaterial on the other side.
> >
> > <Model3DGroup>
> > <AmbientLight ... />
> > <DirectionalLight .../>
> > <DirectionalLight .../>
> > <GeometryModel3D x:Name="Side1">...</GeometryModel3D>
> > <GeometryModel3D x:Name="Side2">...</GeometryModel3D>
> > </Model3DGroup>
> >
> > When I rotate this model group around the y-axis, the behavior appears to be
> > different depending on the order the GeometryModel3D shows up on the list.
> > The first one seems to be non-transparent. I can reverse the order and the
> > other surface become non-transparent. Is this the expected behavior or am I
> > doing something wrong?
> >
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)