Discuss Scratch

Doyousketch2
Scratcher
93 posts

Alpha Pen

I'd really like to draw with a transparency setting.

I know there's a Ghost effect,
but it only seems to do sprites, not the pen.

I think this would be great, because you could do something like watercolors that way.
Plus photo-realistic shading and highlighting.

I've recently been playing around with Python,
making a few projects with the Turtle module.

While you can make some great stuff,
I feel limited because it won't do transparency with the pen.

I messaged the Python developers to see if they could do it,
http://bugs.python.org/issue20920
and their reply is that the underlying TK only supports alpha for images.

Then I discovered Scratch.
I'm hoping that you can accomplish this.

I even downloaded the source code to see if I could help make it happen,
but Squeak only pops up with a blank window,
so I dunno what's going on there.

Anyway, I love the Scratch program,
and hope you can see to making the alpha pen a reality!
jontmy00
Scratcher
500+ posts

Alpha Pen

Support, I'd like a semi-transparent pen for my projects!
Firedrake969
Scratcher
1000+ posts

Alpha Pen

Support!
ilikelegos
Scratcher
100+ posts

Alpha Pen

funny, I've actually suggested this before. apparently dadofmrlog has to.
SUPPORT!
xlk
Scratcher
100+ posts

Alpha Pen

The edges of pen lines already have alpha, so this shouldn’t be too much of a problem,no? Correct me if I'm wrong
Doyousketch2
Scratcher
93 posts

Alpha Pen

ilikelegos wrote:

funny, I've actually suggested this before. apparently dadofmrlog has to.
SUPPORT!

Oh, I searched the forum before I posted, but nothing came up in the results.
I even switched it to Mobile view and tried again because I thought that was odd.

Maybe it was just a momentary glitch in the ‘Net.
Service has been buggy this Winter, so…

The reason being, I’m writing an art book, and it's about 1/3 complete.
I've got an 8 year old, and hope by writing, I could pass a good deal on to him.
As he could come back to it as an inspirational reference throughout his lifetime.

I intend to pass it along for free so anybody can benefit from my art skills.

The target audience is going to exactly match your group of people.
And I'd be willing to throw a smooth graphic on the cover that says “Scratch inside.”
So whatever you can do to make the alpha pen a reality will definitely bring more people your way.

I'd like to devote a good portion of it to computer graphics.
Showing the community how to programmatically‎ produce creations,
such as found on Scratch.

If you need help in understanding the way it works,
you might look into MyPaint - http://mypaint.intilinux.com/
or some of the other open source paint programs like GIMP.

I just say MyPaint, ‘cuz it’s written in Python,
so it should be relatively easy to understand what's going on under the hood.

Your fine community of bright minds will pick up on it quickly,
and I'll do my part to show the proper way to code with it in my upcoming art book.

Last edited by Doyousketch2 (March 27, 2014 19:31:27)

AonymousGuy
Scratcher
1000+ posts

Alpha Pen

Here's DadOfMrLog's suggestion about it: http://scratch.mit.edu/discuss/topic/6213/

He also brought up an issue: http://scratch.mit.edu/discuss/topic/6213/?page=1#post-38590
Doyousketch2
Scratcher
93 posts

Alpha Pen

AonymousGuy wrote:

Here's DadOfMrLog's suggestion about it: http://scratch.mit.edu/discuss/topic/6213/

He also brought up an issue: http://scratch.mit.edu/discuss/topic/6213/?page=1#post-38590

That's cool, but the point he brought up about it is pretty much a non-issue,
because once the pen is drawn the canvas is set to that color.

There is no over-or-under layer for pens.

It would just be normal blend mode - http://en.wikipedia.org/wiki/Blend_modes
on top of whatever current color the canvas is.

I suppose if you wanted to get real fancy you could have a drop-down for blend modes,
but that's not really my goal. I'd be happy with simple transparency.

With that simple change, you could make graphics
that look like they were rendered with ray-tracing enabled -
http://en.wikipedia.org/wiki/Ray_tracing_(graphics)

So I looked into the way MyPaint does it,
and while they use Python for most of their program,
they use C++ for the brushes to speed it up a bit.

It's still readable though, as they comment what they're doing in there pretty well -
https://gitorious.org/mypaint/mypaint/source/e06d41481bb91c059e76c231e1d3036a6fac7384:brushlib/brushmodes.c

Lemme know what your thoughts are.

Last edited by Doyousketch2 (March 27, 2014 23:55:30)

jontmy00
Scratcher
500+ posts

Alpha Pen

xlk wrote:

The edges of pen lines already have alpha, so this shouldn’t be too much of a problem,no? Correct me if I'm wrong
That is for antialiasing, not the actual semi-transparent pen.
Doyousketch2
Scratcher
93 posts

Alpha Pen

jontmy00 wrote:

xlk wrote:

The edges of pen lines already have alpha, so this shouldn’t be too much of a problem,no? Correct me if I'm wrong
That is for antialiasing, not the actual semi-transparent pen.
It works by blending the pen layer, so it should be do-able.

So I had this idea of using cloned sprites to mimic an alpha-pen,
and while it did OK, it's limited to 300 instances before it runs out of “ink.”

Then I discovered the “stamp” tool.
It sort-of accomplishes what I'm going for.
You can stamp with a semi-transparent sprite and get a similar effect.

I used a blended dot made up in GIMP.

You can't use pen size commands,
you resize with sprite percentages.

You “draw” with the pen up the entire time,
so that'll 'prolly confuse half the population.



You're welcome to peek inside my demo project - Soft Flower
and see how I used both drawing modes.

I'm sure I'll add a few more drawings that utilize this technique.
It's particularly well suited for portraits.

Let me know if you conjure up any designs this way,
either here, or as a note on my profile.

Also, as a side note: I figured out why I didn't see any results when I searched before.
I have this Firefox plugin called Ghostery and it was blocking “Google Analytics.”

Last edited by Doyousketch2 (April 13, 2014 02:32:20)

ExtremeLogic
Scratcher
500+ posts

Alpha Pen

Support.
mexican_hexic
Scratcher
16 posts

Alpha Pen

ilikelegos wrote:

funny, I've actually suggested this before. apparently dadofmrlog has to.
SUPPORT!
me to
Nether_before
Scratcher
1000+ posts

Alpha Pen

Support!
stickfiregames
Scratcher
1000+ posts

Alpha Pen

Since this topic was made it has become possible to use transparent pen, but there aren't any blocks for it. Support for
setpenghostto0changepenghostby1
Zarlog
Scratcher
100+ posts

Alpha Pen

Absolute support!
DeadGoldFish123
Scratcher
1000+ posts

Alpha Pen

This would look better

settransparencytochangetransparencybytransparency

Or

setopacitytochangeopacitybyopacity
AnnieAngie
Scratcher
1 post

Alpha Pen

Alpha pen colors certainly do exist. Setting a pen color to number in the high numbers yields colors of various alphas.
IronBit_Studios
Scratcher
1000+ posts

Alpha Pen

AnnieAngie wrote:

Alpha pen colors certainly do exist. Setting a pen color to number in the high numbers yields colors of various alphas.
???

Support! This would simplify a lot of pen graphics.
Macie1234
Scratcher
100+ posts

Alpha Pen

IronBit_Studios wrote:

AnnieAngie wrote:

Alpha pen colors certainly do exist. Setting a pen color to number in the high numbers yields colors of various alphas.
???

Support! This would simplify a lot of pen graphics.
It exists…
setpencolortotransparency*16777216+red*65536+green*256+blue
each number is 0-255 for example (transparency: 25 red: 255 green: 0 blue: 0) makes the pen red and 25% transparent.
ProgramminWeekly
Scratcher
30 posts

Alpha Pen

Macie1234 wrote:

IronBit_Studios wrote:

AnnieAngie wrote:

Alpha pen colors certainly do exist. Setting a pen color to number in the high numbers yields colors of various alphas.
???

Support! This would simplify a lot of pen graphics.
It exists…
setpencolortotransparency*16777216+red*65536+green*256+blue
each number is 0-255 for example (transparency: 25 red: 255 green: 0 blue: 0) makes the pen red and 25% transparent.
Hence the ‘simplify’.

Powered by DjangoBB