Hi,
Although I have experimented with Processing in the past I am only a beginner. I have been a Flash developer for many many years and I guess I am a bit spoiled because layer composition is so easy there.
I have browsed the internet for a solution to my problem but haven't found a good answer. I guess I am looking for the wrong things so I was hoping someone could help me. So here goes:
In Processing a common way to create a fade/trail is to draw a semitransparent rectangle over the sketch in every run. This is fine if you want everything to fade. I don't want that. I have a map in the background (full screen) and on top of that I am trying to draw graphics (full screen) that fades out over time, leaving a trail. I think I am supposed to use createGraphics() and create an off screen buffer for the graphic that I want to fade over time, and use the semitransparent trick on that graphic. Then I would use image() in the main draw loop to add the graphic on top of the map.
This works, but of course not quite. The semitransparent rectangle is exactly that - semi transparent - and therefor visible over the map.
Is there a simple and fast trick that I am missing when it comes to layering like this? I am sure it is not very effective to manipulate all the 1920x1080 pixels in the top layer and reducing the alpha over time.
Best,
Sammi
1