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?
|
|
|||||||||||||||||||
|
|
Photoshop isn't really meant for this kind of randomness as it is meant for control. But here's a workaround without any scripting:
This will generate some random values. It won't be 100% random, but you can play around with it. |
||||
|
|
|
A 5 second google search found this: http://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. |
|||
|
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:
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. |
||||