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: 312
Joined: Fri May 27, 2011 8:23 pm
Contact:

Overlay animation effects?

#1 Post by AERenoir » Fri Apr 25, 2014 11:14 pm

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.

User avatar
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 » Fri Apr 25, 2014 11:21 pm

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: 312
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Overlay animation effects?

#3 Post by AERenoir » Fri Apr 25, 2014 11:28 pm

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)

User avatar
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 » Fri Apr 25, 2014 11:36 pm

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: 312
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Overlay animation effects?

#5 Post by AERenoir » Fri Apr 25, 2014 11:42 pm

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

User avatar
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 » Fri Apr 25, 2014 11:43 pm

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

User avatar
Spiky Caterpillar
Veteran
Posts: 252
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 » Sat Apr 26, 2014 7:44 am

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.

User avatar
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 » Sat Apr 26, 2014 7:49 am

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: 312
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Overlay animation effects?

#9 Post by AERenoir » Mon Apr 28, 2014 1:46 am

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: WillandBran