123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|429|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> C/C++/C#/Other -> Suggestions for encouraging noise away from borders?

Wed, 26 Oct 2011, 12:35
HoboBen
Some of you might remember the world generator I prototyped in Cobra (SoCoder showcase)

I'm working on an improved C version, and I'm using multiple octaves of simplex noise instead of a fractal for the terrain heightmap. (also because it can extend to n dimensions, it makes time-animated clouds trivial)

This will avoid the diamond shaped mountains and gives me more control over the land type, e.g I can quickly switch between continents and islands:




One issue is though, I'd like there to be an option to avoid any terrain from touching the image border, without it looking like I've just cropped it with a circle.

Any ideas?

-=-=-
blog | work | code | more code
Wed, 26 Oct 2011, 13:42
Jayenkai
Tricky!

What if you made it more planet-like?

Start with a large noise-based splodge in the center, and then grab chunks, pulling the landmass apart, leaving splodgey bits about the place.
Maybe account for spherical wraparound, too?

-=-=-
''Load, Next List!''
Wed, 26 Oct 2011, 14:23
HoboBen
Oooh, got it!



Rather than multiply by a scale factor based on distance, I simply subtract instead!

Only issue is that doing so means that the multiple-small islands type of map doesn't work (because you are artificially inflating the centre) -- so I'm still going to try alternatives.

Possibly gently cropping with a star shape instead of a circle.

-=-=-
blog | work | code | more code
Mon, 31 Oct 2011, 14:10
Teasy
'algorithm':


splodge overlaps edge: