Fix wrong default value for Lacunarity in Musgrave texture

Lacunarity parameter determines scaling of subsequent octaves in fractal
noises. For example, Noise node have this scaling hardcoded to 2.0. Each
octave have twice bigger scale than previous one, resulting in finer details.

By design fractal noises that generate octaves with same seed should not
have Lacunarity set to 1.0, since then it just stacks up identical noises.

Differential Revision: https://developer.blender.org/D6742
This commit is contained in:
Bartosz Moniewski 2020-02-04 13:39:02 +01:00 committed by Brecht Van Lommel
parent e35dab4895
commit 842e71a1ef
3 changed files with 3 additions and 3 deletions

@ -691,7 +691,7 @@ shader node_musgrave_texture(
float Dimension = 2.0,
float Scale = 5.0,
float Detail = 2.0,
float Lacunarity = 1.0,
float Lacunarity = 2.0,
float Offset = 0.0,
float Gain = 1.0,
output float Fac = 0.0)

@ -1347,7 +1347,7 @@ NODE_DEFINE(MusgraveTextureNode)
SOCKET_IN_FLOAT(scale, "Scale", 1.0f);
SOCKET_IN_FLOAT(detail, "Detail", 2.0f);
SOCKET_IN_FLOAT(dimension, "Dimension", 2.0f);
SOCKET_IN_FLOAT(lacunarity, "Lacunarity", 1.0f);
SOCKET_IN_FLOAT(lacunarity, "Lacunarity", 2.0f);
SOCKET_IN_FLOAT(offset, "Offset", 0.0f);
SOCKET_IN_FLOAT(gain, "Gain", 1.0f);

@ -27,7 +27,7 @@ static bNodeSocketTemplate sh_node_tex_musgrave_in[] = {
{SOCK_FLOAT, 1, N_("Scale"), 5.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f},
{SOCK_FLOAT, 1, N_("Detail"), 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 16.0f},
{SOCK_FLOAT, 1, N_("Dimension"), 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000.0f},
{SOCK_FLOAT, 1, N_("Lacunarity"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000.0f},
{SOCK_FLOAT, 1, N_("Lacunarity"), 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000.0f},
{SOCK_FLOAT, 1, N_("Offset"), 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f},
{SOCK_FLOAT, 1, N_("Gain"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000.0f},
{-1, 0, ""},