Page 1 of 1

wondering how to blend a gradient on top of an item, but nothing else

Posted: Thu Feb 23, 2017 5:34 pm
by Nikki
So I have a bird made up out of smaller parts,
Image

I'd like to put a gradient on it's bottom parts to make it look like its under murky water
If I just blend multiply that gradient on top I get this as a result,
Image

I'd like something like this (made in PS)
Image

How do I achieve this effect?
I need it i runtime so i can tween the gradient a little back simulating water movement and tween it away when th bitd is ocoming out of the water, also the feet will be animated. So icannot just combine this gradient in photoshop it needs to be done smarter,

thanks in advance!

Re: wondering how to blend a gradient on top of an item, but nothing else

Posted: Thu Feb 23, 2017 5:50 pm
by Nikki
ok sorry, for asking without researching properly, the answer is : by using a Canvas.

Re: wondering how to blend a gradient on top of an item, but nothing else

Posted: Thu Feb 23, 2017 8:35 pm
by HugoBDesigner
You can use a stencil. Copy the drawing of the bird parts to a stencil, then draw the gradient using that same stencil. love.graphics.stencil

EDIT: To use a stencil you'll need shaders, forgot to add that.

Re: wondering how to blend a gradient on top of an item, but nothing else

Posted: Thu Feb 23, 2017 8:48 pm
by Nixola
And if he's using shaders he might as well not use a stencil...