Now that we can use variables to create dynamic images, I really want to take advantage and apply Image Manipulations to them, such as desaturating them on characters not speaking.
Unfortunately when I use the im. functions it doesn't seem to transpose the variable names into a filename, and therefore throws an error.
Is there a way I could put dynamic images into im. functions?
[Solved] Altering the appearances of Dynamic Images
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.
[Solved] Altering the appearances of Dynamic Images
Last edited by kivik on Tue Apr 17, 2018 8:51 am, edited 2 times in total.
Re: Image Manipulators on Dynamic Images
No. Says so on the tin. https://www.renpy.org/doc/html/displaya ... nipulators
Re: Altering the appearances of Dynamic Images
Ah I didn't see that sorry. So if im are being phased out, is there any way of say, desaturating a dynamic image?
Re: Altering the appearances of Dynamic Images
Ok I kinda hacked an ugly solution to my problem, but I'd really welcome anyone with a better solution. In my case I couldn't see a way of changing saturation so I created a black 25% opacity overlay image and did the following:
grey.png is the same size as my portrait, and is placed on top of my DynamicImage thus making it darker. Then by reusing the DynamicImage as the mask, it cuts out the unwanted grey.
Code: Select all
define config.speaking_attribute = "speaking"
image catherine = AlphaMask(LiveComposite((667,1080),
(0,0), "portrait/catherine/[catherine.makeup]-[catherine.outfit]-[catherine.get_contentment.state].png",
(0,0), "grey.png",),
DynamicImage("portrait/catherine/[catherine.makeup]-[catherine.outfit]-[catherine.get_contentment.state].png"))
image catherine speaking:
"portrait/catherine/[catherine.makeup]-[catherine.outfit]-[catherine.get_contentment.state].png"
Re: Altering the appearances of Dynamic Images
Okay so the above code seems to work at first glance, until my variables changed and the DynamicImage (the mask) doesn't get updated. I've tried forcing image prediction or disabling it with no luck.
So I'm just completely at a loss at how to grey out non-speaking characters dynamically without doubling my images like I did in a previous game by creating greyed out version of characters.
So I'm just completely at a loss at how to grey out non-speaking characters dynamically without doubling my images like I did in a previous game by creating greyed out version of characters.
Re: Altering the appearances of Dynamic Images
There is no way to change the saturation with ATL. The following should work more or less, some fiddling probably required to get it the way you want.
Code: Select all
transform mask:
alpha 0.2
transform darken(child):
AlphaBlend(At(child, mask), child, Solid("#000"), alpha=True)
image char = At("images/[var].png", darken)
image char speaking = "images/[var].png"
Re: Altering the appearances of Dynamic Images
Nice! Thank you philat! That works exactly as I want and is so much simpler
Who is online
Users browsing this forum: Ahrefs [Bot]