Re: Flashlight effect
Status: Alpha
Brought to you by:
cwalther
From: James W. <jfc...@ya...> - 2009-11-01 02:05:54
|
Hi Christian, Yeah, I thought of that just a couple days ago, and I finished it. With that technique, one can use the effect on both panoramic and slide nodes. It's simple code, but just to enchance simplicity further, I think I'll try my hand at writing a function for it, to be placed in a lua file and attached to the project using dofile. I'm also going to try something similar with panoramic smooth rotation, which has never been implmented, and so will be rather more complex. Thanks, James --- On Sat, 10/31/09, Christian Walther <cwa...@gm...> wrote: From: Christian Walther <cwa...@gm...> Subject: Re: Flashlight effect To: pip...@li... Date: Saturday, October 31, 2009, 12:00 PM James Wilson wrote: > I've been experimenting with Pipmak a bit, and I was wondering, might it > be possible to write a "flashlight effect" function? > Here's how I'm thinking it'd work(and this is how it usually does in > games, I've checked) > > Cubic node background has images set that show a lit scene, with a weak > light with little falloff. > > Patches overlaid each of the faces have the same scene, rendered > with nearly no light. > > One patch(a PNG) with a flashlight "ring" on it. The ring area is > transparent, no coloration. > This patch is set to follow the cursor, and to "cut" through the > patches(according to the transparency of the flashlight patch) to the > node background. The way you describe, with totally independent lit and unlit scenes, is currently not possible in Pipmak. I'd have to think about how it could be implemented. However, if the unlit scene is simply a darkened version of the lit one, this can easily be achieved in the same way as the telescope in the demo project works. -Christian ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Pipmak-Users mailing list Pip...@li... news://news.gmane.org/gmane.games.devel.pipmak.user https://lists.sourceforge.net/lists/listinfo/pipmak-users |