Mobile app version of vmapp.org
Login or Join
Connie430

: Is it possible to generate 'random' pixels in Photoshop? I want to generate an area of random pixels in Photoshop. By random, I mean the 24-bit RGB values of the pixels vary uniformly over

@Connie430

Posted in: #AdobePhotoshop #Filter

I want to generate an area of random pixels in Photoshop. By random, I mean the 24-bit RGB values of the pixels vary uniformly over the range 0x000000 - 0xffffff. The opacity should not vary. I've experimented with the Add Noise filter, but I can't get anything like the desired effect. Is this possible with Photoshop?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Connie430

3 Comments

Sorted by latest first Latest Oldest Best

 

@Sims5801359

I've just used Add Noise, set to "Uniform" in an empty white document and it looks like a uniform distribution to me, with a mean of 127 as expected, when I look at the histogram (after refreshing it). I tried both default (RGB) and monochromatic.

Edits: The histogram shows a peak value at 255 when starting with a white document. I overlooked this -- difficult to see against the right hand edge of the histogram.

Further experimentaion showed:


Applying noise to a white canvas gives a peak at 255 only (50% of all pixels)
Applying noise to a black canvas gives a peak at 0 only (50% of all pixels)
Applying noise to a mid-grey or coloured canvas gives peaks at 0 and 255 (together, 50% of all pixels)


It seems that Apply Noise returns 50% pixels at low (0) and/or high (255) ends of the range, dependent on the contents of the layer. The remaining 50% pixels appear to be uniformly distributed across the remaining range (0-254, 1-254, or 1-255 depending on input).

I don't think there is any way of easily fixing this output to give what you're looking for. I think layering clipped multiple versions of (1) and (2) above could reduce the peaks, but not eliminate them entirely. Probably time to roll your own code.

10% popularity Vote Up Vote Down


 

@Sims5801359

A 5 second google search found this:
www.ps-scripts.com/bb/viewtopic.php?f=16&t=3998
Aside from a PS Script I would say you'd need to use Processing, OpenFrameworks or probably the easiest choice NodeBox.

10% popularity Vote Up Vote Down


 

@Speyer780

Photoshop isn't really meant for this kind of randomness as it is meant for control.

But here's a workaround without any scripting:


Select the Pencil Tool
Go into the brush options
Select 'Color Dynamics'
Crank up Foreground/Background Jitter, Hue Jitter, Saturation Jitter, and Brightness Jitter
Change the background/foreground color so it isn't just black and white.


This will generate some random values. It won't be 100% random, but you can play around with it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme