Hi Carsten, thanks a lot for your help.
> > I don't really think it's a BlendChunk issue, but there might be a > problem how MultiPassMaterial handles a mixture of transparent and non- > transparent materials. > > > > In the test case I attached, at first everything looks good. But if > you rotate the scene it looks like the z-buffer test is turned off for > both materials, not only for the transparent material... > > OpenSG always has the depth test enabled, but disables depth writes for > transparent objects. > Mixing transparent and non-transparent materials in an MPM is difficult > because normally OpenSG sorts objects that are transparent into a draw > tree that is processed after all opaque objects. For an object with MPM > this would require splitting the passes based on whether they are > transparent or not, which conflicts with running the passes in the > order specified by the MPM. > > One problem in your example is that depth writes are disabled for the > blue part, you can fix that by adding a DepthChunk to it (the default > settings for it are fine). This will get rid of the issue of the red > half shining through the blue one. > The other problem is that the red part does not seem to be "on top" of > the blue one when viewed from that side of the scene. That is because > the depth sorting for transparent objects works on the per-object level > not per-polygon/triangle. > For this case this can be mostly worked around by making the blue > material the first pass in MPM (to ensure opaque is rendered before > transparent) and forcing the MPM to be considered transparent (normally > it looks at the first pass material to decide this automatically): I tried it this way, but as I have multiple geometries with different materials which I'd like to cut into a transparent and an opaque part, I cannot afford to skip OpenSG's sorting of transparent objects. But finally, I found another solution. Now I use MaterialGroups and shared Geometry cores instead of the MultiPassMaterial. Together with the patched ClipPlaneChunk it works like a charm. Thanks and best regards, Thomas ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users