Overlay animation effects?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Overlay animation effects?

#1 Post 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?
Last edited by AERenoir on Fri Apr 25, 2014 11:29 pm, edited 2 times in total.

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Overlay animation effects?

#2 Post 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

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Overlay animation effects?

#3 Post 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)

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Overlay animation effects?

#4 Post 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.
Last edited by Asceai on Fri Apr 25, 2014 11:44 pm, edited 1 time in total.

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Overlay animation effects?

#5 Post by AERenoir »

Oh, I know how to do ATL. I just don't know where the additive keyword should be placed into.

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Overlay animation effects?

#6 Post by Asceai »

Just throw in 'additive 1.0' somewhere, like you might put in 'alpha 0.5' to get a 50% transparent image.

Spiky Caterpillar
Veteran
Posts: 253
Joined: Fri Nov 14, 2008 7:59 pm
Completed: Lots.
Projects: Black Closet
Organization: Slipshod
Location: Behind you.
Contact:

Re: Overlay animation effects?

#7 Post 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.)
Nom nom nom nom nom LEAVES.

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Overlay animation effects?

#8 Post 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!

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Overlay animation effects?

#9 Post 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...

Post Reply

Who is online

Users browsing this forum: Google [Bot]