Skip to content

Instantly share code, notes, and snippets.

@seanlynch
Created March 11, 2016 04:12
Show Gist options
  • Save seanlynch/94007eb36028f41a8f9c to your computer and use it in GitHub Desktop.
Save seanlynch/94007eb36028f41a8f9c to your computer and use it in GitHub Desktop.
import sys
from pynoise.noisemodule import *
from pynoise.noiseutil import *
from pynoise.colors import Color
rmf = RidgedMulti()
billow = Billow(frequency=2.0)
flatten = ScaleBias(source0=billow, scale=0.125, bias=-0.75)
terrain_pick = Perlin(frequency=0.5, persistence=0.25)
terrain = Select(source0=flatten, source1=rmf, source2=terrain_pick, lower_bound=0.0, upper_bound=1000.0, edge_falloff=0.125)
turbulence = Turbulence(source0=terrain, frequency=4.0, power=0.125)
g = GradientColor()
g.add_gradient_point(-1, Color(0.125, 0.627, 0))
g.add_gradient_point(-0.25, Color(0.87, 0.87, 0))
g.add_gradient_point(0.25, Color(0.5, 0.5, 0.5))
g.add_gradient_point(1.0, Color(1.0, 1.0, 1.0))
nm1 = noise_map_plane_gpu(256, 256, 6.0, 10.0, 1.0, 5.0, turbulence)
r = RenderImage(light_enabled=True, light_contrast=2, light_brightness=2)
r.render(256, 256, nm1, 'tut5_5.png', g)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment