Gradients

jersmi's picture

Wondering about the best way to produce a few more gradient styles like in photoshop -- angle, reflected and diamond.

usefuldesign.au's picture
Re: Gradients

Set up the basic gradient then mask it down to the sub-sample you need repeated. Then reflect or rotate the sub-sample. The stock standard masking patches should suffice.

For example, mask a rectangular gradient down to a triangle with corners on top left, bottom left and the last corner midway between top right and bottom right corners. Position that masked gradient at 9 o'clock. Repeat and rotate it to make the other parts of a diamond gradient at 12, 3 and 6 o'clock.

Hope that makes sense, no time for a demo. You may have to use resize image patch to squish 2 gradients relative to the other 2.

jersmi's picture
Re: Gradients

Thanks, I'll try that. I'm sure it could be done with CI, had a brief look into copy/pasting some of Toneburst's code from his random gradient patch posted on machinesdontcare. if anyone has examples lying around, I'm all ears. seems it'd be basic, but don't have it so far.

usefuldesign.au's picture
Re: Gradients

Yeah so many things seem simple in CI filter until I try to code it… Main thing is working out a kernel that can execute for each pixel without any programatic (step-wise) code between pixels and that can be really tough on non-trivial things :/

jersmi's picture
Re: Gradients

Toneburst's gradient CI filter really all happens in the javascript section. That seems like a clue to a non-coder like myself.

jersmi's picture
Re: Gradients

This is the best can do at the moment. No CI, no Image Transform, just a bunch of RII patches. There has to be a better way... Also, if anyone has can help with a basic resize question, I'd be grateful. I will share any fruits, of course, though most devs here are far beyond this problem.

Anyway, I cannot scale to fit the Affine Tile patch as I would like (there's a gap between the tiles). I see it has something to do with the 1x1 unit sprites in the chain (immediately after the gradient inside the gradient RII patch). As usual I am having trouble getting my head around the scaling / sizing properties in QC, like with the Image Transform and Image Crop patches. One day it will click, but in the meantime any advice is helpful.

(edit: how does one show screenshots within a post)?

smokris's picture
Re: Gradients

jersmi wrote:
(edit: how does one show screenshots within a post)?

Use <img src="..." />