Re: [Paracomp-devel] Standard Alpha Blending problems
Brought to you by:
shreekumar
|
From: James S P. <jam...@ma...> - 2008-06-26 15:05:08
|
Hi Shree, I've gone back to the CEI documentation which had a couple of useful links about alpha compositing. http://www.cs.virginia.edu/~gfx/Courses/2002/BigData/papers/Volume%20Rendering/Interactive%20Texture-Based%20Volume%20Rendering%20for%20Large%20Data%20Sets.pdf http://www.ices.utexas.edu/ccv/papers/Smpark-VolVis02.pdf Shree Kumar wrote: > Now I'm confused. Can you elaborate on what you mean by "only two inputs > can be composited in a single OVER operation" ? I would disregard most of what I've said before as it appears my understanding of what was going on was badly floored and the alpha compositing code is most likely correct, sorry. After all Budapest seem to be able to get it to work! The issue that the composited image is wrong still stands. >>> Currently, I don't see anybody using the broken alpha value. So I see it >>> safe to fix this. Fixing this won't break existing apps either... >> Looking a the code in compositecpu.cpp we're confused again as it >> actaully looks like more like glBlend(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); >> as the src values are not mutliplied by SRC_ALPHA? > > Oop! Sorry. I missed mentioning that glBlendFunc(GL_SRC_ALPHA, > GL_ONE_MINUS_SRC_ALPHA) is the intended operator. > > Since we expect premultiplied alpha values, we effectively implement > glBlendFuncSeparate(GL_ONE, GL_ONE_MINUS_SRC_ALPHA). Yes, having just read the above papers that became apparent. > (So does that mean the final alpha would be correct if the initial > alphas are correct ? Apologies for creating more confusion. I'm a bit > confused myself at this point. So let me check this again and get back > to you.) > > (Note to self: some documentation is in order here!) Erm yeah, that's why I went back the the CEI docs :) > Looks like the Gimp approach may not work... I tried gimp and the composited image was wrong but a different wrong than the PC output. Thanks for your help, James -- ------------------------------------------------------------------------ James S. Perrin Visualization Research Computing Services The University of Manchester Kilburn Building, Oxford Road Manchester, M13 9PL t: +44 (0) 161 275 6945 e: jam...@ma... w: www.manchester.ac.uk/researchcomputing ------------------------------------------------------------------------ "The test of intellect is the refusal to belabour the obvious" - Alfred Bester ------------------------------------------------------------------------ |