phil@BRL.MIL (Phil Dykstra) (03/15/90)
I have two questions about libgl of the form "is there a better way, and if not it sure would be nice if there was." 1) Two sided polygons. I am trying to draw lighted, two sided, Z buffered polygons. The key is that the surface is not closed, but I would like to have more than just an ambient component on the back side. The solution I have come up with is to draw every polygon twice, once CW, once CCW. Since they are coincident the Z buffer would yield unpredictable results, so I have turned backface culling on. This works pretty well, but requires sending twice as much data down the pipe, as well as making the processing of tmeshes messier. Is there a better way to do this? Something I would find very nice is a MATERIAL and/or LMODEL level selection of double sided polygons. This would simply entail flipping the normal vectors if the lighting model dot products came up negative. The required bandwidth into the pipe would remain the same, and the rendering time should be nowhere near twice as long. 2) Fat points. On high res screens, individual pixels have become so small and faint as to be almost invisible (at least in colors less than full white). None the less, point clouds are still a very useful way to look at data sets. Is there some way to draw a fat (i.e. multi-pixel) point? The key is something which is scale invariant. The linewidth control behaves in exactly the right way, but is only thick in one dimension (so drawing a zero length line doesn't solve the problem). A "pointwidth(n)" call would be perfect. === Is support for these operations already there somewhere, or would they require microcode changes? Any comments/suggestions are welcome. - Phil <phil@brl.mil> uunet!brl!phil
tjh@ouzo.bu.edu (Tim Hall) (03/15/90)
In article <9003150230.aa18653@SPARK.BRL.MIL> phil@BRL.MIL (Phil Dykstra) writes: > >1) Two sided polygons. > >just an ambient component on the back side. The solution I have come >up with is to draw every polygon twice, once CW, once CCW. Since they >are coincident the Z buffer would yield unpredictable results, so I >have turned backface culling on. > The other solution I use is to make two diametric light sources. This way no matter which side of the polygon the normal is pointing one of the light sources will cause the polygon to be shaded. This seems faster than the above solution but this also only works for diffuse shading, it doesn't work with specular shading. >Something I would find very nice is >a MATERIAL and/or LMODEL level selection of double sided polygons. I second that. -Tim Hall tjh@bu-pub.bu.edu
LES@SLACVM.BITNET (Len Sweeney) (03/16/90)
I second the motion for easy, efficient fat points. Otherwise, I suppose we define a font with the appropriate size centered point, and do lots of cmov, charstr.