We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a code that generates random colors, but I want to apply them to the scene as a whole, not simply the background. Is there any simple way of filtering an entire sketch? Thanks!
What's about drawing rectangle above all other stuff and making it half transparent?
You can make a coy of the screen, use tint() on it, and display it …
// draw your stuff
rect(0,0, 300, 200);
ellipse(width/2, height/2, frameCount/10, frameCount/10);
//make a copy of the screen so far
//I used the get with 4 parameters to show the result
// so the effect is happneing only in half screen
// use get() with no parameters to apply it to full screen...
PImage p = get(0, 0, width/2, height);
// do whatever you need to the image
// display it...
image(p, 0, 0);
So I inserted _vk's logic into my sketch, but I am trying to tint a screen that contains a .obj, and for some reason the .obj ignores the tint that should be on top of it. Here's a link to the compressed project. Thank you _vk! and Ater, your idea should also work and might be a lot simpler, so I'll give that a shot too.
you could try drawing everything inside a PGraphics area and then tinting it. or make a strokeless rectangle that is tinted and highly opac? Im still rather new to processing...