Discuss Scratch

DadOfMrLog
Scratcher
1000+ posts

Suggestion: set pen ghost to ( )

We already have “set pen color to” which is like “set color effect to” for a costume.
We have “set pen shade to”, which is basically the same concept as “set brightness effect to” for a costume (but the mismatch in description suggests maybe one of them should really change to make them match? “set pen brightness to” instead? Probably too late now, tho'…)

So, how about “set pen ghost to”, which is the same concept as “set ghost effect to” for a costume?
i.e. the ability to draw using the pen with transparency, just like stamping a sprite costume with ghost effect.

Those of us that do pen drawing a lot (e.g. for 3D pen-rendered demos/games) would find this a very useful addition to make extra-cool looking effects - and I wouldn't have thought it'd be that hard to implement (I mean, you already have the drawing code for the pen, and you already know how to ghost a stamped sprite, so…?)

Thanks for considering.
SuperJedi224
Scratcher
100+ posts

Suggestion: set pen ghost to ( )

YES.
SFollis
Scratcher
500+ posts

Suggestion: set pen ghost to ( )

+1111
Alexb10
Scratcher
52 posts

Suggestion: set pen ghost to ( )

I agree, that would help for Pen - Minecraft.
joshuaho
Scratcher
1000+ posts

Suggestion: set pen ghost to ( )

DadOfMrLog wrote:

We already have “set pen color to” which is like “set color effect to” for a costume.
We have “set pen shade to”, which is basically the same concept as “set brightness effect to” for a costume (but the mismatch in description suggests maybe one of them should really change to make them match? “set pen brightness to” instead? Probably too late now, tho'…)

So, how about “set pen ghost to”, which is the same concept as “set ghost effect to” for a costume?
i.e. the ability to draw using the pen with transparency, just like stamping a sprite costume with ghost effect.

Those of us that do pen drawing a lot (e.g. for 3D pen-rendered demos/games) would find this a very useful addition to make extra-cool looking effects - and I wouldn't have thought it'd be that hard to implement (I mean, you already have the drawing code for the pen, and you already know how to ghost a stamped sprite, so…?)

Thanks for considering.
Support.
DadOfMrLog
Scratcher
1000+ posts

Suggestion: set pen ghost to ( )

OK, some support for this, and I know some of you are thinking about what you could do with it.
But before you do, it's maybe worth me just throwing out some caveats that you may not have considered…

(Though, of course I still like the idea in general!)

Consider what happens if you draw two lines that are ghosted, the first from point A to point B, the second from B to C. How will it look…?
Well, the first line is fine, that will be as you expect. But the second line gets partly drawn over the top of part of the first line, near point B.
So what do you expect it to look like?

Well, there are two main possibilities…

First of all, with the simplest implementation of pen-ghost, the region where the lines overlap will have to end up looking different to the rest of the two lines, because drawing happened twice there.
That makes it very tricky to actually use pen ghosting in practice, because you have to be very careful to make sure you don't overlap lines if you want a consistent ghost effect across a region - I know you're probably thinking about making some kind of translucent-looking surface in a 3D render (I know I was), but you can't easily make a gradient-fill like the one I did for InterXeptor, because that has plenty of overlap. It'd have to draw in straight lines, like a raster-scan, that don't overlap, and they'd have to be thin lines to prevent the shape edges looking odd ('cos the pen is circular).

A more sophisticated implementation might be to buffer all ghosted pen-drawing off-screen in-between other pen-drawings (by other sprites, for example), and between change of pen-ghosting value. And then ‘stamp’ it all onto the screen when the refresh/other-drawing/ghost-change occurs. That might give you something more like what you'd want to be able to do with pen-ghost (like drawing a translucent surface).
Note that, if it works like that, you still have to consider carefully how to go about drawing things when you mix pen-ghosting with normal opaque pen-drawing - without understanding exactly how it's implemented, the ‘expected behaviour’ is somewhat ambiguous in certain cases, so I think it could lead to misunderstanding about why it does what it does sometimes, which is something to try to avoid in the case of Scratch programming.
(Having said that, there are plenty of cases where the implementation of Scratch leads to behaviour that's not expected - see http://scratch.mit.edu/discuss/topic/6215/, for example…)

Any other ideas?
Scratch12300
Scratcher
500+ posts

Suggestion: set pen ghost to ( )

DadOfMrLog wrote:

Consider what happens if you draw two lines that are ghosted, the first from point A to point B, the second from B to C. How will it look…?
Well, the first line is fine, that will be as you expect. But the second line gets partly drawn over the top of part of the first line, near point B.
So what do you expect it to look like?
Maybe it would look like this? It could…
DadOfMrLog
Scratcher
1000+ posts

Suggestion: set pen ghost to ( )

Presumably, you mean http://scratch.mit.edu/projects/10444985/ ?

Yes, that's exactly what I mean by the first and simple implementation. Straightforward enough to understand why it looks like that, but it's not always so useful for drawing in practice (unless you're only doing non-overlapping line-drawing) - it makes it tricky to do something like quickly fill a triangle, for example (you have to carefully do it line by non-overlapping line, rather than trying to quickly fill whole chunks with big pen sizes, so they end up overlapping a lot - see this triangle-fill project for a demonstration of what I mean ).
MabonBaladevaKain
Scratcher
100+ posts

Suggestion: set pen ghost to ( )

Is there any way to do this yet? … I need a way to ghost the pen for the web in the spider-man game I'm making.
Peasantkat
Scratcher
1 post

Suggestion: set pen ghost to ( )

MabonBaladevaKain wrote:

Is there any way to do this yet? … I need a way to ghost the pen for the web in the spider-man game I'm making.
Ehh, still relevant.
You can make a costume that's a red circle or something, set the sprite to be slightly transparent with the ghost effect block, then stamp the costume.
Prinseskat
Scratcher
1000+ posts

Suggestion: set pen ghost to ( )

Peasantkat wrote:

MabonBaladevaKain wrote:

Is there any way to do this yet? … I need a way to ghost the pen for the web in the spider-man game I'm making.
Ehh, still relevant.
You can make a costume that's a red circle or something, set the sprite to be slightly transparent with the ghost effect block, then stamp the costume.
Oops, alt account.
stickfiregames
Scratcher
1000+ posts

Suggestion: set pen ghost to ( )

MabonBaladevaKain wrote:

Is there any way to do this yet? … I need a way to ghost the pen for the web in the spider-man game I'm making.
This should work, you could also replace the costume with a plain circle and give it a ghost effect to make it look more like the regular pen.
DadOfMrLog
Scratcher
1000+ posts

Suggestion: set pen ghost to ( )

Wow, forgot I made this topic so long ago.

But it looks like it might actually happen soon!

Insert many smileys…

Last edited by DadOfMrLog (April 23, 2015 11:53:53)

TheLogFather
Scratcher
1000+ posts

Suggestion: set pen ghost to ( )

And now it has happened… kinda, if you can figure out how to use it well…


https://scratch.mit.edu/projects/60596326/

Last edited by TheLogFather (June 5, 2015 12:51:43)

cwrivera99
Scratcher
500+ posts

Suggestion: set pen ghost to ( )

Support, except perhaps instead of being “ghost”, it could be “transparency”, and look something like this-
set pen transparency to (0) :: pen

change pen transparency by (0) :: pen

Last edited by cwrivera99 (May 7, 2015 00:29:44)

mundofinkyenglish
Scratcher
100+ posts

Suggestion: set pen ghost to ( )

+1
_nix
Scratcher
1000+ posts

Suggestion: set pen ghost to ( )

Quick update – this is basically confirmed


Pezd
Scratcher
100+ posts

Suggestion: set pen ghost to ( )

cwrivera99 wrote:

Support, except perhaps instead of being “ghost”, it could be “transparency”, and look something like this-
set pen transparency to (0) :: pen

change pen transparency by (0) :: pen

SUPPORT!!
Bensboss2005
Scratcher
4 posts

Suggestion: set pen ghost to ( )

YES! Add this please!
-ShadowOfTheFuture-
Scratcher
1000+ posts

Suggestion: set pen ghost to ( )

I heard it's coming in 3.0

Powered by DjangoBB