How to make a perlin noise generation *Smoother*

You can write your topic however you want, but you need to answer these questions:

  1. **What do you want to achieve?**Im trying to give a low polly look at the perlin noise generation

  2. What is the issue?
    video of the photo:https://www.youtube.com/watch?v=yA210k9ie8Y&t=1094s

  3. What solutions have you tried so far? I tried to check some places but there wasnt anything about it

Im not asking for free code here Im trying to see how it is possible or some kinda explanation would be pro

1 Like

You can do this mountain blending function.

yes but there wasnt really a explanation of how he did that so sadly this doesnt help

Anyone got a idea? Still I got no brain cells to make it work in anyway

Anyone got a idea? Still I got no brain cells to make it work in anyway

When generating math with math.noise() and using Perlin you will typically set it up as so

local ResX,ResY = 15,15


for x = -ResX,ResX do
	for y = -ResY,ResY do
		-- Store if your data as necessary i.e table[x] = {} table[x][y] = {}
		local Height = math.noise(
			x / ResX,
			y / ResY
		)
	end
end

And with this you have some pretty basic noise, But as you’ve said we need to make it smoother! And there we introduce our frequency value, the frequency is how much the noise differs as its generated or as youve said “how smooth it is” heres how we would set that up

local ResX,ResY,Frequency = 15,15,5


for x = -ResX,ResX do
	for y = -ResY,ResY do
		-- Store if your data as necessary i.e table[x] = {} table[x][y] = {}
		local Height = math.noise(
			x / ResX * Frequency, -- The (x/y) / resolution will still work as asked
			y / ResY * Frequency -- however, we now introduce our frequency value
                                 -- this value is how we will shift around our noise to be used as wanted!
		)
	end
end
1 Like

To make it low poly, I would create a map of triangles (e.g. just a standard triangle tessellation), sample the noise at the points of the triangles, then create 3D triangles between the sampled heights.

E.g. sample in this pattern:

image

Then make a 3D triangle between the points of the form (patternX, noiseSampleHeight, patternZ).


For smoother noise, you can make the noise map wider.


For more realistic/varied terrain, try a combination of big noise maps that are smooth along with smaller noise maps.


For noise like in the first reply, take a regular noise map, then multiple it by a “mountain” noise map. You can make the mountain noise map by doing:

-- An example of a map that would work:
local regularNoise = sampleNoise() -- Make this a very big noise map, that varies slowly
-- Make the noise [0-1]
mountainNoise = (regularNoise/2 + 0.5)
if mountainNoise > 0.5 then
    mountainNoise *= mountainNoise -- Make high parts of the map extra high
else

For more help, what do you mean by smoother? Low poly and smooth seem kind of contradictory.

3 Likes

Oh yeah I tought it would make more sense if I say smoother and lowpolly at the same time. Ok so Im looking to make lowpolly generation. OK now let me get to the point:

(patternX, noiseSampleHeight, patternZ) I thought this before but I didnt know how to rotate them and I couldnt explain myself better ? Can you explain a bit more :sad:

1 Like

Yeah, doing the math for positioning the wedges can be tricky. There are some modules you can use though, like this one:

Egomoose also has a great article that explains the math and stuff:


Does the sample pattern stuff make sense? I can explain that more.

1 Like

OK Im banned so I cant really try it out :sob:

1 Like

OK broo it worked VERY GOOD but would this be possible with squares too ? also its too laggy :sob: