I've been looking through the Ren'Py manual but I've been unable to see any sort of 'live' means of colour transformation of a displayable in ATL or anywhere else (apart from 'Solid'). The matrix stuff is awesome but only being able to use it with image manipulators somewhat limits it.
Is there something I'm missing?
Live colour alteration [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.
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Live colour alteration [SOLVED]
Last edited by Asceai on Sat Feb 01, 2014 8:19 am, edited 1 time in total.
Re: Live colour alteration
How would you use Solid to transform color on a displayable? One of the most powerful tools Ren'Py has is UDD, there you can draw on a canvas using pygame methods directly to renpy. You can create your own displayable that way and can have any color passed as arguments or do it inside the class itself. I don't really know any way to recolor any displayable even with UDD, maybe someone with more skillz in graphics will help us out (cause I wouldn't mind knowing this as well), but I am not entirely sure where I would use it (most displayable in RenPy are created from images anyway).Asceai wrote:I've been looking through the Ren'Py manual but I've been unable to see any sort of 'live' means of colour transformation of a displayable in ATL or anywhere else (apart from 'Solid'). The matrix stuff is awesome but only being able to use it with image manipulators somewhat limits it.
Is there something I'm missing?
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Live colour alteration
By alphablend-ing it with the displayable. Probably inefficient, definitely limited.xela wrote:How would you use Solid to transform color on a displayable?
Anyway, with a glance through pygame's documentation as well as of some StackOverflow-etc. questions about similar topics, it looks like pygame actually can't help here - when people asked about doing hue shifts and stuff, they were recommended to directly modify the image pixel-by-pixel. Not something I'd want to do in real-time, especially when it's something the video card could do much more efficiently (even with fixed-function opengl)
I guess this sort of makes sense, since pygame is IIRC just a thin wrapper on SDL and hence not designed to do this sort of thing.
Oh well!
Re: Live colour alteration
I would split the image into a red, green, and blue filtered image using photoshop. then overlay/blend the 3 sprites and adjust their alpha independently.
not sure if it would work in renpy, but thats how they process astronomical and meteorological images.
not sure if it would work in renpy, but thats how they process astronomical and meteorological images.
Re: Live colour alteration
I still haven't tried messing with AlphaBlending so my understanding of what it does is somewhat limited...
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Live colour alteration
That's a fair point; in fact, I don't need to keep different copies, I can just im.MatrixColor them to produce the r/g/b varieties and Additive Blend them together.Unin wrote:I would split the image into a red, green, and blue filtered image using photoshop. then overlay/blend the 3 sprites and adjust their alpha independently.
not sure if it would work in renpy, but thats how they process astronomical and meteorological images.
I suspect the additive blend part is necessary though, although this sort of effect would probably be be approaching too expensive for software in the first place so it might make sense to just create a separate, cheaper alternative if additive isn't supported.
Last edited by Asceai on Sat Feb 01, 2014 8:22 am, edited 1 time in total.
Re: Live colour alteration [SOLVED]
let us know how it works out. alot of people ask about hue shifting and if it works it'd be good to know.
- PyTom
- Ren'Py Creator
- Posts: 16088
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Live colour alteration [SOLVED]
For the record, live color blending is something I've had planned for a while. It will require shaders, which means giving up the software renderer and OpenGL 1.4 paths. That's something I'm planning on doing, but there are a few things that I consider to be higher priority at the moment.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: No registered users