Advertisement

any fast version of procedual Fractal Perlin flow noise ?

Started by July 19, 2024 04:55 AM
5 comments, last by JoeJ 3 months, 2 weeks ago

https://docs.chaos.com/display/OSLShaders/Additional+procedural+noises

as the Fractal Perlin flow noise in the link is so hard to run in Mobile platform using OpenGL ES.

Thanks!

Depending on what you are doing, a texture or two of precomputed noise could work. Perlin noise is not efficient. I'd consider it a “brute force” noise generation technique. It can be OK if you only need a few octaves, but beyond that it's impractical to implement in a shader and expect good performance.

If you don't need dynamic noise, a much faster basic approach is the “Diamond-square algorithm”. This has some quality issues, so I do it differently in my planet generator. I start with a NxN image of white noise, then recursively upscale ¼ of it in a quad-tree structure, each time applying quadratic interpolation (AKA “square-square” interpolation) to upscale, then adding white noise at every vertex, where the white noise is scaled by 2^(-depth). This produces a nice FBM noise without any creasing artifacts.

Advertisement

@Aressera Thanks a lot! have you ever seen optimization of the Fractal Perlin flow noise? searched Diamond-square algorithm but got nothing related with the Fractal Perlin flow noise.

The linked code looks pretty good. I guess there is not so much opportunity for optimization, so i second the advice to use precomputed, tiled textures. Visually there should be no noticeable difference.

@JoeJ thanks! also tried precomputed, tiled, etc. the precomputed method now met banding artifact:(

do you have any good advice on how to make the Fractal Perlin flow noise Tiling?same as the normal perlinNoise? Thanks! I'm also trying to upSample the noise texture but it also might got artifact, still trying.

gpu said:
the precomputed method now met banding artifact:(

Then you loose precision at some point. Mayebe that's related to the other PNG problem.
Ofc. there should be zero difference from using precomputed data vs. calculating the same data every frame. So you need to investigate…

gpu said:
do you have any good advice on how to make the Fractal Perlin flow noise Tiling?

I do not know what's special about the 'flow' in the variant you're interested in. Is it animated? If so, this would make precomputation less attractive eventually, since you'd need many textures.

But in general the key with precomputed noise is to make it tileable, so there are no seams across the boundary of the UV quad. That's easy. For example, if you generate a random number using a hash function like ‘int hash (int u, int v)’, you can achieve tiling each 256 pixels using ‘int prn = hash(u & 255, v & 255)’.
Mostly people use a LUT of pseudo random numbers instead a hash function, but the principle remains the same.
The same works temporally for tiled animation. The frame of time would be just another spatial dimension for a 3D hash function.

This topic is closed to new replies.

Advertisement