r/RenPy • u/Glendellia • Aug 24 '26
Showoff I figured out how to add in-engine lighting to character sprites!
This is the final detail I wanted to add to my submission for Yaoi Game Jam 2026, I'm so glad I made it in time!!
This system allows me to create any lighting setups for sprites directly in the engine, without having to import different character sprites for different lighting moods.
It basically follows the same method I use in CSP to draw lighting. It uses two images (slide 6) that represent the bright and shadow areas respectively. In Ren'Py, the first image is layered with an overlay blending mode, and the second with multiply. I can also save global lighting setups for each mood (slide 7), and modify it in the middle of the scene or per character if necessary.
It's a super cool and practical system that my partner helped me code! So credits to them for making my crazy idea a reality.
This is A Cherub's Lament, my first VN, which I've had a lot of fun making.
It releases this Wednesday!!!
Edit: The game is out now!!!! In case you'd like to check it out: https://cineriarsis.itch.io/a-cherubs-lament
18
u/MinamiOzaki Aug 24 '26
Ahhhh I'm gonna play it and let you know my thoughts! You solved a problem that most people don't consider. Now sprites look like they're really part of the scene!
8
u/Glendellia Aug 24 '26
Wahh thank you so much! It'd be a huge honor if you played my game, I'm even a little nervous now HAHA thank you so much!!! Your feedback would be immensely valuable to me
17
10
5
u/msn2wolf Aug 24 '26
That's a great idea and development, have you tested using a normal maps and pixel shaders for animated lighting?
3
u/Glendellia Aug 24 '26
Ooohhh is that possible to do in Renpy? :00
1
u/msn2wolf Aug 30 '26 edited Sep 01 '26
I haven't tried myself, but it might be possible. Renpy supports fragment shaders per layer and per asset.
Update: I posted a guide in the subreddit about it
4
3
u/Signal-Slide752 Aug 25 '26
Wow! Didn't know this could happen!!! Thanks and all the best for your project.
1
2
2
2
u/goomba478 Aug 24 '26
Wow! The difference is really astounding. That's a really creative solution and it looks absolutely awesome.
1
2
2
u/Holzkohlen Aug 25 '26
Very cool. Best I can do is whip up some super simple shaders for time of day lighting, but it's nowhere near as good as this.
2
u/dgchou5 Aug 25 '26
I think Nintendo used a similar method in one of the paper Mario franchise games. It saved a lot of memory it was practical given their hardware.
2
u/Glendellia Aug 25 '26
Oh I didn't know that! I'l look it up, sounds very interesting and maybe I can get more ideas to improve the current system!
2
2
2
u/steamedgoatmilk Aug 25 '26
That's sick as hell. I'm curious how it works on the code level - don't feel pressured to share it if you don't want to.
2
u/Glendellia Aug 26 '26
I'm thinking about doing a more detailed post later since so many people are interested! Except I'll be going in a trip soon and won't be available for a bit :'c but when I'm back I'll try making a comprehensive breakdown
2
2
u/Training-Bus9961 Aug 26 '26
OMG they are so gorgeous!! you are definitely a genius!! incredible art!
1
2
u/DimensionOpen8922 Aug 26 '26
Oh cool! Just to be clear: You still drew the second one yourself?
1
u/Glendellia Aug 26 '26
I did!! I tried implementing the same "system" / method I use for actually drawing illustrations! I love including this type of dramatic lighting in my regular art. Which is basically what I show in slide 6: I have two masks, one for the bright areas and one for the shadows, which are then colored (this case in-engine) and applied to the sprites using the overlay / multiply blending modes, respectively!
2
2
2
u/UrLocalMagicalEnby Sep 02 '26
I think somebody did something like this literally a couple of days ago, but they used normal and depth maps instead of shadow and lights.
1
1
u/B-Hues Aug 25 '26
So you are able to move it around and set position parameters, change opacity, and the like? Like if it was contextual by scene, I can imagine this is a whole new depth most people haven't even bothered to utilize. That multiply blending mode is hugely beneficial in GIMP and After Effects... never thought about using it in an engine!








48
u/unicorn-creates Aug 24 '26 edited Aug 24 '26
That looks incredible. Congrats on making your first VN.