It is currently Thu Mar 28, 2024 3:56 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Easy way to random stipple on a per pixel basis?
PostPosted: Sun Feb 20, 2011 9:21 pm  (#1) 
Offline
GimpChat Member

Joined: Feb 20, 2011
Posts: 10
Hi all,

Here is what I'm up against:

1) For this thought experiment imagine a two color bitmap, in other words every pixel is either one color or the other (on or off). Imagine the bitmap divided in half, one half one color (on) and the other half the other one (off). Now imagine trying to randomize that border between the two on a per pixel level, perhaps in a zone 20 pixels wide, 10 on one half and 10 on the other.

2) I'd like to find a way to randomly flip some of the pixels across "the border" to the other color/state, the probability decreasing the further from the border the pixel is.

3) It would be nice to be able to implement this in a brush, whether that is during the creation of a mask or whatever.

4) To make the problem more complex have the work zone (10 pixels either side of the border) grow or shrink within a range randomly as well.

What I'm trying to accomplish: I'm working with really huge masks (10240x10240 png and larger) that help define differences in terrain in a game I play. Each pixel represents one meter or more of distance and I'm trying to find a way to use randomness to break up two zones into something that might pass for "natural". The composited masks are four colors but this sort of border rarely (but does occasionally) affects more than any two colors in any area of 20^2 pixels or less.

Even GIMP's spray paint, if it had a truly random spray pattern and could be set for binary operation, could be used just by selecting a 20px brush and spraying the "border".

Is there a tool, trick or technique that might work for this?

Thanks in advance!


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Sun Feb 20, 2011 9:58 pm  (#2) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Perhaps I'm too simplistic here. With images as large as you are working with it may not show all that well. I ran the Spread filter on an image of two rectangles. The Spread filter is accessed in Filters > Noise > Spread.

You can set the spread as high as you can and repeat as many times as it takes.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Sun Feb 20, 2011 10:38 pm  (#3) 
Offline
GimpChat Member

Joined: Feb 20, 2011
Posts: 10
Thanks!

While perhaps not perfect it certainly is faster... and does a better job than trying to paint the borders manually!


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Tue Feb 22, 2011 4:09 pm  (#4) 
Offline
GimpChat Member

Joined: Feb 20, 2011
Posts: 10
Now I just wish there was a brush of sorts that could be used to "paint" on such an effect. Any ideas?


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Thu Feb 24, 2011 8:57 am  (#5) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
The problem with a brush is that it paints with a single color.

It would have to be an animated brush and rotated. Perhaps a bi-color gradient with a sharp edge would work with it.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Thu Feb 24, 2011 9:51 am  (#6) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Attached is a pixelized brush that I made by rotating it in GAP. The rotation is probably 30° because I used 12 layers in GAP. It is a grayscale brush so it will use the foreground color.

I remade the brush and made each layer separately because rotating it in GAP blurred the pixels.

This is an image of the full-sized brush. The spacing was set to 35 directly in the brush.

Image

Save the brush into your gimp-2.6/brushes folder.


Attachments:
pixelizedbrush2.gih [732.92 KiB]
Downloaded 238 times
Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Thu Feb 24, 2011 2:02 pm  (#7) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4726
Struck my python programming neuron. I now have a script that swaps pixels randomly across a path:
Attachment:
SampleText.png
SampleText.png [ 24.66 KiB | Viewed 6244 times ]


Anyone interested?

_________________
Image


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Thu Feb 24, 2011 2:07 pm  (#8) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
That looks cool, ofnuts. Let us give it a try.

The way everyone dives in on these things may give you some other ways with your script. :mrgreen:

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Thu Feb 24, 2011 3:50 pm  (#9) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4726
Oregonian wrote:
That looks cool, ofnuts. Let us give it a try.

The way everyone dives in on these things may give you some other ways with your script. :mrgreen:
I'm sure they wil give it a good shake. It has been posted in this topic:
New random stipple script

See you there...

_________________
Image


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Fri Feb 25, 2011 11:41 am  (#10) 
Offline
GimpChat Member

Joined: Feb 20, 2011
Posts: 10
Thanks guys!

A creative group :)


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Fri Feb 25, 2011 12:49 pm  (#11) 
Offline
GimpChat Member

Joined: Feb 20, 2011
Posts: 10
I love your brush too Oregonian. It does exactly what I need and I find it quite useful to touch up the images I'm working with after they've been processed on a larger scale with the py script (I'm working with kilometers of terrain on what equates to a one meter scale!)


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Fri Feb 25, 2011 1:25 pm  (#12) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Oktyabr wrote:
I love your brush too Oregonian. It does exactly what I need and I find it quite useful to touch up the images I'm working with after they've been processed on a larger scale with the py script (I'm working with kilometers of terrain on what equates to a one meter scale!)
Wow! Thanks for letting me know. Makes me feel good and smile a lot. :yes

Call me, O, it's a lot easier and quicker to spell. :hehe

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Fri Feb 25, 2011 2:39 pm  (#13) 
Offline
GimpChat Member

Joined: Feb 20, 2011
Posts: 10
Yeah, I tried finding some .gih that were suitable to the task, even search a bunch of PSP image bazookas or whatever they call them... couldn't find one that dealt nicely with a random looking stipple on a reduced pallet image. Airbrush just made gradients which I had to reduce later anyway. I'm actually surprised such a brush didn't exist a long time ago!


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Fri Feb 25, 2011 2:57 pm  (#14) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Well, my brush is unique then. By the way, I can make one that's larger or smaller. The current one is 250x250px. I know you are working with large images.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Fri Feb 25, 2011 6:53 pm  (#15) 
Offline
GimpChat Member

Joined: Feb 20, 2011
Posts: 10
Oregonian wrote:
Well, my brush is unique then. By the way, I can make one that's larger or smaller. The current one is 250x250px. I know you are working with large images.


No rush or anything but yeah, a smaller one would be great for little touch-ups. Remember, the projects I'm working on tend to treat a single pixel as 1m so while the large one works fine, and sometimes I can get good results scaling it down a bit, a small one that let me tweak areas 25m.sq. (25x25px) would be a valuable asset in my toolbox for sure! Pixel density doesn't have to be real heavy on the small brush, just something I can touch up a two color border (with one of the colors) that will put a bit of stipling across the line and create some of that "random" look.

Thanks again!


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Fri Feb 25, 2011 8:17 pm  (#16) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Here you go: 25x25 pixels.

Image


Attachments:
pixelizedbrush25pxsq.gih [7.83 KiB]
Downloaded 99 times

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein
Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Fri Feb 25, 2011 11:11 pm  (#17) 
Offline
GimpChat Member

Joined: Feb 20, 2011
Posts: 10
Oregonian wrote:
Here you go: 25x25 pixels.

Image



SWEET! Thanks "O"! :)


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Sat Feb 26, 2011 12:04 am  (#18) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Oktyabr wrote:
SWEET! Thanks "O"! :)
You're welcome. You inspired me to make a set of pixelated brushes and I posted them here. The only one you don't have, 125 x 125px, is in the zipped file.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Mon Feb 28, 2011 3:48 pm  (#19) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Call me silly, but can't you just use a normal brush in "dissolve" mode and reduced opacity to get the same effect:.
Attachment:
stipple.jpg
stipple.jpg [ 154.64 KiB | Viewed 1413 times ]


-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Easy way to random stipple on a per pixel basis?
PostPosted: Mon Feb 28, 2011 5:34 pm  (#20) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Yeah, you could. :hehe

I prefer the more fuzzy outside edges with Spread though. I used spread to make the brushes.

Top brush stroke is dissolve mode; bottom is regular brush stroke and Spread.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Line/pixel size doesnot correspond with pixel resolution

3

No new posts Attachment(s) Pixel Art Help

2

No new posts Pixel art experiment

6

No new posts GIMP's fast pixel operations

4

No new posts Attachment(s) Use Shrink or Grow by 1 pixel on command

12



* Login  



Powered by phpBB3 © phpBB Group