From: Bruce S. <Bru...@nc...> - 2009-04-16 16:10:06
|
From the documentation on opacity: "You may see incorrect rendering any time there is a translucent object (opacity < 1.0) which is not convex (e.g. ring), or two translucent objects which overlap on the screen and also in their depth extents (distances from the camera to the nearest and farthest planes perpendicular to scene.forward which intersect the object). The objects need not actually overlap in 3D space to have problems. The incorrect rendering will usually have the effect of making the more distant object disappear (fail to show through the nearer object). Accurate rendering of ad hoc scenes with translucency is difficult and expensive, and we did not want to wait for a perfect solution before introducing this useful enhancement." In other words, it's a step forward to have opacity in VPython, and it works fine in many common situations, but the real-time nature of VPython means that for now it's not hard to find situations in which it doesn't work properly. Bruce Sherwood Guy K. Kloss wrote: > Hi, > > I have just tried to visualise a series of 288 measurement points in 3D using > vpython. All works quite nicely. As I'm using now the standard deviations of > each point in X, Y and Z direction for the size of the boxes I'm using to > render each point I had difficulties to see all points properly as they > overlapped. The solution was to set the (thanks for that) new feature to set > an opacity on the objects to 0.2. > > Now unfortunately when rotating the scene I see that certain faces of the > cubes/boxes seem to be flickering on and off for the individual measurement > points. That's in a way quite annoying, especially as I'm assuming that not > all faces of the boxes then are rendered. Another assumption is, that > rendering polyhedrons the hidden faces are not rendered. But using opacity > there then are no truly hidden faces, and the scene looks quite different > with/without them. > > Any ideas on how that could be fixed? I assume it needs fixing in vpython > itself, though. Or is it a "feature" of the OpenGL implementation on my > machine (Nvidia chipset on a Linux box, Ubuntu Jaunty)? > > Guy > |