Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Processing luminosity to alpha

A topic by dansimco created Oct 25, 2019 Views: 651 Replies: 3
Viewing posts 1 to 4

A common thing I find myself resorting to Photoshop for is taking a greyscale illustration, and converting it from black-on-white to black-on-transparent, allowing it to be composited on other things without resorting to blending modes. Is there a way to do this in Ronin?

Actually i guess what i'm looking for is alpha compositing, where in my particular use case I would use the input image as an alpha mask applied to a flat color

Developer

Oh, that's a good question, let me have a look :) There's definitely a way.

(1 edit)

You can use the `pixels` function to map an already black-white image to black-transparent.

You can find the Lain code here: https://gist.github.com/blad/bada86549b367cefd47fb82f8ac954c9

Here's an example I created...


Original lion image is from: https://unsplash.com/photos/SQszo1mP4sk/info