Page 1 of 1

Two transparency levels

Posted: Sun May 12, 2019 2:02 am
by r-tea
I created three small two-colour png images in Personal Paint.
Theese are white crosses onto black background. Images are of the same size and crosses are different.
I need to display them as brushes. I need the black background to be fully transparent and the white crosses half transparent.
How to obtain it easily?

Re: Two transparency levels

Posted: Sun May 12, 2019 11:23 am
by airsoftsoftwair
You can manually apply the desired transparency settings with Hollywood but why don't you simply create PNGs with alpha channel that have your desired transparency settings already applied?

Re: Two transparency levels

Posted: Sun May 12, 2019 12:12 pm
by jPV
There are many ways to do this in Hollywood, but here's an example of few cases:

Code: Select all

@BRUSH 1, "ram:1.png", {LoadAlpha=True} ; Load a brush that already has a (alpha) transparent color
@BRUSH 2, "ram:2.png", {Transparency=#BLACK} ; Load a brush and set a color in it transparent
@BRUSH 3, "ram:2.png" ; Let's set transparency later

SetBrushTransparency(3, #BLACK) ; Makes the black color transparent for the brush 3

; These will display brushes with transparent black color, but white fully visible

; When doing partial transparency we have to notice couple things....

; Brush 1 has already alpha channel, so you can just reduce it
ReduceAlphaChannel(1, "50%")

; Brush 2 is using a mask for transparency, so we have to change it to alpha channel first
ChangeBrushTransparency(2, #ALPHACHANNEL)
ReduceAlphaChannel(2, "50%")

; The previous ones modified the original brushes, but we could also do the transparency when displaying the brush and keep the original brush intact

BTW. when you save images in PPaint (as PNG for example), the color at the index 0 becomes transparent, and if you load such image in Hollywood with the LoadAlpha=True option, you don't have to set the transparent color manually.

PPaint can't do other kind of alpha transparency, so if you'd want fully processed semi transparent images that don't need processing in the actual Hollywood script, you'll have to use some other programs too... like RNOEffects ;)