I want to combine red, green, and blue sprites to create white color in GDevelop 5.
I created three sprites: one red, one green, and one blue. I set all of their opacity to 75% and placed them on top of each other, expecting them to visually combine into white (like RGB light mixing). Every sprite has “RGB split (chromatic aberration)”
What is the expected result
When I overlap the red, green, and blue sprites, they should visually combine and appear as white color. The “Spectrum” game from gd.games is an example of what i expect.(the links dont allowed here i think.)
What is the actual result
Instead of white, I get weird colors. The colors don’t seem to mix properly like light would.
Related screenshots
Screenshot of the three overlapping sprites in the prewiew
Hi Eray and welcome. Interesting question, I had look at this. I haven’t played the spectrum game but here are my experiements.
I changed the blending mode of the colours to Add. Or Screen would also do it. I had the colours at full opacity and a black background. Not sure, but I think if it’s a lighter background the colours won’t show their full brightness. The second screenshot shows a background colour similar to yours. What colour is the spectrum game background?
THX!! I deleted the chromatic aberration effect effect and added the “change blend mode” event and it worked! but i wonder, how do you even know an event like “change blend mode” where did you learn it?
Firstly, a lot of users here will recommend to always type in the action or condition they want in the search bar at the top so that it filters out everything else. I recommend against this for beginners and instead recommend scrolling through the various conditions and actions to get familiar with them. If you see something that looks interesting, try it out and see what it does.
Yes. That’s the way.
Secondly, blending modes are used in painting apps to change how one layer interacts with the layer beneath it. So, while I don’t have a big understanding of them, it was the first thing I thought of when presented with your problem.