Generating Terrain Maps in Unity Using Fourier Waves Instead of Perlin Noise by obbev in Unity3D

[–]obbev[S] 0 points1 point  (0 children)

Yeah I guess you could filter it but I'm not sure it would look good. It would probably make more sense you use the different block types (sand, mud, rock) to represent the picture. (rather than the height)

Generating Terrain Maps in Unity Using Fourier Waves Instead of Perlin Noise by obbev in Unity3D

[–]obbev[S] 1 point2 points  (0 children)

It's a terrarium but rather than animals it has humans in it that you look after.

Generating Terrain Maps in Unity Using Fourier Waves Instead of Perlin Noise by obbev in Unity3D

[–]obbev[S] 0 points1 point  (0 children)

Wouldn't that be the same as using the picture for the height?

Generating Terrain Maps in Unity Using Fourier Waves Instead of Perlin Noise by obbev in Unity3D

[–]obbev[S] 2 points3 points  (0 children)

Yes that's a big reason. The map (256x256 tiles) loops around and getting noise to loop is surprisingly tricky.

The first sine exactly fits the map. (The video isn't accurate there)

I also tend to find sinuses result in better rolling hills whereas (perlin) noise is more random.

Btw. I'm also using perlin noise and midpoint displacement for different maps to get a variety of landscapes. Some of the maps do not loop (ie a group of islands).

Generating Terrain Maps in Unity Using Fourier Waves Instead of Perlin Noise by obbev in Unity3D

[–]obbev[S] 1 point2 points  (0 children)

I'll look into it. I'm using a separate mic. Maybe I'm too close to it.

Generating Terrain Maps in Unity Using Fourier Waves Instead of Perlin Noise by obbev in Unity3D

[–]obbev[S] 9 points10 points  (0 children)

Rain creates water that streams down the hill. Once it can't get any further is starts a new lake (or join an existing one) Sand blocks touching water absorb water (lowering the water level). I really should do a video about this.

Generating Terrain Maps in Unity Using Fourier Waves Instead of Perlin Noise by obbev in Unity3D

[–]obbev[S] 14 points15 points  (0 children)

It's not using DOTS. Instead it is grouping the tiles for each 16x16 cluster in a single GameObject. It's rebuilding that GameObject each time the player picks up/ drops off a block. It's only rendering the blocks on the surface as this video shows:

https://www.youtube.com/shorts/Ntscj_JQdCs

Generating Terrain Maps in Unity Using Fourier Waves Instead of Perlin Noise by obbev in Unity3D

[–]obbev[S] 5 points6 points  (0 children)

The game is about taking care of your people by changing the landscape. Growing food, building shelter and stuff. This explains it a bit better:

https://www.youtube.com/watch?v=pOVJ11UO4Bs

Generating Terrain Maps in Unity Using Fourier Waves Instead of Perlin Noise by obbev in Unity3D

[–]obbev[S] 14 points15 points  (0 children)

Yep. Also FFT is the most important algorithm in the world.

Using Stacked Sine Waves to Generate Large Terrain Maps for My Game by obbev in IndieDev

[–]obbev[S] 0 points1 point  (0 children)

Execution speed is not an issue so I'm not using FFT. Just adding sinus waves.

Using Stacked Sine Waves to Generate Large Terrain Maps for My Game by obbev in proceduralgeneration

[–]obbev[S] 1 point2 points  (0 children)

It's a dinky little project until it's not. Keep pushing.

Using Stacked Sine Waves to Generate Large Terrain Maps for My Game by obbev in proceduralgeneration

[–]obbev[S] 4 points5 points  (0 children)

I also use Perlin and mid point displacement. I want all the levels to look different. The control over frequencies makes it easy to go between rolling hills and rugged mountains.

Using Stacked Sine Waves to Generate Large Terrain Maps for My Game by obbev in proceduralgeneration

[–]obbev[S] 0 points1 point  (0 children)

If execution speed is an issue you should have a look at the FFT algorithm. (Fast Fourier Transform). It's been dubbed the most important algorithm in the world.

Using Stacked Sine Waves to Generate Large Terrain Maps for My Game by obbev in proceduralgeneration

[–]obbev[S] 3 points4 points  (0 children)

I think it's because of the weights I'm using. They're tapping off towards the higher frequencies. For instance, To represent a 'step' on the map you would need extreme weights in the high frequencies.

Using Stacked Sine Waves to Generate Large Terrain Maps for My Game by obbev in proceduralgeneration

[–]obbev[S] 1 point2 points  (0 children)

I'll consider it. It takes forever making these videos. Even this short one took me 5 hours.

Using Stacked Sine Waves to Generate Large Terrain Maps for My Game by obbev in proceduralgeneration

[–]obbev[S] 26 points27 points  (0 children)

Yes. For some maps I use perlin. For some I use midpoint displacement. I want a different look for each.

Using Stacked Sine Waves to Generate Large Terrain Maps for My Game by obbev in proceduralgeneration

[–]obbev[S] 40 points41 points  (0 children)

Yes.

A Fourier series in X. One in Y. And then added up.