|
From: Ethan A M. <merritt@u.washington.edu> - 2007-01-15 18:19:53
|
On Monday 15 January 2007 00:01, Daniel J Sebald wrote: > Anything wrong with the following approach? Please go back and read the 2005 discussion. As I understood the argument, the whole point of the "pm3d hidden3d" option was the cleverness of doing the border tracing at the same time as the pm3d fill. This gives you the [admittedly imperfect] hidden-surface removal essentialy for free. Yes, you could do a better job on the lines by handling them in the true hidden3d code instead (I had a patch to do that, but I cannot recall if I circulated it). But it's much slower. Given the difference in speed, and the fact that the pm3d rectangles themselves still cannot be ordered perfectly, it was judged a net loss rather than a gain. It doesn't do much good to get the bounding line occlusions right if the rectangles themselves stick out where they shouldn't. On the other hand, I was disappointed at the time that we didn't pursue the complementary option of allowing inclusion of pm3d rectangles in the true "set hidden3d" code path. For all the reasons that Hans-Bernhard enumerated, rectangle-rectangle occlusions still would not be handled correctly in the general case. Certainly it is not going to help the Kuen's surface rendering much. *But*, there are some very useful special cases that it _would_ handle correctly. In particular I was interested in painting false-color plots onto rectangular sections through a 3D vector field. In cases like this the issue of multiple rectangles with mutual occlusion simply doesn't arise; we only need to worry about occlusion of vector segments by a rectangle, and vice versa. Examples http://www.math.uni-bremen.de/~justen/Forschung/ie_condenser.jpg http://www.asd-online.com/piceng/cleanroom_simulation.gif > As a prototype, I've moved the hidden3d line draw to after the pm3d is plotted in graph3d.c and changed the transparent_solids.dem command to: > > set pm3d > splot x(u,v), y(u,v), z(u,v) with lines linecolor rgbcolor "black" > > Remember, this is a prototype result. The standard "set pm3d" version doesn't do depth sorting properly so you will see to the right that the colors don't properly follow the curve at middle height. > > Some comments: > > 1) Ramifications for transparency I'm not considering now, just that tiling problem from the previous email. > > 2) Regarding the tiling problem, they are still there, but because the individual quadrangles weren't outlined these problems aren't too noticable. The places where the depthorder sort fails happen for quadrangles that are pretty much the same value. So, this isn't really a solution to the hidden surface issue, just a potential quick fix in some instances. > > 3) I do see some flecks here and there in the hidden line draw. Perhaps a bug in the line draw (e.g., rounding/precision issues)? Hans? > > 4) Also in the hidden line draw, note the difference between the attached PNG and the previous PNG. There appear to be a couple lines missing from the Kuen surface on the left, pumpkin-colored surface where it curves inward vetically. > > Dan > -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |