RE: [Algorithms] Alpha Channel
Brought to you by:
vexxed72
From: Pallister, K. <kim...@in...> - 2000-08-28 06:26:40
|
And if you only care about on/off transparency, alpha test will also save you on having to depth sort your trees. All the better if you are going to have 2x-3x the number of trees. The alpha-test early-outs the z-write (hows that for a hyper-hyphenated sentence) and so you don't have the need-to-sort-transparent-objects problem. The demo we showed at IDF shows this off nicely. Source code to be released really soon. promise. Kim Pallister We will find a way or we will make one. - Hannibal > -----Original Message----- > From: Discoe, Ben [mailto:ben...@in...] > Sent: Saturday, August 26, 2000 8:33 PM > To: 'gda...@li...' > Cc: vt...@eg... > Subject: RE: [Algorithms] Alpha Channel > > > > 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 > |