I'm wondering about how you would implement an effect similar to this one implemented in flash. It would just be a black screen which, when the user touches and drags over it, produces an effect similar to the one seen in the flash movie.
What is this effect called? Do you have a better example?
One of my biggest problems is articulating exactly what it is I'm talking about. I need both a name for this type of effect as well as a video that can display what it is I'm talking about. This would help others understand the problem better.
The closest term I could think of which describes something similar is a pointer trail. The only difference being that instead of showing the cursor, it would show a solid trail that gently fades away. The website that made the flash example, calls it Particle Ghosting. Another example of it is in this YouTube video for HP, which shows the effect between 0:30 to 0:36. It starts out more like paint, but eventually turns into the fading trail effect.
If you have a better name for this effect or a better example, please mention it and I will update the post.
Which iPhone technology would be required?
OpenGL or Quartz 2D? I'm guessing core graphics is out of the question due to speed. Any other technology I'm missing? It needs to be fast enough without any lag. Assuming a trail that lasts about a second at any given point, there may be a considerable amount of animated pixels at the same time when the user moves their finger fast. Possibly even filling up most of the screen with pixels that need to be faded out. The effect should look very elegant, nothing like the choppiness of the pointer trail in XP.
How would it be implemented?
Ideally, I don't want the fadeout effect to be as rigid as it is in the flash example (where it's a perfect circle), and more like in the HP video where the fade out is more organic (where there are different fadeouts at every point in the trail).
Would I manipulate individual pixels directly? I.e. would I need to keep track of every pixel that the finger has moved over and call a function repeatedly such as PaintPixel(x, y, brightness) which modifies the RGB value of the pixel? This seems like an excessive amount of pixel modification and sounds like it would slow the whole system down. However, I have never done this kind of thing before, so I wouldn't know if this is how it's usually done. For example, let's assume that a single touch takes up 32x32 pixels. We have 32 x 32 = 1024 pixels for each touch. As the finger moves, an additional 1024 pixels will need to be animated, most of which are already overlapping with the previous touch. Assuming the finger passed over the height of the iPhone within a second, we're talking about 480 x 32 pixels = 15,360 pixels being updated many times a second.
Would I use a small video clip that fades from white to black and just generate a lot of instances of the video clip as the finger moves? I don't have a version of Flash that can open up the flash example, so I can't examine the source code of it, but I'm guessing that it's just creating new instances of video clips as the dot moves around. This gets a bit tricky for an organic fade out which would probably involve making several fade out video clips and randomly choosing one for each point.
Would I use a set of images (e.g. 100 or so circles each representing a touch which fades from solid white to black) and then create and replace instances of them as time progresses? For example, as the finger moves I would display touch100.jpg at that point, which represents pure white, and in the next iteration the same point would display touch99.jpg, then touch98.jpg, continuing until it reaches touch0.jpg, which represents pure black.
Any other ideas I'm missing?
I'm sorry if these ideas sound outlandish. As you can probably tell, I have never done anything similar to this before so I don't know what the usual way of implementing this kind of effect is and I'm just throwing out any idea I can think of.
Which resources would you recommend to learn how to implement this?
Is there any learning material you would recommend for someone trying to learn how to implement this kind of thing?
I don't want to spend a bunch of time learning one technology (e.g. Quartz) when I would need to know an entirely different technology to implement it (e.g. OpenGL).
Is there any other information I forgot to provide?
Are there any additional questions you would recommend I ask?