jwagner / simplex-noise.js

A fast simplex noise implementation in Javascript / Typescript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can you add support for tileable 2d noise patterns?

zachdyer opened this issue · comments

I think it would be useful in game development to make tileable noise patterns for textures and planet generation.

Hi Zach, sorry for the delayed reply.

I'm not sure if it makes much sense to add this to this library. At least for most of my cases where I needed tile-able textures having support at the noise function level would have been of limited use because the noise is composed at a higher level. I think hardly anyone uses straight single octave simplex noise. If you could share more details about your exact case and what you would expect the API to look like that could help me to understand.

Regarding the planet case, there are a few approaches to this. The simplest being that you just use a 3D noise texture and sample along the sphere. That way you don't need to project the sphere down to 2d. Another alternative is triplanar mapping: https://www.ronja-tutorials.com/2018/05/11/triplanar-mapping.html

I hope that helps.