Results 1 to 4 of 4

Thread: Noisy caves

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Noisy caves

    We're used to thresholding 2D noise to get continent outlines, when we say that everything below a certain value in the height field is water, and everything above it is land.

    It just occurred to me that we might get some decent caves if we also threshold at the top, so that everything between two threshold values is cave, and everything outside them is rock, as this would turn the "blobs" you get in the former method into something more like irregular contour bands.

    You can do this in Gimp by loading a height field, navigating to Colors -> Threshold, and positioning the two sliders somewhere in the middle of the histogram.

    For my tests, I wrote a program that would generate some random fractal noise, find the peak of the gray-level histogram, and threshold the image at plus or minus a "diggyness" value about the peak. For example, if the peak of the histogram is at 110, and diggyness is 25, then gray values from 85 to 135 will be cave, and values outside that range will be rock. Increasing diggyness increases the amount of open space; varying the type and parameters of the fractal noise varies the overall character of the cave system (rough, smooth, squiggly, straight, big rooms, small rooms, etc.).

    Here's an example of a cave system made with "hybrid multifractal" noise, parameters H = 0.2, lacunarity = 2, octaves = 6, offset = 0.5, gain = 4, and diggyness of 50, and another with "heterogeneous terrain" noise of the same parameters (except gain, which doesn't apply).
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	cave1.png 
Views:	81 
Size:	4.8 KB 
ID:	59069   Click image for larger version. 

Name:	cave2.png 
Views:	66 
Size:	3.4 KB 
ID:	59070  
    My random map generators and GIMP scripts:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts