# Does anyone understand the theory behind this noise randomizer problem?

 07 July 2017 Niber PRO Anon United Kingdom Does anyone understand the theory behind this noise randomizer problem? I'm trying to use a random noise texture to randomize cells in a shader, the shader stuff I understand, what I don't understand is why it's impossible to make a randomized noise texture! If I use the Noise filter in Photoshop, the results are just absolutely terrible (it might look noisy, but the actual noise is poorly randomized), So eventually I found a website that creates really good noise, that average at 128 whenever I use "blur Average", However even tho this one is more balanced, I find that mid-range values (those near 128) are WAY more common than high and low values, I was able to confirm this by checkign the Levels filter in Photoshop, notice it shows that the midrange valeus are more common because of how the levels thingy is a steep mountain. Is it something I'm missunderstanding? (about color profiles? gamma? randomization techniques etc), Why is it impossible to make a noise texture where each pixel is randomized between 0-1 without greatly favoring certain color ranges? __________________ 3d Artist moved to China for new opportunities, follow my crazy adventures on my blog: Making games in China Last edited by Niber : 07 July 2017 at 07:51 PM. share quote
 07 July 2017 oddforce Beginner 🐟 Austria If 8 bit color depth is okay, paste this `````` void setup() {   size(1000,1000); } void draw() {   for(x=0;x<1000;x++)      for(y=0;y<1000;y++)     {       point(x, y);        stroke(random(255), random(255), random(255));   } }`````` here: http://valentin.dasdeck.com/processing/index.php, then press play button, then stop, then export to png share quote
 07 July 2017 Niber PRO Anon United Kingdom Thanks so much, but strangely enough this has the EXACT same problem! (even tho we can see the code in plain view) Notice in this picture from that code, that the histogram shows that midvalues are way more common than dark and light colors. now you could think maybe it's just photoshops histogram that is broken, so I made a test, I set the treshold to 64, meaning that I should see 25% of pixels, yet when I manually count 8x8 pixels = 64 I get only 8 black pixels, meaning that treshold of 64 only got 12.5% pixels, half what I expected! So weird right! __________________ 3d Artist moved to China for new opportunities, follow my crazy adventures on my blog: Making games in China share quote
 07 July 2017 pomru Expert The histogram that you see in Photoshop's Levels filter is the wrong tool to use for measuring how random your texture is. The steep mountain that you see matches the bell curve visualization of probability that a pixel will have a certain value. From what you've been saying, you seem to be expecting a flat rectanglar-shaped histogram in the Levels filter since truly random textures should have equal probability of values, right? Well, that would be only half-correct. Each pixel does have an equal probability, but statistically, most of the pixels will fall into the midrange. So no matter what random noise texture you throw into the Photoshop Levels filter, you'll get a variation of that steep mountain. So, to measure how random your texture is, you need to use a different tool. For most cases, the human eye is good enough. If you can't spot any pattern in the noise, then the texture is random enough for most purposes. share quote
 07 July 2017 oddforce Beginner 🐟 Austria Weird indeed. I opened that image in Photoshop. Window->Histogram showed a flat distribution as you would expect. Let me check again. Maybe that levels panel is something else, the panel was labeled histogram when I checked, not levels (latest photoshop version) share quote
 07 July 2017 oddforce Beginner 🐟 Austria Ok the secret sauce was "cache level". Photoshop uses a scaled down version of the image to quickly compute the histogram. Scaling down averages the pixels which results in that bell curve we see. When you click the warning icon cache level 0 (unscaled) is activated temporarily and the flat histogram is shown. share quote

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.
Forum Jump
 Please select one User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home -------------------- Gallery     CG Awards     Featured 2D     Featured 3D     Latest Entries Main     News     General Discussion     Featured Videos     Education     Off Topic     Recruitment         Temp Job Board Challenges     CGSociety/IAMAG Beyond the Wall     The AMD RADEON PRO Challenge!     Wacom #DrawCember     Lighting Challenges     Professional Feedback GROUPS WIP ADVICE     Ask an Art Director     WIP 2D/3D & Animation         WIP/Critique: 3D         WIP/Critique: 2D             Speedpaints & Sketchbooks         WIP/Critique: Animation     Kitbash 3D Thunderdome     Collaborative Projects Autodesk     Autodesk Maya         Maya Dynamics         Maya Rendering         Maya Character Setup         Maya Programming     Autodesk Miscellaneous         Autodesk MotionBuilder         Autodesk Mudbox         Autodesk Softimage             XSI: Programming             ICE: Interactive Creative Environment     Autodesk 3ds max         3dsMax Tutorials & Tips         3dsMax Resources         3dsMax SDK and MaxScript         Plugins & Add-ons         Particle Flow     Arnold ZBrush     Featured Zbrush Gallery     Pixologic ZBrush     Keyshot     Marvelous Designer Texturing     Mari     Texturing XYZ     Marmoset Toolbag     3DCoat     Allegorithmic Substance         Substance Designer         Substance Painter Software     Maxon Cinema 4D         Cinema 4D Resources     The Foundry Modo         The Foundry Time Travel Challenge     Side Effects Houdini     Lightwave 3D         LW Resources         LW Tutorials     Blender     Photoshop / Painter     E-on Software Vue     Compositing Software         The Foundry Nuke         Adobe After Effects         Autodesk Effects and Compositing         Eyeon Software Digital Fusion Techniques     Art Techniques and Theories     Digital Matte Painting         Digital Matte Painting Mini-Challenge     Modeling         Modeling Challenge             Member Model Collection     Texturing and Surfacing     Character Rigging     Animation     Lighting and Shaders     Compositing and Editing     Anatomy and Figurative Art         SPOTLIGHT: Best of the Artistic Anatomy and Figurative Art Forum         Tutorials and Workshops         Personal Anatomy & Sketchbook Threads         References, Resources, and Supplies Technical     VR/AR     Master Virtual Reality with BrioVR     Game Engine     Graphics Programming     Technical and Hardware
Miscellaneous

All times are GMT. The time now is 01:21 PM.