To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 12913
12912  |  12914
Subject: 
Re: White noise around model with colored background
Newsgroups: 
lugnet.cad
Date: 
Mon, 20 Jun 2005 18:02:06 GMT
Viewed: 
1668 times
  
In lugnet.cad, Travis Cobbs wrote:
I have a few comments.  The first is that it will only fully work if
you set the line width to 2 or more.  Otherwise, you'll have jaggies
around the inside edges of the outline line, and when it blends into
the background, the background might have a tendency to bleed
through toward the polygons.

Secondly, either I didn't understand your two passes, or they won't
actually work unless the edge line thickness is set to at least 2.
When the edge thickness is set to 1, the edge lines draw over the
edges of the polygons they're outlining.  They don't stick out at
all, so nothing would get drawn at all in that pass.

Other than that, I think you're right that it would produce the
desired result.  I'm not sure people can be expected to put up with
thicker edge lines in order to achieve the result, though.

And I'm not sure I understand what you're saying about the linewidths.
:^) I use glPolygonOffset to make sure the lines get drawn over the
polygons underneath.  (Plus I cheat a bit and add a bit more z to
antialiased edge lines so even skinny lines get drawn completely.)  As
far as I can tell even for skinny lines the AA partial coverage values
extend beyond the pixels used to draw the unantialiased polygons so
you do get something outside the polys even with the edge thickness
set to 1.  Think about it.  We'd have no halo if the AA pixels exactly
covered only the pixels drawn by the polygon pass.  Unless you've been
drawing the AA edge lines in the same pass as your opaque polygons.
Blech!

I also can't see any reason why the background would bleed into the
area already covered by the polygons.  We're blending, not bluring.
Adjacent pixels have no effect.  Just what's directly underneath.

One other thing.  Full-screen antialiasing would probably adversly
impact the result.  I'm not completely sure of this, but I suspect
that it would.

Yeah, probably.  I'd have to think about what FSAA does to the alpha
channel (and the stencil?)

One other thing.  I only think the edge lines themselves have to go
through two passes.  First, draw all the polygons with stencil
writes enabled.  Then draw the edge lines with blending enabled, but
stencil writes disabled.  Then draw the edge lines with blending
disabled and stencil writes disabled, but stencil tests enabled.

Yes, 2 passes only for the edge lines.  I see you went with the
blended ones first.  That was my thought originally before I got
sidetracked by the approach that doesn't use the stencil test.
Personally I think the stencil test is better, but I wanted to mention
both ways in case I come back here looking for a way to save on
graphics memory for skimpier hardware.

Anyhow, You'll probably also want to disable writing to the alpha
plane during the blended pass to preserve the 1's you wrote there
during the polygon pass.

So will there be an RC2?

Don



Message has 1 Reply:
  Re: White noise around model with colored background
 
(...) Well, as you point out below, I was mostly wrong. However, I suspect it will still produce jaggies on the inside edge of the lines (but I could be wrong). These would almost certainly go away with 2-pixel edge lines. (These things are very (...) (19 years ago, 21-Jun-05, to lugnet.cad)

Message is in Reply To:
  Re: White noise around model with colored background
 
(If you haven't read Don's message, go do that now. It's too long to quote here.) I have a few comments. The first is that it will only fully work if you set the line width to 2 or more. Otherwise, you'll have jaggies around the inside edges of the (...) (19 years ago, 20-Jun-05, to lugnet.cad)

18 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