randy@tessa.iaf.uiowa.edu (randy frank) (10/04/90)
Brent, I've used the patterns a couple of times to simulate transparent polys on 4D20s. I create a bunch of increasing density patterns with defpat. I next draw all my solid polys with Zbuffering on. Then I turn off the zwriting (not zbuffering) and set the pattern to one matching the desired transparency and draw the transparent polys. These transparent polys should be drawn back to front for the best rendering and YOU must do the sorting as zwriting is disabled. In a lot of cases I found this sorting to be not needed because of the geometry involved. But, unlike alpha blending, overlapping transparent polys drawn this way do not get darked (lightened) by each other. Only the last one drawn is shown. Also you must pick your masks carefully or you will get wild patterns especially if you allow overlapping transparent polys with different masks... One other note: If you don't (can't) sort your polys zdepth and you have a lot of rendering power to spare (not usually the case on a PI) you can just draw all your transparent polys once, enable backface culling, and then draw them again. The net effect is that the visible polys will always show through as they are drawn last (in the second pass). Cute but it can be time consuming... A final note: Anyone who has good masks please let me know. I found a few that work and then shifted them around a bit so my trans polys could overlap. My biggest problem is the fact that I was using double buffered RGB mode. The automatic dithering of the colors into 12bits conflicted with some of my masks... Anyway PI trans polys work fairly well but are not a replacement for an alpha-buffer. (When I first got it running I got a few interesting stares from GTX folks who generally thought I figured out how to alpha-blend on a PI.) later... -- rjf. Randy Frank, Engineer | (319) 335-6712 University of Iowa, Image Analysis Facility | 73 EMRB randy@tessa.iaf.uiowa.edu | Iowa City, IA 52242