Submitted by , posted on 08 March 2001



Image Description, by


Here's a departure from your normal 3d screenshots. Here's an effect I thought up the other night and hadn't recalled seeing before. It allows for a smooth melting/dissolving (kind of hard to describe) of an image.

It's really pretty simple. First you draw the background image (or clear the buffer if you're fading to black). Then you need an alpha texture with a nice gradient (middle picture) which describes the effect you want. You render this solely to the depth buffer with alpha testing on and some number for the vertex alpha (the number will increase or decrease each frame). Then you slap the texture being melted on top of that with a depth test on. If you want to get fancy, you can do what I've done here and do a slightly different alpha test on top of that to get nice little borders around the holes you've made.

Also, though I don't have shots of it here, you could use different alpha textures to get some different effects. Screen wipes or dissolves (see your favorite Star Wars movie for examples) are easy, though you really want the highest possible alpha depth for your texture on something like that. The background also doesn't have to be a single texture, it could be an entire scene. The engine I'm working on currently has a console that "melts in" when you open it, though I'll probably be tired of that soon enough. :)

If you've got any questions/thoughts/whatever feel free to post a comment.

Thanks for looking,
Andrew Perrine

PS - Thanks to id for the excellent door texture. :)



[prev]
Image of the Day Gallery
www.flipcode.com

[next]


 


Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.