Skip to content

Instantly share code, notes, and snippets.

@TinkerWorX
Created June 1, 2012 01:38
Show Gist options
  • Save TinkerWorX/2847952 to your computer and use it in GitHub Desktop.
Save TinkerWorX/2847952 to your computer and use it in GitHub Desktop.
Module chain in XML
<chain source="ground_select">
<module type="constant" name="tile_air" value="1.00" />
<module type="constant" name="tile_dirt" value="2.00" />
<module type="constant" name="tile_stone" value="3.00" />
<module type="constant" name="tile_copper" value="4.00" />
<module type="constant" name="tile_silver" value="5.00" />
<module type="constant" name="tile_gold" value="6.00" />
<module type="constant" name="tile_bedrock" value="255.00" />
<module type="gradient" name="contour_gradient" x0="0.00" x1="0.00" y0="0.00" y1="1.00" />
<module type="fractal" name="contour_fractal" fractal_type="fbm" basis_type="gradient" interpolation_type="quintic" octaves="3" frequency="2.00" />
<module type="cache" name="contour_fractal_cache" source="contour_fractal" />
<module type="scale_offset" name="contour_scale" source="contour_fractal_cache" scale="0.50" offset="0.00" />
<module type="scale_domain" name="contour_scale_y" source="contour_scale" ys="0.00" />
<module type="translate_domain" name="contour_perturb" source="contour_gradient" ya="contour_scale_y" />
<module type="scale_offset" name="contour_overhang_scale" source="contour_fractal_cache" scale="0.50" offset="0.00" />
<module type="translate_domain" name="contour_overhang_perturb" source="contour_perturb" xa="contour_overhang_scale" />
<module type="gradient" name="ground_gradient" x0="0.00" x1="0.00" y0="0.00" y1="0.90" />
<module type="clamp" name="ground_gradient_clamp" source="ground_gradient" low="0.00" high="1.00" />
<module type="fractal" name="ground_fractal" fractal_type="ridged_multi" basis_type="gradient" interpolation_type="quintic" octaves="3" frequency="10.00" />
<module type="combiner" name="ground_gradient_combiner" combiner_type="multiply">
<source>ground_fractal</source>
<source>ground_gradient_clamp</source>
</module>
<module type="select" name="ground_1" source="ground_gradient_combiner" low="tile_dirt" high="tile_stone" threshold="0.50" />
<module type="select" name="ground_2" source="ground_gradient_combiner" low="ground_1" high="tile_stone" threshold="0.80" />
<module type="select" name="ground_select" source="contour_overhang_perturb" low="tile_air" high="ground_2" threshold="0.50" />
</chain>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment