Page 1 of 1

Advanced particle-based special effects?

Posted: Tue Sep 27, 2011 2:21 am
by wizzardx
I'd like to check this quickly.

I know that Ren'Py has a particle system, but it's mainly for animating (lots of) regular Ren'Py sprites.

But is it possible to get more advanced graphics-processing effects too, or a good approximation?

For instance:

- Animated fire effect (like you'd see in a lot of older graphics programming demos)

- Large numbers of glowing/lumanescent and pulsing particles - basically like you'd see as a special effect in many games for magic. eg: A magical being teleports onto the screen in a special effect, the screen flashes, but also a really large number of magical glowy particles fly out for a moment.

I think that usually those are procedurally generated (usually in optimized C code), or at least hardware-supported, rather than being simple image-based animations.

If those can't be done with directly Ren'Py, is it perhaps possible for Ren'Py scripts to hook into OpenGl (or C code) at those points, or doesn't that play nicely with the Ren'Py rendering model?

Re: Advanced particle-based special effects?

Posted: Tue Sep 27, 2011 3:00 am
by Soraminako
Hmm, I can't help you with the particle part of your question, but if you want a teleport effect, using a custom dissolve effect with the right kind of image as the effect itself to dissolve a sprite in will give the impression of "teleporting" or something similar.
If you figure out how to add the particles you described as well, the end effect should look like what you described.

I made this graphic, which I use for my teleporting/phasing in effect:
dissolve09.png
It may look lame in here but when used as a custom dissolve in game it makes for a nice "beam me up, Scotty!" look. XD

Hopefully it might be a little useful, even if it's really only a tiny portion of the stuff you mentioned in your question. ^^;

Re: Advanced particle-based special effects?

Posted: Tue Sep 27, 2011 3:40 am
by jack_norton

the video above was done with a OLD version of Ren'Py. With the new screen and ATL I think you can do much better (I had to limit the number of particles since was slowing down a lot because used only software rendering).
As for the other HW specific things, once DX version is fixed I know pytom has in mind to add shader code - shader are excellent to do such effects (though I have no clue myself how to do them!)

Re: Advanced particle-based special effects?

Posted: Tue Sep 27, 2011 10:32 am
by PyTom
SpriteManager can do quite a few particles, at least in OpenGL mode. Check out the demo for more on that.

Right now, we only support the normal (over) blend mode. Additive blending will be helpful for this stuff, but isn't going to be on the table until the GL improvements of 6.15.

Re: Advanced particle-based special effects?

Posted: Wed Sep 28, 2011 5:01 pm
by wizzardx
Thanks for those replies - very useful information 8)

- Soraminako - thanks, saved 8) . I have used image dissolves before, they're pretty cool (eg: combine dissolve with image dissolve for screen transitions). Though dynamic pixel warping or updating effects (heat wave, water ripples, fire effects, etc) are still on my wishlist for a future Ren'Py release.

- jack_norton - that's a pretty cool effect, thanks for sharing 8) . If PyTom adds shaders later, hopefully we'll get some nice examples for how to use them, too.

- PyTom - Thanks for that info. It sounds like a lot of interesting things are still coming. Thanks for all the work you put into this project 8)

Well, in summation, I guess these things are good candidates for my original question:

- Fire effect - have a pre-rendered series of PNG files with alpha, and cycle them?

- Screen spammed with magical/animated glowy particle things: Get a good particle PNG animation or two, and spam them like crazy with SpriteManager in OpenGL mode.

So, here's my next question:

Are there any good sources for the above types of "special effect" images for animation? Stuff like random magic particles, or animated (full-screen?) fire effects?