How to show image with some alpha channel? [solved]
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
ShadowScaleFTL
- Regular
- Posts: 34
- Joined: Sun Aug 16, 2015 12:11 pm
- Contact:
How to show image with some alpha channel? [solved]
So i make an art. And alpha black and white mask, So i need to show art with this mask. How i can do this? I mean show just a part of art
Last edited by ShadowScaleFTL on Sun Oct 23, 2016 2:31 pm, edited 1 time in total.
- MaxYablockin
- Newbie
- Posts: 3
- Joined: Fri Oct 14, 2016 4:47 am
- Contact:
Re: How to show image with some alpha channel?
You need im.AlphaMask() https://www.renpy.org/doc/html/displaya ... .AlphaMask
Re: How to show image with some alpha channel?
What exactly are you trying to show/make transparent? Is it a movie or a picture?
If it's a picture, then you don't need a black and white alpha mask, all you need is to open up the picture in Photoshop or GIMP(which is free), and edit the background/part of the picture to be transparent. Then export the picture as a PNG and it should work just fine in Renpy.
If it's a picture, then you don't need a black and white alpha mask, all you need is to open up the picture in Photoshop or GIMP(which is free), and edit the background/part of the picture to be transparent. Then export the picture as a PNG and it should work just fine in Renpy.
- Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: How to show image with some alpha channel?
Check out AlphaMask displayable: https://www.renpy.org/doc/html/displaya ... splayables
Something like:
However, it you do not intend to reuse single image with different masks, it might be better to do as Lemme12 suggests and just make a single image already modified to your tastes.
Something like:
Code: Select all
image art = AlphaMask('art.png', 'mask.png')< < insert Rick Cook quote here > >
-
ShadowScaleFTL
- Regular
- Posts: 34
- Joined: Sun Aug 16, 2015 12:11 pm
- Contact:
Re: How to show image with some alpha channel?
Its a part of animation and will used with a lot of arts, so i cant to edit all of them to use in similar animations. So i need a mask to use itLemme12 wrote:What exactly are you trying to show/make transparent? Is it a movie or a picture?
If it's a picture, then you don't need a black and white alpha mask, all you need is to open up the picture in Photoshop or GIMP(which is free), and edit the background/part of the picture to be transparent. Then export the picture as a PNG and it should work just fine in Renpy.
-
ShadowScaleFTL
- Regular
- Posts: 34
- Joined: Sun Aug 16, 2015 12:11 pm
- Contact:
Re: How to show image with some alpha channel?
Thanks. it helps!MaxYablockin wrote:You need im.AlphaMask() https://www.renpy.org/doc/html/displaya ... .AlphaMask
Who is online
Users browsing this forum: Hojoo