Noise

So - what noise library did you use, or did you roll your own?

I’m doing procedural planets - and frankly, it’s a bit slow, even on a new ipad. That’s fine - I plan to generate them on-the-fly and cache the generated version - but it makes tweaking the 18 zillion parameters I’m messing with (and more all the time!) tedious.

So I had the bright idea I’d do the same thing in Love2D on the mac book pro, which should be at least a couple of orders of magnitude or more faster - except (1) no built in noise, and (2) even if it had one, I’m not sure it would match what we have in Codea.

The goal is to use “random” numbers based on a specific seed - so one number completely defines a planet - I can then do tons of them, and cherry-pick the “interesting” ones.

This is the noise code:

https://github.com/TwoLivesLeft/Codea-Runtime/blob/master/CodeaTemplate/Codify/ImprovedPerlinNoise.h

I actually ported it from Ken Perlin’s Java sample in 2008. I think I added the tiled version (for seamless tiling noise, but that’s not exposed to Codea).

Oh hey - you open sourced the engine, I forgot. Doh - too much work, my brain’s not thinking straight. Thanks @Simeon - this will help, I think.

@Bortels - I actually commented on your procedural planets post, there might be a few optimisations you can use to speed to generation time (and lower the memory footprint to boot). :slight_smile:

I you need a noise function on your macbook, it might be good to make the noise function in GLSL, like the fragment shaders here:

http://webstaff.itn.liu.se/~stegu/simplexnoise/

I’ve tried it on iOS, but it’s to slow to be impressive. :slight_smile:

Thing is, it would need to match the Codea noise function, or it would be useless for predicting what things would look like in Codea.

No matter - I am getting by with much smaller planets, which lets me fine-tune my code, and render in less than a second.