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 / 12844
12843  |  12845
Subject: 
Re: White noise around model with colored background
Newsgroups: 
lugnet.cad
Date: 
Thu, 9 Jun 2005 00:43:30 GMT
Viewed: 
4014 times
  
In lugnet.cad, Don Heyse wrote:
> In lugnet.cad, Travis Cobbs wrote:
> > In lugnet.cad, Don Heyse wrote:
> > > I think I had an idea for an extra rendering pass to fix this but
> > > never got motivated enough to try it out.
> > > 
> > >   http://news.lugnet.com/cad/dev/?n=9910
> > > 
> > > Does it sound like it might work?  I can barely remember what I was
> > > thinking.
> > 
> > That won't help.  The problem is that OpenGL antialiasing antialises
> > the color channel based on the background color the original rendering
> > happens over.  So even if you bump the alpha on all those pixels up to
> > 1.0 (fully opaque), you'll still have the original blended color based
> > on the original background color.  You end up with the same problem
> > with regular alpha-blended transparent items that sit over the
> > background.
> 
> Ah ha!  That explains why I said to set the background color to black.
> That way the exterior lines alpha blend with zeros.  I suspect setting
> -b0 in the ldglite options window of lpub will give better results.
> Maybe lpub should always do this if antialiasing and transparent pngs
> are used.
> 
> > What we need is the ability to tell OpenGL to not blend the color
> > channels if the destination alpha of the pixel being drawn is 0.
> > (Perhaps the blending should be proportional to the destination
> > alpha of the existing pixel.)  I'm pretty sure this isn't possible
> > in OpenGL.
> 
> Or we could blend with a background color of zero (black), right?

Unfortunately, that doesn't help.  It still blends, which means that if (for
instance) your edge is red, and you have a pixel that's 50% covered via
antialiasing, then that pixel comes out dark red (50% red + 50% black = dark
red) with 50% alpha transparency.  Composite that over a white background, and
you'll end up with a dark halo.

What we need it the ability to have the blending not occur in the color channel
at all when the background is fully tranparent.  As far as I know, that's not
possible.

--Travis



Message has 2 Replies:
  Re: White noise around model with colored background
 
I seem to have unleashed a discussion that I do not understand. All this talk about alphachannels, pixels, OpenGL, etc. That is beyond my reach :-) I guess I'll stick with a white background for now and let you programmers come up with something (...) (21 years ago, 9-Jun-05, to lugnet.cad)
  Re: White noise around model with colored background
 
(...) Ok, I had a little time over the weekend to spend with the Red book, and I think I may have it now. Hopefully not too late to make it into LDView version 3.0 RC 2. ;^) So to eliminate the halo, what we want to put around the image edges of the (...) (21 years ago, 20-Jun-05, to lugnet.cad)

Message is in Reply To:
  Re: White noise around model with colored background
 
(...) Ah ha! That explains why I said to set the background color to black. That way the exterior lines alpha blend with zeros. I suspect setting -b0 in the ldglite options window of lpub will give better results. Maybe lpub should always do this if (...) (21 years ago, 8-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
    

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