Forums > MaxMSP

LCD object draw transparency

August 19, 2008 | 1:25 am

This LCD is already getting a load of messages, but I’d love to be able to make transparent PaintRect’s on it, somehow. Anyone know how to do this? Doing a message like "paintrect 64 64 192 192 255 255 255 128" still just paints a 128×128 black box, instead of a 128×128 box that’s at 50% opacity.


August 19, 2008 | 3:11 am

I know the help-file says penmode is deprecated but… currently, things seem different from what’s written.

So you might try ‘penmode 32′ in tandem with the ‘oprgb $1 $1 $1′ message… something like this:

– Pasted Max Patch, click to expand. –

August 19, 2008 | 3:46 am

Ah! This is so close to perfect it hurts. It’s not even your fault that it doesn’t work for me. Pretty sure it’s a bug in LCD – after all, penmode messages aren’t supposed to work anymore.

The problem is that whenever I move my paintrect (I’m using them as ‘zone’ delineation, the user can move them around and resize them) it flashes to more opaque. It seems to draw over itself a few times before it clears the old versions of it, so it’s layering on top of itself. Maybe I can bother the devs enough into giving LCD true transparency support. :P

Thanks much, though! I’ll keep toying with it and see what I can get.


August 19, 2008 | 3:57 am

Yes! Definitely bother the devs by sending your request directly to
support at cycling 74 dot com
since penmode is in the process of being phased out and the help-file even says to ‘use alpha’.

Btw, just in case it still might help, I got as far as I got by taking a look at the examples here and working from there:
Max5/examples/javascript/simulation

It may be that javascript can also help you with what you need, not sure… best of luck.


August 19, 2008 | 4:00 am

I will be out of the office from August 7 until August 25 and will not
have access to my email account. If you need assisitance while I am away
please contact Ana Varas at 754-321-2050 or ana.varas@browardschools.com

Thank you


August 19, 2008 | 4:49 am

OK, what’s with these messages from barbara? This is the second time I’ve seen one.


August 19, 2008 | 5:46 pm

i’d recommend staying away from penmodes. Unless i’m misunderstanding, you can just send a ‘frgb x x x x’ before you paint in lcd:

– Pasted Max Patch, click to expand. –

August 19, 2008 | 5:58 pm

Ah, sweet, that works. I guess that’s the alpha they were talking about in the helpfile(not directly within the paintrect drawsprite message but within frgb first).


August 19, 2008 | 6:15 pm

this is technically a workaround, there is some funkiness with paint commands ignoring the alpha. We are taking a look at it.

-Ben


Viewing 9 posts - 1 through 9 (of 9 total)