Author Topic: Random gradient from custom bitmap lines  (Read 7460 times)

Hi to all

if someone can help thats will be awesome  ;)



Last Edit: April 17, 2017, 01:11:27 pm

mmm would be awesome indeed...
There are some interesting threads for the top right case
The bottom right is way harder...

way harder but possible ?


Maybe: this is something we are looking internally (personnaly I don't have the solution for this :-/)

Would be useful to have a point-based paint bucket and gradient fill node, where you create points and it works like a magic wand in PS and fills based on the points marked and a tolerance with bleed inwards/outwards option. Points would be filled sequentially and thus allow for randomization/parameterization. Extra credit for the node if it reads the color/values underneath and allows you to use those values, for example it could use the BW values in the above image to set the rotation angle of gradients it fills. And why not, also allows gradients or images to be plugged into inputs for further ease of customization.

I'm pretty sure that filling the tiles with a gradient based on their luminance values is possible on a conceptual level. It's just that the node may become a pretty expensive one and some crafty algorithm would be necessary to make it fast.

I'm thinking about isolating and processing of each individual luminance value from 1 to 255 (thus tiles sharing this value) and applying a gradient to them in separate steps. This way it should be pretty controllable and reasonably fast, as making 255 relatively simple processings with a pixel processor wouldn't be too costly. Need to test this one out, though.  :D

By the way, @Vincent Gault, any tips on the future of my randomize mask node? Would it make its way into the SD library? I'm asking because I've been withholding it from the Share for some time now, and if it will not, I would go ahead and upload it there.

If/when we release it, it should be in the library

in PS it's look like this

Good news, everyone! ::) .

With a bit of wizardry and some spontaneous insights here and there I have a functional prototype for this one. :P It's a bit funny that it became possible as a combination of my previous nodes: Randomize Mask and Auto Levels Plus.

A "Slope Mask" prototype takes as an input a variation map and produces a mask filled with gradients, whose direction is determined by the luminance of a corresponding tile in the input mask. Simply put, the variation mask rotates the gradient.

The gradient can be in a maximum range for each individual tile in the mask, or it can be controlled with input parameters. For example, it is possible to limit the gradients to a specific range, like 0.5 - 0.75 (or any other). Also, it is possible to invert the direction of gradients. There are potential for some additional parameters to make the node even more powerful and controllable, but I haven't explored it in full just yet.

For example, using a Levels node, one can clamp some portions of the gradients to produce interesting effects in the height map, like partially cut tiles (see the third image attached).

And, of course, it works with bitmap images too.  :D

Because this is just a prototype, I'm not making the node available yet, as it isn't finished. I'm looking for some feedback to enhance it. How would you use such a node? What parameters would you like to control? Some additional ideas, maybe? Comments?

Thanks and cheers!

Sergey

For me, I would like to see a rotation random slider in there from 0-360. 0 would have all the gradients facing the same direction, and 360 would be completely random to all angles. If you had this, I'd also love to be able to adjust to default angle of the gradient.

Hope that all makes sense.
Lucas Annunziata
Environment Artist - Blizzard
Gumroad - Artstation

treidge, that is awesome. I've been looking for a way to do this for a long time.
Texture Artist | Visceral Games

annunziata3d, great suggestions! Makes perfect sense. Will do.

seanv3d, thanks! Should be pretty useful for anything with tiles.

Wow, seriously impressive nodes, Sergey.
Does it also work if you have very differently sized tiles?
Even if it doesn't it's still super useful.

Yes, it will work. The only scenario when it may fail is when you have a very complex, spiral-like pattern with long and thin parts bending in different directions at extreme angles. Something like an ornament, perhaps. But, even then, it's really a matter of the node configuration. One can open the .SBS and reconfigure the node to allow more "processing" steps to be concluded, and then it will work at the expense of longer computation time.

For general usage, it should be pretty universal and reliable.  :P

Quote
The gradient can be in a maximum range for each individual tile in the mask
I'm super curious how you managed that bit. I was able to put together the beginnings of a random gradient node similar to yours a while back (value converted to rotated gradient), but never could quite figure out how to ensure each contiguous tile would get the full gradient range -- my gradients basically would go from one bound of the image to the opposite bound, as I don't know where the tile bounds are.