Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Thanks for replying!


I was aware of modulate, I was wondering how you can change the palette of a sprite, like each color in a sprite separately (unless I misunderstood what you meant). Do you usually just do the splitting and modulating method you mentioned? Or is there some magic you can do with shaders?


Example: If I'm using a 4-color GBA palette and want to switch it from a green color palette to a bubblegum one

There are two ways you can handle this:

With Shaders: If you follow the shader tutorial I posted, you can simply create a new set of gradients using your new color palette (or change the gradient you were already using). If using the gradient doesn't work for you, there is a LOT of "shader magic" you can do in Godot, and one option is to simply preset colors right in your shader code (or as an exported parameter) and just change your colors there.

With Modulate: You can do the "split" art method and just set up a Singleton of color references (either as individual variables or in a dictionary), and adjust your color references as need be. I've never personally changed colors quite so drastically as shifting from a green to bubblegum palette, but I am likely to decide that I don't like the shade of green I'm using and change it accordingly.

If you are being very limited with your palette (like only using 4 colors), then you could name your color variables by function (eg: shadow, highlight, midtone, background, etc.) I normally label mine as the colors they are (MyGreen, MyRed, MyBlue, etc.)

Does this help?

Yeah I think I understand it now! I watched the shader video and it makes some sense but I'm still intimidated by the shader coding language. That'll just come with practice though!

The only thing I'm a little unclear on is how you animate the sprites with the modulate method, cause it seems like it would be a chore to have to update the animation for the highlights, midtones, shading, etc..

By the way, I really appreciate you taking the time to do this, I can imagine it's a bit like IT answering our barrage of questions

Haha! Yeah, this is a bit like doing IT or teaching, but everyone is a whole lot nicer. ;)

On animating:
If you are using the "split" art method (which is just a version of the "paper doll" method), you wouldn't generally change the art color during animations. Like, when you walk across the room, your clothes don't change color. And since setting modulate/self-modulate sets it for the node, if you are using an "animated sprite" node, all images in that animation would be colored the same.

Like, if you had a fully-colored animated baby character, you might have separate art for the face, hair, mouth eye whites, irises, pupils, arms, legs, shirt, and diaper. Each of these would be their own sprite node with their own color and you then can use an "animation player" to move each piece separately.

Does that all make sense? If not, I can try to make some images to show what I mean.

I'm glad to hear that we are nicer than your average IT customer!

I think I understand visually what it would look like  a bit better, but to me it seems tedious to have to switch the animations for all of the different pieces, which makes me think I'm missing something. 

Like for instance if I want to switch from "idle" to "run" animation, I would have to tell the hair, the face, the iris, etc to switch their animations to "run". 

Also how would you split each frame, is that done in engine or do you have to do it in a sprite editing program?

Would you mind telling me the official name for this method so I can try and find some documentation for it? I looked up paper doll method but it seems to be mainly referencing skeleton animation which seems different

There are different terms, but sometimes it is called a "cutout animation".
Here is a video tutorial: (www.youtube.com/watch?v=lMFuEc1XsOQ)