Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Hazevoet <jimhazevoet@gmail.com>2017-07-12 04:07:50 +0300
committermeta-androcto <meta.androcto1@gmail.com>2017-07-12 04:07:50 +0300
commit1fd6f67b33414c0db101255f61df30cf6de1e471 (patch)
tree6f473d35d8caa83414f7f28000974372c5d2595a /ant_landscape
parent8a3e171dabe636e089ed1f7beb2c09a101ab2afb (diff)
ant landscape: fix regeneration
Diffstat (limited to 'ant_landscape')
-rw-r--r--ant_landscape/ant_noise.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/ant_landscape/ant_noise.py b/ant_landscape/ant_noise.py
index 22a308a1..78c8b770 100644
--- a/ant_landscape/ant_noise.py
+++ b/ant_landscape/ant_noise.py
@@ -395,7 +395,7 @@ def Effect_Basis_Function(coords, type, bias):
effect = offset + iscale * effect
## sparse cracks noise:
elif type == 14:
- effect = 2.5 * abs(noise((x * 0.5, y * 0.5, 0), 1)) - 0.1
+ effect = 2.5 * abs(noise((x, y, 0), 1)) - 0.1
if effect > 0.25:
effect = 0.25
effect = offset + iscale * (effect * 2.5)
@@ -410,7 +410,7 @@ def Effect_Basis_Function(coords, type, bias):
effect = 0.25 + 1.5 * voronoi((x, y, 0), 1)[0][0]
if effect > 0.5:
effect = 0.5
- effect = offset + iscale * effect
+ effect = offset + iscale * effect * 2
## cosine noise:
elif type == 17:
effect = cos(5 * noise((x, y, 0), 0))
@@ -639,14 +639,15 @@ def noise_gen(coords, props):
value = 0.5
# Effect mix
- if fx_type != "0":
+ val = value
+ if fx_type in [0,"0"]:
+ fx_mixfactor = -1.0
+ fxval = val
+ else:
fxcoords = Trans_Effect((x, y, z), fx_size, (fx_loc_x, fx_loc_y))
effect = Effect_Function(fxcoords, fx_type, fx_bias, fx_turb, fx_depth, fx_frequency, fx_amplitude)
effect = Height_Scale(effect, fx_height, fx_offset, fx_invert)
- fxval = Mix_Modes(value, effect, fx_mixfactor, fx_mix_mode)
- else:
- fx_mixfactor = 0.0
- fxval = value
+ fxval = Mix_Modes(val, effect, fx_mixfactor, fx_mix_mode)
value = fxval
# Adjust height