To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 7123
7122  |  7124
Subject: 
Re: Why Type 5 Lines?
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 17 Apr 2002 22:53:07 GMT
Viewed: 
483 times
  
Travis Cobbs wrote:

In lugnet.cad.dev, Don Heyse writes:

Tell more about this.  I just tweaked a version of ldview to display
type 5 lines, but only for surfaces that haven't been replaced by
quad strips.  It looks good with primitive substitution turned off, but
with this automagic wireframing of strips it could have the best of
both worlds.


I'm curious to.  Everything I know about how OpenGL works says that drawing
the strip as a wireframe after drawing it solidly would either produce Z
Buffer noise, no wireframe at all, or wireframe all over.  However, it may
be that there is some setting I don't know about that would produce the
described behavior.  If so, I'd love to hear about it.  In LDView, when you
switch to wireframe mode, it just changes the render style to be wireframe,
but draws the same geometry (including strips and fans).  Strips and fans
draw as full wireframe: looking at the top of a stud shows you all the pie
pieces, which are made up of a fan; looking at the sides shows each quad
that makes up the cylindrical part, which is a quad strip.



Well, I believe that there is something called a 'Z offset' that can
be used not to actually move the geometry, but to make sure the lines
appear 'on top' of the faces.

Before I go more into this I need to back up a bit. I currently use
the Java3D graphics library/renderer. It is a 'Scenegraph' based API
that runs on top of OpenGL (and optionally on Direct3D on Windows.)
Because of that I don't know exactly what the equivalent OpenGL
functions are, but I do know that THe Java3D people aren't really
adding anyhting not already there.

I have some Java3D code, and sample pics that were done using
this technique. I can mail them to anyone interested, but I don't
think it would be nice to send them to the whole mailing list. The
object in the pics is basically one large mesh (array of strips?)
The pics show that the outlines are drawn on the fly for the shape as
the viewing angle changes.

I still don't have the geometry setup in strips and fans enough to
try to see if this will work for me or not. I expect that it may
remove some of the edges, but it may also prove impossible to stripify
all the polgyons that need to be (without inlining them on the fly)
and therefore we may end up with undesirable lines where a fan meets
a strip, etc.


That would be fantastic, but I have my doubts.  I suspect you'll end
up with lines that you don't want where various strips join.  Now if
you can somehow turn everything between the type 2 lines into a single
strip you might have something.


I'm similarly somewhat dubious, but agree that it would be wonderful if it
works.  I did some research into making the edges visible myself, and the
only thing I came up with that I felt confident would work were some of the
cartoon rendering algorithms presented on nVIDIA's developer pages
(developer.nvidia.com).

I looked at one of these, and it appeared that it could be modified to
provide outlines around objects while at the same time producing appropriate
shading (lighting).  Most/all of the cartoon shading algorithms have highly
simplified lighting, to make things look more flat and cartoon-like.
However, it appears that this can easily be overcome.  On the other hand the
cartoon algorithms will only work on some video cards, and they would
require significant modification to implement, so I put them off to possibly
come back to in the future.


What I'm thinking of does sound quite similiar, but as far as I know it
has nothing to do with specific vendor's HW or Drivers.

-Kyle



--
                                    _
-------------------------------ooO( )Ooo-------------------------------
Kyle J. McDonald                 (o o)
                                  |||||

                                  \\\//
                                  (o o)            kmcdonald@BigFoot.COM
-------------------------------ooO(_)Ooo-------------------------------



Message has 2 Replies:
  Re: Why Type 5 Lines?
 
(...) OpenGL has glPolygonOffset, which does what you describe by allowing you to move the polygons further away in the Z direction, where the amount they move can depend on the slope of the polygon in the Z direction. This works great, and I use it (...) (23 years ago, 17-Apr-02, to lugnet.cad.dev)
  Re: Why Type 5 Lines?
 
(...) That sounds like glPolygonOffset which would be part of the solution because it allows the edges to look clean. We all use that already. (...) I can see how you might accomplish some of that by manipulating glEdgeFlag when you define your (...) (23 years ago, 18-Apr-02, to lugnet.cad.dev)

Message is in Reply To:
  Re: Why Type 5 Lines?
 
(...) I'm curious to. Everything I know about how OpenGL works says that drawing the strip as a wireframe after drawing it solidly would either produce Z Buffer noise, no wireframe at all, or wireframe all over. However, it may be that there is some (...) (23 years ago, 17-Apr-02, to lugnet.cad.dev)

21 Messages in This Thread:







Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR