필터 지우기
필터 지우기

Transparency: additive color blending

조회 수: 3 (최근 30일)
Pierre
Pierre 2013년 6월 26일
Hi,
Matlab seems to use the classical way to handle alpha channels, so that transparency works in a way 'subtractively', like layers of translucent fabric. If you pile up patches set with FaceAlpha = 0.5, say, you'll eventually end up with a dark zone.
I'd like to generate an additive mix, corresponding to the superposition of several light sources. Piling up enough of these patches would eventually lead to a white zone. If you code in OpenGL you can play with different modes of alpha blending, but I haven't found a similar way to do it in Matlab.
Thanks for any clue!
P.
  댓글 수: 3
Pierre
Pierre 2013년 6월 27일
I basically thought of adding alpha-premultiplied color channels (works only on a black background). Said otherwise: not multiplying the destination color by (1-alpha_src).
There may be smarter ways to do this. Please suggest them! Nevertheless 1) I'd like the color mix to be symmetrical; 2) it must be codable in Matlab!
Richard Voigt
Richard Voigt 2013년 7월 22일
I just went looking for pretty much exactly the same thing. Have a couple answers which are "close" but still not achieving symmetry.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by