xyz i want to modulate the texture as another texture, like it changes the image
[GODOT 4.1] "CompressedTexture2D" version for a color code?
SuperGibaLogan Can you show an example of this done in an image editing app?
xyz right here (it turns from the regular texture to another texture)
- Edited
SuperGibaLogan Like a crossfade? Simplest to just use two sprites and animate their alphas.
xyz yeah kinda except the changed texture completely takes the former texture's spot
- Edited
SuperGibaLogan yeah kinda except the changed texture completely takes the former texture's spot
That's the definition of crossfade
Put two sprites one over another and animate one's alpha form 0 to 1, and other's alpha form 1 to 0.
Alternatively you can do it with a shader. I think I even posted a shader like this long time ago. If you can find it...
xyz oh
btw i wont rlly do it with a shader, ill do the modulate thing
SuperGibaLogan Then it's a no brainer. Animate the alphas.
xyz o, ill use a shader then
SuperGibaLogan but im not rlly sure how to write a shader code
- Edited
SuperGibaLogan Well, then maybe animate alphas.
xyz alright, i could prob use an animationplayer2d or another animation node
SuperGibaLogan Or a tween.
xyz could be
reading this thread gives me cancer.
feels like one is talking tomatoes and other tamatos.
@xyz said just have two sprites in the same place, or node or whatever, animate one sprite going to transparant, invisible and other going from transparant to full color.
whats so difficult here to understand? whats the problem?
- Edited
kuligs2 ill try putting 2 animation players in the same place then
EDIT: realized the image is an animationplayer2d so i duplicated it
xyz so uhh how do i do the "one going transparent and the other going to full color" thing with 2 animationplayers?
- Edited
Guess I'm in for some spasmodic eye twitching on top of that headache
SuperGibaLogan so uhh how do i do the "one going transparent and the other going to full color" thing with 2 animationplayers?
You can animate them both with one animation player. The property you want to animate is modulate.a
on both sprites.
xyz alright then