Rim-Lighting in-game

How do I…

I’ve been trying for a while to optimize my games more to not bloat file size and I’m trying to make visual effetcs in-game as opposed to duplicating the same files and changing them.
The one I was trying right now is rim-lighting, but all my methods have failed (changing opacity and blend modes, masking etc.)

What is the expected result

It’s supposed to look like there’s a white highlight on the right side of the character sprites.

What is the actual result

It instead shows the whole thing I made (the duplicated object on top of the normal one)

Related screenshots

here’s how it looks in the event sheet (I would send the result in-game but this is my first post)
image

**Hi [ [SariBasics

I hope you’re doing well. It’s great to see that we’ve finally developed a dedicated extension that brings exactly what we were looking for to life.

I’m excited to share that I have completed the full Toon Shader Extension. It’s a comprehensive tool designed to streamline our workflow and achieve that perfect stylized look. Key features integrated into this version include:

  • Rim Light: For adding that crisp, professional edge highlights.
  • Outline System: To give objects a clean, bold illustrative feel.
  • Manga Style (Halftone): A specialized shader for that authentic comic-book aesthetic.
  • And more: Including several optimization and customization tweaks.

I believe this will significantly enhance our creative output. Let me know when you have a moment to check it out!

Best regards,

[islam]




Toon Shader Extension = · Issue #1982 · GDevelopApp/GDevelop-extensions

1 Like

this is great but sadly I don’t think this would work for my game, as it is 2D
but I will keep this extension in mind for when I develop my 3D educational game in the future since this could really help with the “90’s edutainment” vibe I’m looking for
thanks for the help though

Did you set the z-order of the duplicate to be lower than the original? I believe that’s what you might want to do.

what i wanted was for the shadow to be on top of the character

a
here’s an example of what i mean, it’s supposed to be like “inside” the sprite but instead it’s just whatever that is
so far i’ve had no luck fixing it

I see… I’m not sure if that can be achieved without using it’s own separate image.
One thing that comes to mind that could maybe be used is the mask extension.

You could try looking into that, though I haven’t used it myself so I’m sorry I couldn’t be much help with how to actually implement it.

I tried that too
Main reason I’m asking here is because I couldn’t find anything that could work
Thanks for trying to help tho, it is much appreciated

i was thinking that there’s the option to show only shadow in the shadow effect. So you could have a second player object on top - show only shadow and offset it at angle 130 degrees and distance 15

hold on yeah, that could work theoretically
like, changing the color of the shadow character to pure white, darkening the original player and do what you just said MIGHT be the thing to work
I’ll try it out, thank you for the idea!

1 Like

welp it certainly is an improvement but it came to the same problem as before

How about if the scale of the shadow is set to .9 and positioned a bit left and a bit down ?

same thing :frowning:

one thing that i’ve learned that works… decently, is the bevel shader, although i’ve only ever used it on pixel art and it’s not super dynamic, but throwing the bevel on what you want could achieve the effect! (just set the shadow to be fully transparent or youll have a weird really dark outline at the bottom)

tried it out and sadly it didn’t work but I’m thinking of making a pixel stage in this game so I’ll also keep this in mind for later

other than creating a whole new set of animations that have an index 30 higher (if you’ve got 20+ animations) and then if light on add 30 to the animation index - im stumped. A totally impractical but personally amusing solution is when the lights on - create 200 small lights and then scan the whole room with a rotating raycasts inside a repeat event which sends the lights to the intersects.

How about using spline? That should reduce the number of images used. Although putting the animations together will need a quite a lot more work.

my sprites are usually drawn and animated in flash so this is unlikely