Re: Animated Ripple Effect
Re: Animated Ripple Effect
- Subject: Re: Animated Ripple Effect
- From: Gideon King <email@hidden>
- Date: Thu, 20 Apr 2006 19:24:08 +1000
I hope this is not too stupid a question (as I haven't started
looking into it myself, and don't know what technology is being used
behind the scenes), but is it possible to look at what the Quartz
Composer produces or what CIFilter does and derive OpenGL equivalents
so that I can do something similar both cross-platform and in 10.3?
TIA
Gideon King
email@hidden
On 19/04/2006, at 2:40 PM, Greg Herlihy wrote:
I think the easiest way to "ripple" a window's contents would be to
compose
the desired ripple effect within Quartz Composer. With Quartz
Composer it is
possible to fine tune (and preview) the ripple effect far more
conveniently
than it would be were the effect implemented in source code.
Furthermore, a
Quartz composition is much more likely to take advantage of any
available
graphics hardware acceleration when rendering the effect than would
a custom
implementation. Moreover the Quartz Composer IB palette makes it
easy to
integrate the QC composition into an app's UI with Interface Builder.
The basic steps to ripple a window using this technique would be as
follows:
first obtain a bitmap image of the target window's current contents
(see
cacheDisplayInRect:toBitmapImageRep:) which will serve as input to
the QC
composition. Next, create an overlay window of the same size and
location as
the target window and place a QCView (created with Interface
builder and
stored the program's nib file) within it. As the QC composition
runs in the
overlay window, the target window's contents will appear to ripple
in place.
Note that this technique can be used in any Cocoa app to apply
practically
any kind of Core Image effect (or combination thereof) - including
rotating,
flipping, bending, bulging, and swirling (just to mention a few of the
possibilities) - to a window's contents. Of course, it is easy to get
carried away, so exercising some restraint is probably advisable.
Greg
On 4/18/06 5:12 PM, "Steve Sheets" <email@hidden> wrote:
Most of the animated transition effects are fairly obvious how to
create (fade in, zoom in, slide in, spin in, etc), but how does one
create the Ripple effect using Cocoa & Quartz? I do not want to know
there is a Quicktime Transition (assuming there in), but instead what
type of calls (with Math) could be used to create the animation. I
have created lots of code (using NSTimers & NSImages) to animate
windows and custom views, but would like to duplicate the cool ripple
effect inside a window. Any suggestions, source code or pointers
would be appreciated!
Thank you,
Steve Sheets
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden