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 / 9908
9907  |  9909
Subject: 
Re: LDGlite and LPub (and maybe ldview?
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 15 Oct 2004 13:21:09 GMT
Viewed: 
2331 times
  
In lugnet.cad, Travis Cobbs wrote:
Note that I'm sending followups to lugnet.cad.dev.

In lugnet.cad, Don Heyse wrote:
Eeek.  I was just wondering about that.  Do you have a link, or a
quick html snippit.  Is there a different opengl alpha blend fn that
I should perhaps be using?  I guess I'd better read up after all,
opengl, and png.

All I did was create an HTML document real quick and looked at it in
Firefox.  The following is the content of that document:

<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR="#FF0000">
<IMG SRC="transparent.png">
</BODY>
</HTML>

You should be able to copy the above and paste it into an empty html
file.  Make sure transparent.png is in the same directory.

Thanks, that did it.  Yuck!

As for solving the problem, I'm not sure what would be best.  You
could always go back and draw the lines a second time with blend func
set to GL_ONE, GL_ONE, depth test disabled and glColorMask set to
GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE.  This should get rid of the
unwanted transparency in the middle of the image, but it would also
remove the antialiasing of the alpha channel around the edges.

Let's see if I understand what's going on here.  When I antialias
the edge lines, the RGB colors buffer gets blended, and so does the
alpha channel.  If alpha was all zeros, now instead of all ones, it
gets something in between.  I think what I really want is to run
a filter over the alpha channel and convert any nonzero numbers
to all ones before dumping the transparent png.  But you're right, it
would be nice to leave the alpha bits for outer edge lines fuzzy so
they blend in with whatever background the transparent png is laid
over.  I think there's an opengl halo trick that might help out here.
Perhaps something to do with the stencil buffer?

Ack!  More reading...

Don



Message has 1 Reply:
  Re: LDGlite and LPub (and maybe ldview?
 
(...) Ok i did a quick once over of glBlendFunc manpage and it looks like switching line antialiasing from: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); to glBlendFunc(GL_SRC_A..._SATURATE, GL_ONE_MINUS_SRC_ALPHA); eliminates the problem (...) (20 years ago, 15-Oct-04, to lugnet.cad.dev)

Message is in Reply To:
  Re: LDGlite and LPub (and maybe ldview?
 
Note that I'm sending followups to lugnet.cad.dev. (...) All I did was create an HTML document real quick and looked at it in Firefox. The following is the content of that document: <HTML> <HEAD> </HEAD> <BODY BGCOLOR="#FF0000"> <IMG (...) (20 years ago, 14-Oct-04, to lugnet.cad, lugnet.cad.dev)

52 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