Page 1 of 1
Overlay animation effects?
Posted: Fri Apr 25, 2014 11:14 pm
by AERenoir
So in the Magical Diary game when you do magic spells they seem to be glowing like they're on Overlay or Add layer effect in Photoshop.
(see in the trailer below)
http://www.youtube.com/watch?v=YZ1Kwu0kGMc
Can Ren'py put images on "layer effects" like that?
Re: Overlay animation effects?
Posted: Fri Apr 25, 2014 11:21 pm
by Asceai
Yes.
But that's the only one.
EDIT: By the way, Magical Diary is Ren'Py so anything in Magical Diary can be done in Ren'Py =P
Re: Overlay animation effects?
Posted: Fri Apr 25, 2014 11:28 pm
by AERenoir
Oh, yay! How do I write in that additive effect to the code? :O
(I wonder if the "change eye colour through gradient bar" thing that MD has is a trade secret because that looks really neat)
Re: Overlay animation effects?
Posted: Fri Apr 25, 2014 11:36 pm
by Asceai
Oh, yay! How do I write in that additive effect to the code? :O
Using ATL. Same as alpha transparency, but the keyword is 'additive' instead of 'alpha'. If you don't know ATL I wouldn't be adding expensive magical effects to your game juust yet.
(I wonder if the "change eye colour through gradient bar" thing that MD has is a trade secret because that looks really neat)
I don't know exactly how Magical Diary does it, but
AlphaBlend,
Solid and
LiveComposite are a good combo for that. It wasn't necessarily done that way though.
EDIT:
Here's something I wrote on the subject. (there's also example code further down) It's hair, not eyes, but it's still a method of allowing an arbitrary colour for a body part to be specified. Just a matter of adding the colour selector.
Re: Overlay animation effects?
Posted: Fri Apr 25, 2014 11:42 pm
by AERenoir
Oh, I know how to do ATL. I just don't know where the additive keyword should be placed into.
Re: Overlay animation effects?
Posted: Fri Apr 25, 2014 11:43 pm
by Asceai
Just throw in 'additive 1.0' somewhere, like you might put in 'alpha 0.5' to get a 50% transparent image.
Re: Overlay animation effects?
Posted: Sat Apr 26, 2014 7:44 am
by Spiky Caterpillar
AERenoir wrote:Oh, yay! How do I write in that additive effect to the code? :O
(I wonder if the "change eye colour through gradient bar" thing that MD has is a trade secret because that looks really neat)
Not a trade secret; I just fed a ui.bar's output into im.MatrixColor()'s im.matrix.hue(). Something like im.MatrixColor('faces/eyes-big.png',im.matrix.hue(value_from_bar)) should work.
The additive/subtractive/dodge effects in Magical Diary/DW/SG are actually rather messy hacks, as they predate official support for blend modes. (For that matter, I'm not sure if mainline Ren'Py supports blend effects in the software renderer at all or only in the accelerated renderer.)
Re: Overlay animation effects?
Posted: Sat Apr 26, 2014 7:49 am
by Asceai
Spiky Caterpillar wrote:Not a trade secret; I just fed a ui.bar's output into im.MatrixColor()'s im.matrix.hue(). Something like im.MatrixColor('faces/eyes-big.png',im.matrix.hue(value_from_bar)) should work.
Huh. I think I need to learn more; I was under the impression image manipulators had to all be set up during init, but I guess not!
Re: Overlay animation effects?
Posted: Mon Apr 28, 2014 1:46 am
by AERenoir
Spiky Caterpillar wrote:AERenoir wrote:Oh, yay! How do I write in that additive effect to the code? :O
(I wonder if the "change eye colour through gradient bar" thing that MD has is a trade secret because that looks really neat)
Not a trade secret; I just fed a ui.bar's output into im.MatrixColor()'s im.matrix.hue(). Something like im.MatrixColor('faces/eyes-big.png',im.matrix.hue(value_from_bar)) should work.
Oooh, okay. Now I have to study up ui.bar functions, then...