PDA

View Full Version : Compositing Mode Functions


handiklap
04-12-2006, 08:37 PM
Does anyone know of an online math breakdown of compositing modes? i.e. to composite in screen mode, evaluate this expression for pixel A and pixel B, to composite in overlay mode, evaluate this expression, etc. etc. I'm trying to script a custom compositing utility and this is pretty much the foundation for it all. I've found a bit of information with google, but sometimes it seems a bit vague. I understand that for the most part, compositing uses the value components of pixels for comparison, but what I get lost on is how, for example, a multiply mode - which is usually described as multiplying the value of corresponding pixels - is actually evaluated. Am I wrong in assuming the pixel value is on a 256-level grey scale? I'd like to find some useful info on screen, overlay, and multiply in particular, but any others would be great if anyone could link/explain.

tia

Edit: ok nm the first part, found this (http://partners.adobe.com/public/developer/en/pdf/blend_modes.pdf), and it would suggest that the value is rather a decimal value between 0 and 1, inclusive. Is that correct? I'm guessing that from the fact that with Multiply, any value multiplied with black will result in black, and any value multiplied with white remains unchanged.

Vympel
04-12-2006, 09:18 PM
Normally is used the values between 0 and 1 (but in floating point is possible to use values above or below of 0 and 1), in multiply mode you need only multiply the channels of two images ( ex, r1*r2,...). Others blend modes is more complex and use logical operations.

You can check these links

http://www.fxguide.com/modules/fxtips/files/logicops_sampler/ops_fset.html

http://www.pegtop.net/delphi/articles/blendmodes/

http://www.apple.com/support/shake/ (the help of shake have a lot of information)

handiklap
04-13-2006, 03:18 AM
sweet. the only thing i was having problems with was whether i needed to convert to HSV, or evaluate each component (r, g, b) independantly, and those links cleared that right up. Thanks a lot!

CGTalk Moderation
04-13-2006, 03:18 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.