Making a hue-shifting slider [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.
-
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Making a hue-shifting slider [Solved]
I am trying to make a slider where you can have a base image (of hair, for instance) and select hair color of a character using the slider to customize the character. There would be 3 sliders, Red, Green and Blue, which would change the amount of said color in the hair in real time as you moved the slider. So, how is it possible to do that in real time? Does it have something to do with the hue shifting functionality?
Last edited by SundownKid on Fri Dec 12, 2014 10:23 pm, edited 1 time in total.
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Making a hue-shifting slider
DynamicDisplayable(im.matrix.tint(value_changed_by_screen_slider_1, ....)) might be possible, but it must have huge disadvantage on performance. I don't know it's practically bearable to play a game. Currently, there's no way to change colors with hardware acceleration.
-
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Re: Making a hue-shifting slider
That is interesting. Well, I will try the dynamic version to see if it works, otherwise simply have a number of selectable colors instead.
P.S. Maybe you could put a code sample of being used with, say, "test.png"? I still don't quite understand how the code would be formatted.
P.S. Maybe you could put a code sample of being used with, say, "test.png"? I still don't quite understand how the code would be formatted.
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Making a hue-shifting slider
Code: Select all
def render_image(st,at,char):
return im.MatrixColor(char, im.matrix.tint(r, g, b)), .1 #re-render in 0.1 seconds. try .5 if performance is poor.
image girl = DynamicDisplayable(render_image, char="girl.png")
-
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Re: Making a hue-shifting slider [Solved]
Well the top part had to be put in an 'init python' block but otherwise it worked fine. It seems to be working albeit with some slight lag but that's better than nothing. Thanks!
Who is online
Users browsing this forum: No registered users