Quantcast
Channel: Adobe Community : Popular Discussions - After Effects SDK
Viewing all articles
Browse latest Browse all 73444

How to composite masks?

$
0
0

Hello,


I am trying to generate a layer containing the alpha information from all the masks applied to a composition.

However, that does not appear to be an easy task.

 

I was able to obtain the information about the masks using mainly AEGP_GetNewMaskStream.

I can also apply that information to a work layer using PF_MaskWorldWithPath (although I had to give up on applying the mask expansion feature since it cannot be applied using this function).

I am now trying to composite all the masks together based on each mask's mode, but there does not appear to be a direct correspondance between mask modes and the transfer modes used by the compositing functions (from PF_WorldTransformSuite1).

In particular, I doubt I can find something that reproduces the strange behaviour observed with the mask's subtract mode (the behaviour appears to be completely different based on whether there are other masks present and whether these other masks are also in subtract mode ).

 

Someone mentioned comparing the layer obtained right after applying the masks to the original layer.

However, I can't find the mask values for pixels that have 0 alpha in the original layer using that method, and since my effect reveals 0-alpha pixels, I do need that information.

 

Right now I am thinking that the only solution is to make my own function to composite the masks (i.e. reverse-engineer and re-write the masking procedure applied by AE)

 

Does anyone have a better solution?

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 73444

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>