Hey folks,
Quick backstory about Perlin noise: it's used in computer graphics to create textures, animations, landscapes, clouds, lots of stuff. Adds a bit of predictably random "messiness" to otherwise "smooth" models, which makes things look "natural." My use of quotes here is to draw attention to the fact that these are all aesthetic statements. Somehow this function worked out really well for fooling the eye into seeing natural things. It's typically used as a basis function for multifractal terrain. Check out Texturing and Modeling: A Procedural Approach, 3rd Edition by Ebert, Musgrave, Peachey, Perlin, and Worley.
I found myself wanting to understand Perlin noise, so I hunted around looking at various implementations (didn't find one in Smalltalk, if there is one, I'd love to know) and eventually settled on an implementation that made the math clearer than the others I found, and then rewrote it from scratch in Squeak. I've got one and two dimensional noise. One dimensional noise is rarely interesting. Two dimensional noise is good for making textures and height maps, and lots of other stuff. I haven't done three dimensional noise yet, but it shouldn't be much work to do, and that gives you some help with animating things like fire and clouds (basically the animation works by walking through adjacent 2D slices of noisy space, AFAICT.)
The bad news is, I still don't understand Perlin noise! :0 The (possibly) good news is, I think it works? Looks like Perlin noise to me... it's actually kind of a hard thing to assert the correctness of, though! And it took some playing with the variables before it started to look like the pictures of pure Perlin noise that I'd found online. Attached a photo so you can see.
Ultimately I'd like to replace it with simplex noise. It's faster and doesn't have artifacts on curved meshes. I tried to do that first, but realized that I didn't understand Perlin noise well enough to understand Simplex noise. Working on understanding the former so that I can understand the latter, basically.
Anyhow I'm not sure whether or not it's something that other people would want. Could be very niche graphics-nerdery, but who knows, the Croquet crowd might find ways to have fun with it at least. If I hear from people who'd like to play with it, I can clean up the code, add an example, and put it up under the MIT license somewhere convenient. Why not, right?
Let me know if you'd like to make some noise! Casey Ransberger Image.png (7K) Download Attachment |
On 2013-02-14, at 05:19, Casey Ransberger <[hidden email]> wrote: Hey folks, Are you aware of noise's Smalltalk connection?
Pretty certainly I did one back in the days of my Masters thesis ... 15 years ago. Ugh. Don't have the code handy, sorry.
Very useful for controlling naturally-appearing animation.
Really?! Ken's presentation above is pretty clear, IMHO ...
Seems certainly useful to me. In fact, I'd be surprised if there wasn't an implementation in Croquet or Qwaq already. - Bert - |
In reply to this post by Casey Ransberger-2
>> Let me know if you'd like to make some noise! >Seems certainly useful to me. In fact, I'd be surprised if there wasn't an implementation in Croquet or Qwaq already. Yes and no. There may be another implementation somewhere too, but I made one using the OpenCroquet base really Squeak code. It was a part of the Procedural Textures project that there is a video for at: http://www.youtube.com/watch?v=qBHbMxplM5c There used to be a page describing the whole project on the Croquet Consortium wiki, but that appears to be gone now. The code was in the Hedgehog repository, which also appears to be gone. I still have most of my notes, and I might Clastic, only using Croquet OpenGL with a Tweak UI. I strongly encourage you to look at Jerzy's Clastic tutorial paper, which you can still find at: http://karczmarczuk.users.greyc.fr/Work/Clastic_distr/clastic.html Cheers, Dave |
In reply to this post by Bert Freudenberg
Inline and abridged.
On Thu, Feb 14, 2013 at 3:16 AM, Bert Freudenberg <[hidden email]> wrote: -- So I am aware of Alan's connection to the film, and I am aware that noise was invented for it, but I am not aware of how Smalltalk fits in.
Oh drat.
Sometimes I'm just dense. Squeak is really shining here though, because I can just hook things up to sliders and play around until I get a feel for it. I'm also playing with my words a bit: I don't understand in any concrete way why noise approximates natural phenomena. AFAICT no one does. It kind of reminds me of that Fermat conjecture, "here's this thing we don't understand and couldn't prove for a really long time that always worked no matter how many times we tried to break it." I think it's the mysterious part of noise that drew me to it.
I definitely don't want to do the "yet another implementation of X" thing. It's pure Smalltalk code, no OpenGL stuff, which has ups and downs, but is at least different from what David Faught mentioned. Once I'm confident that I've got the bugs out, I might actually rewrite it in slang and make a VM primitive.
Casey Ransberger |
In reply to this post by David Faught
Inline
On Thu, Feb 14, 2013 at 5:22 AM, David Faught <[hidden email]> wrote:
Cool!
I'd like to see it, if you can.
Reading this now; thanks!
Casey Ransberger |
In reply to this post by Casey Ransberger-2
On 2013-02-14, at 19:24, Casey Ransberger <[hidden email]> wrote: Inline and abridged. Noise - Tron - Alan - Smalltalk. Everything is connected with everything, but some things are more related ;)
Because nature is fractal, and Perlin noise is fractal (you compose scaled versions of it on top of each other), the two resemble each other if tweaked nicely. It's not a simulation, but a similarity nonetheless. Because with noise you can make up ever smaller detail if you "zoom in" it feels more "real" than just a plain texture. To me it's not that mysterious, although still incredibly fascinating.
Sounds like a good idea: write it in slang and have it work, then plug in the primitive, so if the VM has the primitive it will just go faster. That's how the SoundGenerationPlugin works. Very elegant IMHO. - Bert - |
Right. Six degrees of computer science, at the center of which is... so anyway, for exactly this reason, we totally need to get Kevin Bacon to play him in the movie.
|
On 2013-02-15, at 16:19, Casey Ransberger <[hidden email]> wrote:
> Right. Six degrees of computer science, at the center of which is... so anyway, for exactly this reason, we totally need to get Kevin Bacon to play him in the movie. Hehe. "Alan Kay (I) has a Bacon number of 2." - Bert - |
This is so meta.
On Fri, Feb 15, 2013 at 7:34 AM, Bert Freudenberg <[hidden email]> wrote:
Casey Ransberger |
I *am* Kevin Bacon. I just play a mild-mannered engineering analyst between gigs.
On 15-02-2013, at 7:36 AM, Casey Ransberger <[hidden email]> wrote: > This is so meta. > > On Fri, Feb 15, 2013 at 7:34 AM, Bert Freudenberg <[hidden email]> wrote: > On 2013-02-15, at 16:19, Casey Ransberger <[hidden email]> wrote: > > > Right. Six degrees of computer science, at the center of which is... so anyway, for exactly this reason, we totally need to get Kevin Bacon to play him in the movie. > > Hehe. "Alan Kay (I) has a Bacon number of 2." > > - Bert - > > > > > > -- > Casey Ransberger tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Strange OpCodes: CRN: Compare to Random Number |
On Fri, Feb 15, 2013 at 10:18 AM, tim Rowledge <[hidden email]> wrote: I *am* Kevin Bacon. I just play a mild-mannered engineering analyst between gigs. Is that a round-about way of saying that your Bacon number is 0?
|
On 15-02-2013, at 10:21 AM, Colin Putney <[hidden email]> wrote: > > On Fri, Feb 15, 2013 at 10:18 AM, tim Rowledge <[hidden email]> wrote: > I *am* Kevin Bacon. I just play a mild-mannered engineering analyst between gigs. > > Is that a round-about way of saying that your Bacon number is 0? > Worse; my Bacon number is 'i'. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim This is all a lot simpler and a lot more complicated than you could possibly imagine |
Free forum by Nabble | Edit this page |