Skip to content

Instantly share code, notes, and snippets.

@TinkerWorX
Created June 1, 2012 01:37
Show Gist options
  • Save TinkerWorX/2847947 to your computer and use it in GitHub Desktop.
Save TinkerWorX/2847947 to your computer and use it in GitHub Desktop.
Module chain in JSON
{
"modules": [
{ "type": "constant", "key": "tile_air", "value": "1" },
{ "type": "constant", "key": "tile_dirt", "value": "2" },
{ "type": "constant", "key": "tile_stone", "value": "3" },
{ "type": "constant", "key": "tile_copper", "value": "4" },
{ "type": "constant", "key": "tile_silver", "value": "5" },
{ "type": "constant", "key": "tile_gold", "value": "6" },
{ "type": "gradient", "key": "contour_gradient", "x0":"0.00", "x1":"0.00", "y0": "0.00", "y1": "1.00" },
{ "type": "fractal", "key": "contour_fractal", "fractal": "fbm", "basis": "gradient", "interpolation": "quintic", "octaves": "3", "frequency": "2.00" },
{ "type": "cache", "key": "contour_fractal_cache", "source": "contour_fractal" },
{ "type": "scale_offset", "key": "contour_scale", "source": "contour_fractal_cache", "scale": "0.50", "offset": "0.00" },
{ "type": "scale_domain", "key": "contour_scale_y", "source": "contour_scale", "y": "0.00" },
{ "type": "translate_domain", "key": "contour_perturb", "source": "contour_gradient", "y": "contour_scale_y" },
{ "type": "scale_offset", "key": "contour_overhang_scale", "source": "contour_fractal_cache", "scale": "0.50", "offset": "0.00" },
{ "type": "translate_domain", "key": "contour_overhang_perturb", "source": "contour_perturb", "x": "contour_overhang_scale" },
{ "type": "gradient", "key": "ground_gradient", "x0":"0.00", "x1":"0.00", "y0": "0.00", "y1": "0.90" },
{ "type": "clamp", "key": "ground_gradient_clamp", "source": "ground_gradient", "low":"0.00", "high": "1.00" },
{ "type": "fractal", "key": "ground_fractal", "fractal": "ridged_multi", "basis": "gradient", "interpolation": "quintic", "octaves": "3", "frequency": "10.00" },
{ "type": "combiner", "key": "ground_gradient_combiner", "type": "multiply",
"sources": [
{ "source": "ground_fractal" },
{ "source": "ground_gradient_clamp" }
]
},
{ "type": "select", "key": "ground_1", "source": "ground_gradient_combiner", "low": "tile_dirt", "high": "tile_stone", "threshold": "0.50" },
{ "type": "select", "key": "ground_2", "source": "ground_gradient_combiner", "low": "ground_1", "high": "tile_stone", "threshold": "0.80" },
{ "type": "select", "key": "ground_select", "source": "contour_overhang_perturb", "low": "tile_air", "high": "ground_2", "threshold": "0.50" }
],
"source": "ground_select"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment