RE: [Algorithms] Alpha Channel
Brought to you by:
vexxed72
From: Frag_ D. <fra...@ho...> - 2000-09-05 22:19:16
|
Have you tried using targa files? You can create these with some programs. If you can't afford Photoshop, Paint Shop Pro, Corel Draw, or something, you can get Gimp for free. If all you need's the 8-bit alpha value (or 32-bit pixmap), then this works. Then again, if you're looking for how you'd use this, I can only say how you'd do it in Open GL, not Direct3D (unless you wanted no hardware support, or decided to code for a specific card, but that would be crazy in this day, wouldn't it?) >From: "Discoe, Ben" <ben...@in...> >Reply-To: gda...@li... >To: "'gda...@li...'" ><gda...@li...> >CC: vt...@eg... >Subject: RE: [Algorithms] Alpha Channel >Date: Sat, 26 Aug 2000 20:32:41 -0700 > > >Pai-Hung, > >It is indeed a difficult process to generate a good 8-bit alpha channel for >a 32-bit texture. For nearly any photographic data source, it cannot be >done procedurally. It requires a human artist to produce usable results. >Here is a tutorial i wrote on how to produce the alpha using PhotoShop: >http://vterrain.org/Plants/Create/ > >Part of why it is so difficult is that along the perimeter of the shape >(e.g. tree) there are pixels with alpha between 0 and 1, so bits of the >surrounding (non-tree) texel color will appear on the output. This is very >difficult to fix. No matter what color you choose (black is a common >choice), you will get a "fringe" of that color around the resulting texture >billboard, unless you hand-edit on a nearly pixel basis. > >One popular simplification is to use single-bit alpha (alpha testing, not >alpha blending). The advantages are that the art task is easier, and you >don't have to draw the texture billboards in back-to-front order, which can >be a significant performance hit since it is faster to sort by texture to >avoid context switches. The drawbacks are harsh, unnatural aliased edges >for your texture billboards. > >In the VTP software, we currently use 8-bit alpha blending for quality, but >i'm considering switching to alpha-testing for speed. A forest may be more >convincing with 2-3x as many trees even if the trees have jittery edges. > >Good luck, >Ben >http://vterrain.org/ > > > -----Original Message----- > > From: Pai-Hung Chen [mailto:pa...@ac...] > > Sent: Saturday, August 26, 2000 1:09 PM > > To: gda...@li... > > Subject: [Algorithms] Alpha Channel > > > > Hi, > > > > I want to use billboard in my program but cannot find a good > > way to create 32-bit bitmap with alpha channel of appropriate > > values. Basically I want to create a bitmap of tree with leaves > > in various green colors (with alpha = 255) and all non-green > > colors transparent (alpha = 0) so that I can use it > > as the texture for my billboarded trees. > > >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. |