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 / 7122
7121  |  7123
Subject: 
Re: Why Type 5 Lines?
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 17 Apr 2002 20:23:45 GMT
Viewed: 
417 times
  
In lugnet.cad.dev, Don Heyse writes:
In lugnet.cad.dev, Kyle McDonald writes:
In order to get OpenGL to do this for you though you need to have the
polygons that represent the curved surface tied together in a 'strip'.
If you can do that, then you can have OpenGL render them once a solid
faces, and again as a wireframe. In my experience, when OpenGL renders
strips and fans as wireframes, it will only draw the edges required to
show where the curved surface disappears from view.

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.

And for what it's worth, Don, I added conditional lines to my cylinder/cone
primitive after applying your changes, and they work fine.  I haven't had a
chance to do the same with the torus and sphere primitives (they're quite a
bit trickier), but I don't foresee any problems.  I also need to do some
testing to insure I'm generating the correct number of type 5 lines.

This is the main reason why I'm trying to automate 'stripifying' the
LDraw polygons. The Rendering Library I use has no way for me to tell
it wether to draw a line or not at final render time. It would be pretty
hard for me to even go through ahead of time an figure out each type5
line based on the view point, but that maybe possible. Instead though,
I'm putting my trust in this 'feature' of how strips and fans are drawn
so that I can get the same (or close) drawings, and just ignore the
type5 lines during loading.

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.

--Travis Cobbs (tcobbs@REMOVE.halibut.com)



Message has 1 Reply:
  Re: Why Type 5 Lines?
 
(...) 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 (...) (22 years ago, 17-Apr-02, to lugnet.cad.dev)

Message is in Reply To:
  Re: Why Type 5 Lines?
 
(...) 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 (...) (22 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