This page is out of date

You've reached a page on the Ren'Py wiki. Due to massive spam, the wiki hasn't been updated in over 5 years, and much of the information here is very out of date. We've kept it because some of it is of historic interest, but all the information relevant to modern versions of Ren'Py has been moved elsewhere.

Some places to look are:

Please do not create new links to this page.


Turn an image into a silhouette

To convert an image to a colored silhouette, we can use a im.Matrix, with the help of this function (and its associated convenience function):

 init:
     python:
         def silhouette_matrix (r,g,b,a=1.0):
             return im.matrix((0, 0, 0, 0, r, 
                               0, 0, 0, 0, g,
                               0, 0, 0, 0, b,
                               0, 0, 0, a, 0,))
         def silhouetted (filename, r,g,b, a = 1.0):
             return im.MatrixColor (Image (filename), silhouette_matrix (r,g,b,a))

What the matrix above says is:

Once that function is defined in an init block as above, we can do things like this simple glowing effect:

 # this is the logo from the tutorial game (needed for this example)
 image logo = "logo.png"
 # and here's a version converted to a white silhouette
 image logo_whiteout = silhouetted ('logo.png',1,1,1)
 
 label start:
    # now we use some ATL to overlay the 'glow' on the logo and cycle its alpha.
    show logo:
        xalign 0.5 yalign 0.0
    show logo_whiteout:
        xalign 0.5 yalign 0.0 alpha 0.0
        ease 1.0 alpha 0.95
        ease 1.0 alpha 0.0
        repeat
    "Here we have the amaaazing glowing logo!\n\n{b}TADAAAA!{/b}"