I have a problem (I posted it also elsewhere but hoping for broader solution). I am creating a simulation application with cylindrical object representing glass which are moved around and rotated. When such glassy object is inside another while rotating the world it seems like its surface is inverting. I have prepared simplified example of this (http://zdch.amu.edu.pl/director/pr4.html, http://zdch.amu.edu.pl/director/pr4.dir) with a stack of cylinders with blend 60 that are in interposition with another cylinder. During animation, when seen at front for some short time one can notice a change (http://zdch.amu.edu.pl/director/Picture.png) half of the cylinders in the stack are in front of the big one and three steps further they are in the back while the other half of the stack appears in the front. As far as I tested it doesn't depend on the renderer. It may be reproduced with this code in two following frames and a 3dworld...
on exitFrame me
mr=sprite(2).member.newmodelresource("mr", #cylinder, #both)
mr.bottomRadius = 5
mr.topRadius = 5
mr.height = 30
repeat with a=1 to 10
on exitFrame me member("lab").camera(1).rotate(vector(1,0,0),#world)
go to the frame
Thank you for help or comments
You're facing the "famous" Z-buffer fighting in Shockwave 3D.
In a few words: to speed up the rendering, the 3D engine is performing a "per model" sorting instead of "per polygon" sorting.
The good part: faster rendering
The bad part: wrong sorting in case of (semi) transparent shaders (materials).
There're 2 workarounds to get rid of this annoying thing:
1) to "explode" the 3d models into a few parts to get more pivots (and better sorting):
2) to use additive blending (presuming your example has a didactical purpose):
Thank you Necromanthus for comprehensive answer. Quite a work seems to be in front of me. But now there is a hope.