We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › texture Image Mode possible suggestions
Page Index Toggle Pages: 1
texture Image Mode possible? suggestions? (Read 437 times)
texture Image Mode possible? suggestions?
Mar 7th, 2006, 1:53am
 
i have a simple processing app that I just started: I implemented it simply with a texture map.  However for what I have in mind for this app in a bit, I need to either figure out a way to implement an image mode to my texture map or

i suppose rewrite the function to add pixels instead?  I know there's probably an alpha channel solution but I really think that image modes look more authentic.

I'm not smart enough to write the really low level stuff.  yet.


has someone handled this or is there a convenient alternative?  I'll post the code if needed but I'm pretty sure my question is clear without it.

Oh to be really specific, all i need really is a Multiply mode.

Re: texture Image Mode possible? suggestions?
Reply #1 - Mar 7th, 2006, 4:17am
 
You could copy the image to a buffer, apply a multiply filter then reapply the image to the texture.
Re: texture Image Mode possible? suggestions?
Reply #2 - Mar 7th, 2006, 7:31pm
 
thanks i will give it a shot.

ok this seems to have the same result
whether the filter is commented out or not, but of course with a massive
cpu slowdown if i'm calling this function a lot.



   PImage buf = lineImg;
   buf.filter(MULTIPLY);
   noStroke();
   beginShape(POLYGON);
   texture(buf);
   vertex(x1,y1, 0, 0);
   vertex(x2,y2, 100, 0);
   vertex(x4,y4, 100, 100);
   vertex(x3,y3, 0, 100);
   endShape();


any thoughts on how to get this to work?  I'm fine with using the filter if it actually works: my app is geared towards frame exports.

http://www.ndrw.net/content/p5discourse/test00.mov
http://www.ndrw.net/content/p5discourse/test01.mov

here are a couple videos of the applet in action.

as you can see the texture is overwriting the prior texture  rather than multiplying into it, which is why there's jointing going on.  advice would be most welcome.
Page Index Toggle Pages: 1