Create Data3DTexturewith perlin noise

I would like to create in the Data3DTexture with a repeating Perlin noise so that I can use that to improve performance, I want it to create it once and then use it in the shader…

Are there any resources about this?

Thank you!

Feel free to liberate this class and use it directly in your code (it’s a little cleaned-up version of a bit outdated noise.js. Keep in mind original is 10 years old.)

Alternatively, you can use one of these in GLSL (keeping in mind doing so can be terribly slow for high-resolution textures) or just port the one you like from GLSL to JS - they aren’t super complex.

Thank you.

The first library looks good but I need it to create a Perlin noise that repeats itself because I will use it to distort a texture UV… I could not find any algorithm for that…

I think is called tilling…

3D textures in core three don’t support tiling - you’d need to code it in manually (mirrored-repeat wrap to be more precise. You can find code for that in the OpenVDB repo too), or indeed, look for a repeated Perlin noise if there exists one :eyes:

1 Like