Is this a bug? Or just a basic color math concept I'm missing?
I have a PImage with a mask that draws correctly.
When I change the blendMode the mask disappears, except for ADD.
This holds true when I'm using P2D, P3D, and even when the PImage is mapped onto 3D geometry.
Is there any way to combine masks and blendingModes?
Thanks,
--David
Here's my code. I've used loadImage, but it works the same way with generated PImages:
I'm working on what should be a simple sketch, but I've run into a brick wall.
I have a scene made of several OBJ files representing several lamp objects, with simple cone shapes representing their light beams. I need to be able to set their color and intensity, to use a gradient bitmap as a transparency mask (which makes a nice falloff effect) - but I can't figure out how to do any of that for PShapes made of imported .obj files.
The problem I'm having is that all of the normal operations like tint() or texture() require that they be called in between the beginShape() and endShape() operations -- but for imported OBJ files there's only loadShape(), which happens all at once.
I've also tried using the SaitoOBJLoader library, which is supposed to handle that kind of thing, but its texture operators don't seem to work in Processing 2.0
Am I missing something obvious?
Thanks,
--David
Here's an example of a nonworking scene. It runs, but gives me the errors:
tint() can only be called between beginShape() and endShape()
texture() can only be called between beginShape() and endShape()