To make a long story short, I am planning to add reshading/tint with Matrixcolor to side images, but all the tutorials I’ve found require defining and showing them individually by hand, since my game is already a million-words, I am seeking a simpler and faster method, preferably automatically adding tints to side images according to the current showing background scene (noon, night, etc.).
For your reference, this is the shading tutorial I am looking at, though not for side images (if you have recommendations for another way of coloring that performs better and faster to the system, welcome!): https://www.twoandahalfstudios.com/2019 ... atrixcolor
I understand that this is a really advanced function, but any help would be extremely appreciated, thank you!!
Adding Matrixcolor to Side Images Automatically Based on Scene
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.
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Adding Matrixcolor to Side Images Automatically Based on Scene
What version of Ren'Py are you using?
Do you only mean SideImages or others?
Do you only mean SideImages or others?
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Re: Adding Matrixcolor to Side Images Automatically Based on Scene
I am currently using 7.3.5.606. Yes, I only need the tint of colors to go on the side images, defined as “image side” for characters, not anywhere else.
I mentioned “scene” because I want the side image tints to correspond to background scenes, for example all night scenes would have the same dark blue tint. What I wish to achieve is to link the current showing scene with a tint on the current showing side image, so if I do:
Code: Select all
scene room_night with fade
eileen happy “My side image is automatically tinted with a dark blue shade.”
amy “Mine as well, because the current scene is room_night.”
scene room_noon with fade
eileen “Now our side image tint is automatically changed to a warm tint because it is now noontime.”
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Adding Matrixcolor to Side Images Automatically Based on Scene
Simplest then is to set one or two defaults and alter the screen say to show the SideImage using those in the function...
In Ren'Py 7.4 and beyond you'd want to do this in shaders though...
Note too that im.MatrixColor would only work when SideImage resolves to a physical file (not composite or layered etc)
Code: Select all
default tint = (1.0, 1.0, 1.0)
default brightness = 1.0
### in say screen
add im.MatrixColor(SideImage(), im.matrix.tint(*tint)*im.matrix.brightness(brightness))
label wherever:
$ tint = (0.45, 0.45, 0.75)
$ brightness = -0.07
scene ...
Note too that im.MatrixColor would only work when SideImage resolves to a physical file (not composite or layered etc)
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Re: Adding Matrixcolor to Side Images Automatically Based on Scene
Modify the say screen, wow, I never thought of this, this is simple and genius! Thank you so much!Remix wrote: ↑Sat Apr 10, 2021 7:31 pm Simplest then is to set one or two defaults and alter the screen say to show the SideImage using those in the function...In Ren'Py 7.4 and beyond you'd want to do this in shaders though...Code: Select all
default tint = (1.0, 1.0, 1.0) default brightness = 1.0 ### in say screen add im.MatrixColor(SideImage(), im.matrix.tint(*tint)*im.matrix.brightness(brightness)) label wherever: $ tint = (0.45, 0.45, 0.75) $ brightness = -0.07 scene ...
Note too that im.MatrixColor would only work when SideImage resolves to a physical file (not composite or layered etc)
Another quick question, would it be possible to get the current scene name? If so what variable or code do I use to get it? This way I can do things like “if scene_name” in the say screen to make things even easier.
Re: Adding Matrixcolor to Side Images Automatically Based on Scene
I think I’ve found what I need to get the showing image!
Still needs to be tested out.
Code: Select all
renpy.showing(name, layer='master') #Returns true if an image with the same tag as name is showing on layer
Who is online
Users browsing this forum: No registered users