Blend Modes & Silhouettes | Game Maker Studio 2


In this video we learn about what blend modes and colour channels are, why they’re important, and how we can use them to make object silhouettes.

Here I am in other places:

Helpful blog posts:

Artwork by “Buch” on opengameart:
-King & Hooded Dude from “A Platformer in the Forest”
-Tiles & Trees from “The Field of Floating Islands”


Xem thêm bài viết khác:


  1. Hello. Love the tutorial, but is there any way to get depth working also when showing silhouettes? Now every silhouette shows in default instance creation order when behind layers. Happens both with the depth = -y method and while I'm using the grid depth system. Thanks.

  2. this is so good, i watched it all but sadly i cant apply because i did some shenanigans with my shaders and the sillhouete is looking super small, still loved the tutorial.

  3. Is it possible to erase/set transparent the part of the sprite that’s colliding? Would really help with my top game that has platforming elements. Right now I’m just drawing the whole layer on top of the sprite if it’s colliding and it’s z axis is lower, which Causes a lot of problems haha.

  4. I use the following quick method for something similar:
    in my obj_TreeSprite I have a create event and a step event. Overview: If the player touches a pixel in the obj_TreeSprite layer mask, then obj_TreeSprite will reduce it's own alpha to 0.5 or whatever you want and if the player is not touching again then it sets itself back to alpha = 1.
    [[ CreateEvent code ]]
    /// @description Depth Correction

    depth = y * -1;

    [[ StepEvent code ]]
    /// @description Collide with obj_Hero or whatever your user object is
    if collision_point( x, y, obj_Hero, true, true ){

    if(obj_Hero.depth > depth){

    image_alpha = 0.5;



    if(image_alpha < 1){

    image_alpha = 1;



  5. I just followed the video along but for some reason when I draw the rectangle it makes my whole screen black.
    It seems like the draw_set_alpha in this piece of code doesn't trigger for some reason.

    draw_set_alpha(0) <——————-
    draw_rectangle(cx, cy, cx+w, cy+h, false);

    Any idea what I could do to make this work?

  6. great tutorial. However, for it works only to an extent​. When I hide, then it shows the silhouette very clearly, but it also shows me light marron although I am not hiding. But I want it to show me only when I hide and when I not hide, it should return normalcy…please HELP!

  7. im surprised i didnt see this sooner for GML 1. It has all the required functions etc (with different names), but it definitely made it easier that what i had going with shaders i made XD.

  8. Not going to lie, this is one of the most helpful channels I have been across. Thank you for your hard work, keep it up. 🙂

  9. This helped me so much! I have been trying to work with blend modes for an hour or two, and I couldn't figure out why the alpha blend modes didn't seem to be working for me. When you got to the part about the alpha-0 rectangle, it suddenly clicked; my test drawings were pulling in alpha values from the pixels behind the object I was drawing! Adding in that alpha mask made everything work perfectly. Thanks again so much for making this video!

  10. If using an additive blend mode, can't the value overload by exceeding 255? Does GML have any kind of error handling in place to just max the value out or would I need to code error handling in for such a thing myself?

    Or am I just wrong about it overloading altogether?

  11. So any idea on how you would tackle getting the silhouette to show through the trees as well, in the same manner it's showing through your upper tiles (using the depth = -y method)? I have them on a lower layer depth than my player instances, but I'm not quite sure how to handle that considering my trees are also objects getting their depth based on their -y position. This is an awesome effect, but I'm not 100% sure how to control it just yet. Thanks for any help you can give me.

  12. Thanks again, this was great! I implemented this into my project… but I have a question. I have the Drawing Control Object "high" enough to draw the silhouette when I am behind tiles only.. BUT.. I also have a Parallax Scrolling Foreground layer above the Silhouette Drawing Object… Is there a way to have the drawer ignore the Layer above it, so that only the tiles draw the silhouette and not the foreground? Thanks so much.

  13. These are phenomenal. Love how in depth and clear your explanations are. Easy to follow and instructive. Please keep up the great work!


Please enter your comment!
Please enter your name here