Question On 'Rendering' Lines

Question On 'Rendering' Lines

Post by Michael F. Werne » Sun, 12 Dec 1999 04:00:00



I'm sure some of you out there have found reasons to 'render' lines.
By this, I simply mean drawing lines with lighting enabled, materials
specified, and most importantly - normals defined at each vertex.
This much is seems to be working, but not with the behavior I was
hoping for.  Specifically, when my lines are viewed from the backside
(relative to their normals), I don't want to seem them - similar to not
seeing polygons from the backside.  Instead, they seem to be ren-
dered with ambient lighting.  I have tried lots of experiments to make
my lines not visible from the 'backside', but to no avail.  I'm hoping
I may have overlooked something.  Anyone know of a fairly straight-
forward way to make lines invisible from the backside?  The best I
can do right now is use thin quads drawn with 'PolygonMode' set
to (GL_FRONT, GL_LINE).  Thanks for your suggestions.  mfw.
 
 
 

Question On 'Rendering' Lines

Post by Paul Mart » Sun, 12 Dec 1999 04:00:00




Quote:> Anyone know of a fairly straight-
> forward way to make lines invisible from the backside?  The best I
> can do right now is use thin quads drawn with 'PolygonMode' set
> to (GL_FRONT, GL_LINE).  Thanks for your suggestions.  mfw.

If your lines are actually filled primitives in line mode, you can always
use face culling.

If not, you will need to cull them yourself. This can be done by
hand-transforming the normals, doing a dot product with a vector to the eye,
and culling the line if the result is negative.

Hidden surface removal of wireframe primitives was a hot area of research in
the 1970s and there are several mechanisms which are very efficient for
specific types of data. You might try hunting down some old SIGGRAPH
proceedings (usually readily available in the libraries of large
Universities.
--
   -Paul Martz
    Hewlett Packard Workstation Systems Lab
    Remove DONTSPAM to reply

 
 
 

1. hidden line rendering'

i want to draw in hidden line mode in an SoXtRenderArea. the manual page for
SoXtViewer says:

          VIEW_HIDDEN_LINE - Renders the object as wireframe, but only show
          the object front faces. This is accomplished using a two pass
          rendering. In the first pass, the objects are rendered as FILLED
          using the background BASE_COLOR (this sets up the wanted z-buffer
          values). The second pass then renders the objects as LINES, while
          adjusting the z-buffer range to limit overlapping polygons problems.

i understand that. my problems are:

-) to draw in the background color i have to use a basecolor node (+ a
material node ?) that sets the color to the background color with its override
flag set to keep the color fixed. but how can i change the color again when i
draw the lines?

-) how do i adjust the z-buffer range and how much adjusting is needed to
avoid the known problems?

thanks in advance.

--


2. Tips on how to stereorender with d3d8

3. Anderson's Hidden line algorithm question

4. Dr. Dobb's Journal and .flc format

5. Help - need algorithm for 'bold' line

6. Giffer ftp site?

7. The 'ZigZag' parallel line problem [Q]

8. How do I get constant velocity?

9. 'line' algorthim in c

10. Dot's instead of line's

11. Question regarding rendering high quality AVI's

12. Help, data line's title covers data line

13. We need a new 'render' statement