Node: Gabor Noise Texture #110802

Open
Charlie Jolly wants to merge 68 commits from CharlieJolly/blender:gabor into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 12 additions and 9 deletions
Showing only changes of commit 9cd95748f2 - Show all commits

View File

@ -44,6 +44,8 @@ NODE_STORAGE_FUNCS(NodeTexGabor)
static void node_declare(NodeDeclarationBuilder &b)
{
b.is_function_node();
b.use_custom_socket_order();
b.add_output<decl::Float>("Value").no_muted_links();
b.add_input<decl::Vector>("Vector").implicit_field(implicit_field_inputs::position);
b.add_input<decl::Float>("Scale").min(-1000.0f).max(1000.0f).default_value(5.0f);
b.add_input<decl::Float>("Base Frequency")
@ -51,38 +53,40 @@ static void node_declare(NodeDeclarationBuilder &b)
.max(100.0f)
.default_value(16.0f)
.description("Frequency for the kernel shape, higher values provides more detail");
b.add_input<decl::Float>("Detail").min(0.0f).max(15.0f).default_value(0.0f).description(
PanelDeclarationBuilder &fractal = b.add_panel("Fractal").default_closed(true);
fractal.add_input<decl::Float>("Detail").min(0.0f).max(15.0f).default_value(0.0f).description(
"Number of noise octaves, high values are slower to compute");
b.add_input<decl::Float>("Roughness")
fractal.add_input<decl::Float>("Roughness")
.min(0.0f)
.max(1.0f)
.default_value(0.5f)
.subtype(PROP_FACTOR);
b.add_input<decl::Float>("Scale Lacunarity")
fractal.add_input<decl::Float>("Scale Lacunarity")
.min(-10.0f)
.max(10.0f)
.default_value(2.0f)
.description("The difference between the scale of each consecutive octave");
b.add_input<decl::Float>("Frequency Lacunarity")
fractal.add_input<decl::Float>("Frequency Lacunarity")
.min(-10.0f)
.max(10.0f)
.default_value(2.0f)
.description("The difference between the kernel frequency of each consecutive octave");
b.add_input<decl::Float>("Rotation Lacunarity")
fractal.add_input<decl::Float>("Rotation Lacunarity")
.subtype(PROP_ANGLE)
.description("The difference between the kernel rotation of each consecutive octave");
b.add_input<decl::Float>("Bandwidth")
PanelDeclarationBuilder &kernel = b.add_panel("Kernel").default_closed(true);
kernel.add_input<decl::Float>("Bandwidth")
.min(0.0f)
.max(32.0f)
.default_value(1.0f)
.description("Controls the power of the kernel");
b.add_input<decl::Float>("Radius")
kernel.add_input<decl::Float>("Radius")
.min(0.0f)
.max(1.0f)
.default_value(1.0f)
.subtype(PROP_FACTOR)
.description("Controls the radius of the kernel, values over 1 will produce artefacts");
b.add_input<decl::Float>("Impulses")
kernel.add_input<decl::Float>("Impulses")
.min(0.0f)
.max(16.0f)
.default_value(2.0f)
@ -114,7 +118,6 @@ static void node_declare(NodeDeclarationBuilder &b)
.default_value(1.0f)
.subtype(PROP_FACTOR)
.description("Cell randomness");
b.add_output<decl::Float>("Value").no_muted_links();
}
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)