Garry's Mod

Garry's Mod

Procedural Terrain / Maps
 This topic has been pinned, so it's probably important
Meetric  [developer] 3 Jul, 2022 @ 8:15pm
Custom Heightmap functions
give out your custom hightmap functions here if you want!
< >
Showing 1-10 of 10 comments
Meetric  [developer] 3 Jul, 2022 @ 8:16pm 
return (sin(x)^2 + cos(y)^2) * 10
Last edited by Meetric; 3 Jul, 2022 @ 8:29pm
stingpie 3 Jul, 2022 @ 9:32pm 
xscale=1
yscale=4
zscale=0.05
steepness=0.25
zpos=-50
xpos=0
ypos=40
return zpos+ log ( zscale* sqrt((cos(y*yscale+ypos)*(x*xscale+xpos)+(y*yscale+ypos))^(sin(y*steepness+ypos)*(x*xscale+xpos)+(y*steepness+ypos)) ) )
::Рοϲκ:: 4 Jul, 2022 @ 8:25am 
return (( 2*x*y*(2*pi*sqrt(x^2 + y^2)) / sqrt(x^2 + y^2) )^2 /590)+6 four mnt. valley with flat top

return ( 2*x*y*(pi*sqrt(x^2 + y^2)) / ((x^2 + y^2)) ) + 10 two lakes & mountains / hills

return 3*cos(2*abs(x*2)+abs(y*2))*(sin(x)+sin(y))+5 swampy hill thingi

return cos(2*abs(x*2)+sin(y*2))*(sin(x)+sin(y))+4.6 worm lakes, variation of "swampy hill thingi

return (5*cosh(sin((x^2)*y -2 ))) just a cool pattern i like

return 2*sin(cos((x))) + 2*sin(cos((y)))+3 pillow islands, sadly due to tan the shadows get messy
Last edited by ::Рοϲκ::; 4 Jul, 2022 @ 8:25am
stingpie 4 Jul, 2022 @ 1:33pm 
local values =
{0, 1, 2, 3, 3, 2, 1, 0,
1, 2, 5, 5, 5, 5, 2, 1,
2, 5, 6, 7, 7, 6, 5, 2,
3, 5, 7, 9, 9, 7, 5, 3,

3, 5, 7, 9, 9, 7, 5, 3,
2, 5, 6, 7, 7, 6, 5, 2,
1, 2, 5, 5, 5, 5, 2, 1,
0, 1, 2, 3, 3, 2, 1, 0, }

ysize=8
xsize=8
xscale=1
yscale=1
localX=(floor((x-8)*xscale)/xscale )
localY=(floor((y-8)*yscale)/yscale )


return values[(localX *xsize*xscale + localY%ysize )%(xsize*ysize) + 1] *1
crazygamerguy10 4 Jul, 2022 @ 4:21pm 
local values = {
1,1,1,1,0,0,1,0,0,1,0,0,1,1,1,1,
1,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,
1,1,1,1,0,0,1,0,0,1,0,0,1,1,1,1,
0,0,0,1,0,0,1,0,0,1,0,0,0,0,0,1,
1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,
}
local localX = floor(-x * 2) + 7
local localY = floor(y * 2) + 2
if localX < 1 or localX > 16 then
return 0
end
return (values[localX + localY * 16] or 0) * 10
Cigarette 4 Jul, 2022 @ 7:29pm 
If you guys can, describe what it is, i.e. Vally, mountain, massive spike, etc.
Takes away the boring part of waiting for it to generate to see what it is.
::Рοϲκ:: 5 Jul, 2022 @ 5:15am 
Originally posted by Sir. Vapenation:
If you guys can, describe what it is, i.e. Vally, mountain, massive spike, etc.
Takes away the boring part of waiting for it to generate to see what it is.
but also adds a sense of cusiosity and mystery.
BIG BOSS 5 Jul, 2022 @ 5:53am 
Originally posted by crazygamerguy10:
local values = {
1,1,1,1,0,0,1,0,0,1,0,0,1,1,1,1,
1,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,
1,1,1,1,0,0,1,0,0,1,0,0,1,1,1,1,
0,0,0,1,0,0,1,0,0,1,0,0,0,0,0,1,
1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,
}
local localX = floor(-x * 2) + 7
local localY = floor(y * 2) + 2
if localX < 1 or localX > 16 then
return 0
end
return (values[localX + localY * 16] or 0) * 10
sus
Thas 6 Jul, 2022 @ 10:18am 
Originally posted by Sir. Vapenation:
If you guys can, describe what it is, i.e. Vally, mountain, massive spike, etc.
Takes away the boring part of waiting for it to generate to see what it is.

You can just press the test changes button instead of fully generating it though
minty 1 Nov, 2022 @ 5:18pm 
return (sin(sqrt((x * 8)^5 + (y * 5)^2)) + 2) * 20 Name: Farlands
< >
Showing 1-10 of 10 comments
Per page: 1530 50