Discuss Scratch

Pixar2000
Scratcher
100+ posts

Multi-colored objects

One day I looked at the Unicorn sprite, and the mane and tail were multi-colored! And yes, the object was one shape. How was this done? Oh, and by the way, it was a three colored gradient.

Last edited by Pixar2000 (Oct. 21, 2018 23:18:30)


Para::grey
de::motion
x::variables
This signature is currently being protected by SiggyBot.
(: ::custom-arg) )::custom ring
oooooo new forum server
awesome-llama
Scratcher
1000+ posts

Multi-colored objects

There is a hidden function which is the group button.
You can select multiple objects in the vector editor by Shift-Clicking each one. Now a button appears to join them all together into one.
You can ungroup with the same button.


Pixar2000
Scratcher
100+ posts

Multi-colored objects

awesome-llama wrote:

There is a hidden function which is the group button.
You can select multiple objects in the vector editor by Shift-Clicking each one. Now a button appears to join them all together into one.
You can ungroup with the same button.
It wasn't grouped either.

Para::grey
de::motion
x::variables
This signature is currently being protected by SiggyBot.
(: ::custom-arg) )::custom ring
oooooo new forum server
Pixar2000
Scratcher
100+ posts

Multi-colored objects

Here is a project with the Unicorn sprite for reference: https://scratch.mit.edu/projects/168980938/ (Credit to yzyzyzlol for that project.)

Para::grey
de::motion
x::variables
This signature is currently being protected by SiggyBot.
(: ::custom-arg) )::custom ring
oooooo new forum server
imfh
Scratcher
1000+ posts

Multi-colored objects

Vector graphics can have multiple color gradients in them, you just can't make them like that with the Scratch editor(I think). It means it was made with some other SVG editor.

Scratch to Pygame converter: https://scratch.mit.edu/discuss/topic/600562/
Pixar2000
Scratcher
100+ posts

Multi-colored objects

imfh wrote:

Vector graphics can have multiple color gradients in them, you just can't make them like that with the Scratch editor(I think). It means it was made with some other SVG editor.
Yes, I know that, but every time I do that, the gradients don't look right. (Or maybe I'm misremembering and it actually worked, just that if it didn't work, it only worked in the past.)

Last edited by Pixar2000 (Oct. 23, 2018 21:59:06)


Para::grey
de::motion
x::variables
This signature is currently being protected by SiggyBot.
(: ::custom-arg) )::custom ring
oooooo new forum server
NickyNouse
Scratcher
1000+ posts

Multi-colored objects

Pixar2000 wrote:

imfh wrote:

Vector graphics can have multiple color gradients in them, you just can't make them like that with the Scratch editor(I think). It means it was made with some other SVG editor.
Yes, I know that, but every time I do that, the gradients don't look right. (Or maybe I'm misremembering and it actually worked, just that if it didn't work, it only worked in the past.)
There's a bunch of specific stuff you have to do to SVGs to make them display right in Scratch. Here's some code that Scratch 3 uses to be consistent with Scratch 2's SVG quirks: https://github.com/LLK/scratch-svg-renderer/blob/develop/src/svg-renderer.js#L206 – it looks like this code recursively goes through every <linearGradient> element and sets the attribute x2=“0” so I would start by opening up your SVG in a text editor and doing the same thing (or removing the x2 values? I'm confusing myself)

Last edited by NickyNouse (Oct. 25, 2018 06:01:13)

Powered by DjangoBB