PipeVisual3D is transparency issue

Nov 4, 2013 at 2:26 PM
I added some models first and then added a PipeVisual3D , when I make the PipeVisual3D transparent by changing the Material and BackMaterial opacity, those models I added first appear just fine inside the pipe when I look from outside side, but if I added some models after I already add the PipeVisual3D, none of these appear , it looks transparent but it actually it is not , I would appreciate any clue
Nov 5, 2013 at 5:34 PM
You must manually control the order of the Visual3D elements which you add to the scene, since WPF doesn't do transparency in the same way as OpenGL or even DirectX.

Add your Visual3Ds in order of decreasing opacity to get the right effects.

Nov 5, 2013 at 6:43 PM
Thanks for your reply, Opacity is just for the PipeVisual3D, so the models are always with Opacity = 1, I don't have the choice here, the users want to be able to add some models/PipeVisual3D and delete them at any time, as I understood from your post , I have always to make sure that the models have to be as if they were added first, when I add a new model and change it's position on the tree,would that solve my problem ?
Nov 6, 2013 at 3:02 PM
Yes, it's just as you described. WPF renders the elements in list order. Just make sure the elements with less opacity are last in the list.

At times, I do this by specifying one list of Visual3Ds for the opaque stuff, and a second list for the non-opaque, stuff, and lay that out in the XAML. That pretty much guarantees the right behavior.

Marked as answer by Mrme on 11/7/2013 at 3:56 AM
Nov 6, 2013 at 3:24 PM
maybe you can use ElementSortingHelper.SortModel(Point3D position, IList<Visual3D> model);