News for hackers. Stuff that matters.
Re:JQuery noise generator by jarin on Sunday March 06, 2011 @10:20PM (#2295842)
Oh this is awesome. It's the last thing I need to completely eliminate images from my website.

All the rest is cross-browser gradient and rounded corner code from http://css3please.com, and I'm debating whether to vectorize the picture of me via raphael.js or do an inline data-URL image in my CSS (it might be considered cheating).

Re:JQuery noise generator by jarin on Monday March 07, 2011 @12:20AM (#2296123)
Oh, I guess jQuery-noise adds data-URLs to the elements on the page, so I guess I don't have to feel bad about inlining my images :)
Re:JQuery noise generator by lwhi on Sunday March 06, 2011 @07:06PM (#2295455)
Perlin noise[1] could be a nice addition.

[1] http://en.wikipedia.org/wiki/Perlin_noise

Re:JQuery noise generator by ohrite on Sunday March 06, 2011 @07:26PM (#2295487)
I hacked up http://github.com/ohrite/jquery-perlin a while back.

edit: I had to go look at it. Now I want to go back and clean it up.

Re:JQuery noise generator by chrisbroadfoot on Sunday March 06, 2011 @11:47PM (#2296065)
... and write a demo page :)
Re:JQuery noise generator by lwhi on Sunday March 06, 2011 @07:27PM (#2295489)
Nice.
Re:JQuery noise generator by PHPAdam on Sunday March 06, 2011 @06:21PM (#2295346)
Sorry, I dont get it. What am I looking at?
Re:JQuery noise generator by Rapp on Sunday March 06, 2011 @06:23PM (#2295353)
Sorry, it might be a bit confusing if you're not used to github.

Here is an interactive demo: http://rappdaniel.com/noisy/

Re:JQuery noise generator by captaincrowbar on Sunday March 06, 2011 @07:55PM (#2295546)
I don't get it either. Your demo link just leads to a page with some text boxes on it. I tried it in Firefox and Safari and can't see anything that looks "noisy". I tried changing some of the parameters but that just crashed Firefox.
Re:JQuery noise generator by zone411 on Sunday March 06, 2011 @08:38PM (#2295637)
Increase the opacity and look at the background.
Re:JQuery noise generator by maw on Monday March 07, 2011 @12:55PM (#2297987)
It wasn't github. It was the fact that, at first blush, Noisy seemed to fail the actually-does-something test.

It turned out not to be so, but it did take me a lot of control wiggling to figure out what was going on.

Re:JQuery noise generator by ronaldj on Sunday March 06, 2011 @07:19PM (#2295474)
Why does everything have to be JQuery dependent these days?
Re:JQuery noise generator by Rapp on Sunday March 06, 2011 @07:37PM (#2295507)
It could very easily be converted to any framework of your choosing, I originally created it in pure javascript.

Do you have any requests for frameworks you'd like me to port it to?

Re:JQuery noise generator by ronaldj on Sunday March 06, 2011 @10:19PM (#2295841)
Nope. I'd write it in plain vanilla JS. Frameworks are great, but sometimes I think the world is too dependent on them.
Re:JQuery noise generator by zbanks on Sunday March 06, 2011 @11:49PM (#2296072)
If you're doing this sort of manipulation, it's not like you can't afford the extra cycles.
Re:JQuery noise generator by zbanks on Sunday March 06, 2011 @11:44PM (#2296056)
I set up a jsperf to do some benchmarking:

http://jsperf.com/noisy

If you can help out by running the tests, it'll be great to compare browsers.

This isn't exactly the perfect tool for the job, but it's close enough.

Re:JQuery noise generator by flat20 on Monday March 07, 2011 @04:42AM (#2296610)
I moved this line out of the for loop which made it slightly faster:

var numPixels = options.intensity * Math.pow(options.size, 2);

http://jsperf.com/noisy/2

Re:JQuery noise generator by jcampbell1 on Sunday March 06, 2011 @06:52PM (#2295412)
FYI, it uses canvas. If canvas is not supported (IE < 9), then fallback image is needed.
Re:JQuery noise generator by ianbishop on Sunday March 06, 2011 @06:50PM (#2295405)
Ha, I'm surprised how simple the algorithm to generate random noise is. This is really cool though its applications may not be too widespread. I find with solid colours elements that slight noise can give it more of a body.
Re:JQuery noise generator by lwhi on Sunday March 06, 2011 @06:34PM (#2295372)
I like the fact that this is jQuery - and that it could probably be used dynamically with other effects.

.. but I'm starting to think noise + block-color backgrounds are starting to become a bit cliche.

Re:JQuery noise generator by huhtenberg on Sunday March 06, 2011 @06:51PM (#2295406)
That's not what cliché is.

Noise is there to make the design easier on the eye. It simply works better than a solid fill in a lot of situations as it improves visual quality of the design. It is more natural if you will, similarly to how rounded corners look subjectively better than the straight ones. The noise was not extensively used before because it does not compress well, and spending 20KB on a background tile was just too much. Now it is lesser of an issue, so the noisy fill is seeing a wider adoption.

In other words, if it were just a decoration for the sake of decoration, then - yes, you would've been right, but since it carries a useful function, then it is not a cliche.

Re:JQuery noise generator by lwhi on Sunday March 06, 2011 @07:05PM (#2295451)
No, when something is overused, it actually does become a cliche.

Perhaps noise can improve the visual quality of a design when it's used subtly.

However, I'm increasingly seeing it (over) used in a conspicuous way, and I think it's become a trend. In some cases, I think there's an element of 'lets jump on the bandwagon'.

Round corners definitely became a cliche.

EDIT: re. noise - see dribbble for proof.

Re:JQuery noise generator by jedsmith on Sunday March 06, 2011 @08:11PM (#2295580)
Do you mean dribbble uses noise subtly or that it's contributing to the overuse? Your point is a bit vague.

I would guess the former, because I think the noise really adds to their presentation. It almost feels like I can rub the lettering on the paper.

Re:JQuery noise generator by arnorhs on Monday March 07, 2011 @07:36AM (#2296919)
I could be mistaken, but I think he means that if you browse through some of the submitted designs on dribbble, you can see a clear trend of noise being added into many designs these days. Not dribbble's design itself (although, it DOES use noise in its backgrounds)
Re:JQuery noise generator by lwhi on Sunday March 06, 2011 @08:26PM (#2295620)
I think dribbble highlighted the use of noise to a wider group of people. I agree it can add to a design - but I think their use of it is largely stylistic.
Re:JQuery noise generator by mcav on Sunday March 06, 2011 @07:53PM (#2295543)
If you look back at trends in web design over the past 10-20 years, you'll notice the progression of different styles. Heck, go back to circa-2004 "Web 2.0" designs, work your way forward, and you'll see that web design trends change every year.

In another few years, noise will be out, and something else will be "in".

Re:JQuery noise generator by lwhi on Sunday March 06, 2011 @08:24PM (#2295615)
I agree - noise will reach saturation point (no pun intended) .. and will eventually be forgotten about. When it's used properly, you don't notice it.

I sometimes wonder why we actually need trends. It's an interesting subject - in a way trends are a just part of the commodification of design. They provide a way to transfer values (through loose connotations) to an audience .. I think there's something quite cheap (throwaway) about the concept. Without trends, progress is less able to drive commercialisation and the need to update is less essential.

Re:JQuery noise generator by dhotson on Monday March 07, 2011 @01:58AM (#2296335)
Also, a bit of noise helps reduce banding in gradients.

Actually, in Firefox if you use a CSS gradient (ie -moz-linear-gradient) and look carefully.. you'll notice Firefox automatically adds noise/dithering to make it look smoother.

Re:JQuery noise generator by RyanMcGreal on Monday March 07, 2011 @08:10AM (#2296978)
I think what's happening is that browser technology is finally catching up with typographic best practices. That's not to say there aren't design trends that turn into cliches, or that practices applied naively don't look clumsy; but this seems more to me like a small but important step on the road to a mature web design codex.
Re:JQuery noise generator by Tyrant505 on Sunday March 06, 2011 @08:30PM (#2295622)
Cliche, trend, or progress?
Re:JQuery noise generator by lwhi on Sunday March 06, 2011 @08:33PM (#2295629)
A trend quickly progressing towards becoming a cliche :)
Re:JQuery noise generator by potomak on Monday March 07, 2011 @03:31AM (#2296503)
This is what I needed just some days ago and this is why: http://www.thoundsday.com
Re:JQuery noise generator by Sephr on Sunday March 06, 2011 @08:07PM (#2295569)
Why are you using HTML5 range input for intensity and opacity but only a text input instead of numeric for the size?
Re:JQuery noise generator by Rapp on Sunday March 06, 2011 @08:13PM (#2295582)
Nice find, just changed it to numeric.
Re:JQuery noise generator by fizx on Sunday March 06, 2011 @06:49PM (#2295404)
Any benchmarks?
Re:JQuery noise generator by systemtrigger on Sunday March 06, 2011 @09:26PM (#2295736)
There is a little variation in how the noise renders across browsers. FF vs Chrome vs Safari: http://dl.dropbox.com/u/17455578/noise.png
Re:JQuery noise generator by Herald_MJ on Monday March 07, 2011 @11:25AM (#2297592)
Why is this useful?
Re:JQuery noise generator by jjcm on Monday March 07, 2011 @01:13PM (#2298056)
Using noise is a way of adding another aspect of realism to objects. Normally you can prepare images ahead of time and use those in your css to create this effect, but for some procedurally generated things images can't always be used. That's where something like this would come into play. While the use case for this over precomputed images is quite small, it's nice nonetheless to have.

Aside from sites styles though, it's also a fully functional noise implementation - which could be ported to web based photo/graphics editors.

Re:JQuery noise generator by zaph0d on Monday March 07, 2011 @09:14AM (#2297132)
Interesting, we used an image to achieve the same effect on http://www.paisa.com/ -- this works across all browsers.