From 707c16031729935dfa939ec0e508529d6ca06038 Mon Sep 17 00:00:00 2001 From: RodZill4 Date: Tue, 3 Mar 2020 22:50:18 +0100 Subject: [PATCH] Updated examples --- material_maker/examples/beehive.ptex | 690 +++-- material_maker/examples/bricks.ptex | 449 +-- material_maker/examples/mandala.ptex | 216 +- material_maker/examples/pile_of_bricks.ptex | 402 ++- material_maker/examples/skulls.ptex | 2838 +++++++++---------- material_maker/examples/stone_wall.ptex | 82 +- 6 files changed, 2285 insertions(+), 2392 deletions(-) diff --git a/material_maker/examples/beehive.ptex b/material_maker/examples/beehive.ptex index c8e3bc2..da4fb9b 100644 --- a/material_maker/examples/beehive.ptex +++ b/material_maker/examples/beehive.ptex @@ -1,82 +1,34 @@ { "connections": [ { - "from": "colorize_2", - "from_port": 0, - "to": "blend", - "to_port": 0 - }, - { - "from": "colorize", - "from_port": 0, - "to": "blend", - "to_port": 1 - }, - { - "from": "normal_map", + "from": "graph", "from_port": 0, "to": "Material", "to_port": 4 }, { - "from": "blend", - "from_port": 0, - "to": "normal_map", - "to_port": 0 - }, - { - "from": "blend", - "from_port": 0, - "to": "colorize_3", - "to_port": 0 - }, - { - "from": "colorize_3", - "from_port": 0, + "from": "graph", + "from_port": 1, "to": "Material", "to_port": 6 }, { - "from": "uniform_greyscale", - "from_port": 0, + "from": "graph", + "from_port": 2, "to": "Material", "to_port": 1 }, { - "from": "colorize_4", - "from_port": 0, + "from": "graph", + "from_port": 3, "to": "Material", "to_port": 2 }, { - "from": "colorize_5", - "from_port": 0, + "from": "graph", + "from_port": 4, "to": "Material", "to_port": 0 - }, - { - "from": "blend", - "from_port": 0, - "to": "colorize_5", - "to_port": 0 - }, - { - "from": "blend", - "from_port": 0, - "to": "colorize_4", - "to_port": 0 - }, - { - "from": "beehive_2", - "from_port": 0, - "to": "colorize_2", - "to_port": 0 - }, - { - "from": "beehive_2", - "from_port": 1, - "to": "colorize", - "to_port": 0 } ], "label": "Graph", @@ -89,8 +41,8 @@ { "name": "Material", "node_position": { - "x": 134, - "y": -22 + "x": -28, + "y": -37 }, "parameters": { "albedo_color": { @@ -112,227 +64,465 @@ "type": "material" }, { - "name": "colorize", + "connections": [ + { + "from": "normal_map", + "from_port": 0, + "to": "gen_outputs", + "to_port": 0 + }, + { + "from": "graph", + "from_port": 0, + "to": "normal_map", + "to_port": 0 + }, + { + "from": "graph", + "from_port": 0, + "to": "colorize_3", + "to_port": 0 + }, + { + "from": "colorize_3", + "from_port": 0, + "to": "gen_outputs", + "to_port": 1 + }, + { + "from": "uniform_greyscale", + "from_port": 0, + "to": "gen_outputs", + "to_port": 2 + }, + { + "from": "colorize_4", + "from_port": 0, + "to": "gen_outputs", + "to_port": 3 + }, + { + "from": "colorize_5", + "from_port": 0, + "to": "gen_outputs", + "to_port": 4 + }, + { + "from": "graph", + "from_port": 0, + "to": "colorize_5", + "to_port": 0 + }, + { + "from": "graph", + "from_port": 0, + "to": "colorize_4", + "to_port": 0 + } + ], + "label": "Graph", + "name": "graph", "node_position": { - "x": -489.5, - "y": 20 + "x": -353.865601, + "y": 6.860606 }, - "parameters": { - "gradient": { - "interpolation": 1, - "points": [ + "nodes": [ + { + "name": "colorize_5", + "node_position": { + "x": -240.009644, + "y": -136 + }, + "parameters": { + "gradient": { + "interpolation": 1, + "points": [ + { + "a": 1, + "b": 0, + "g": 0.068034, + "pos": 0, + "r": 0.098958 + }, + { + "a": 1, + "b": 0, + "g": 0.6875, + "pos": 0.881818, + "r": 1 + } + ], + "type": "Gradient" + } + }, + "type": "colorize" + }, + { + "name": "colorize_4", + "node_position": { + "x": -245.009644, + "y": 15 + }, + "parameters": { + "gradient": { + "interpolation": 1, + "points": [ + { + "a": 1, + "b": 0.65625, + "g": 0.65625, + "pos": 0.518182, + "r": 0.65625 + }, + { + "a": 1, + "b": 0, + "g": 0, + "pos": 0.890909, + "r": 0 + } + ], + "type": "Gradient" + } + }, + "type": "colorize" + }, + { + "name": "uniform_greyscale", + "node_position": { + "x": -246.009644, + "y": -55.5 + }, + "parameters": { + "color": 0.16 + }, + "type": "uniform_greyscale" + }, + { + "name": "colorize_3", + "node_position": { + "x": -244.009644, + "y": 233.5 + }, + "parameters": { + "gradient": { + "interpolation": 1, + "points": [ + { + "a": 1, + "b": 1, + "g": 1, + "pos": 0, + "r": 1 + }, + { + "a": 1, + "b": 0, + "g": 0, + "pos": 1, + "r": 0 + } + ], + "type": "Gradient" + } + }, + "type": "colorize" + }, + { + "name": "normal_map", + "node_position": { + "x": -235.009644, + "y": 96 + }, + "parameters": { + "param0": 11, + "param1": 1.02, + "param2": 0, + "param4": 1 + }, + "type": "normal_map" + }, + { + "name": "gen_inputs", + "node_position": { + "x": -802.009644, + "y": 6.860606 + }, + "parameters": { + + }, + "ports": [ + + ], + "type": "ios" + }, + { + "name": "gen_outputs", + "node_position": { + "x": 64.990356, + "y": 6.860606 + }, + "parameters": { + + }, + "ports": [ { - "a": 1, - "b": 0, - "g": 0, - "pos": 0, - "r": 0 + "name": "port0", + "type": "rgba" }, { - "a": 1, - "b": 0.225431, - "g": 0.225431, - "pos": 0.583818, - "r": 0.225431 + "name": "port1", + "type": "rgba" }, { - "a": 1, - "b": 0.96875, - "g": 0.96875, - "pos": 0.672727, - "r": 0.96875 + "name": "port2", + "type": "f" + }, + { + "name": "port3", + "type": "rgba" + }, + { + "name": "port4", + "type": "rgba" } ], - "type": "Gradient" - } - }, - "type": "colorize" - }, - { - "name": "colorize_2", - "node_position": { - "x": -493.5, - "y": -42 - }, - "parameters": { - "gradient": { - "interpolation": 1, - "points": [ + "type": "ios" + }, + { + "name": "gen_parameters", + "node_position": { + "x": -553.865601, + "y": -452.254547 + }, + "parameters": { + + }, + "type": "remote", + "widgets": [ + + ] + }, + { + "connections": [ { - "a": 1, - "b": 1, - "g": 1, - "pos": 0, - "r": 1 + "from": "colorize_2", + "from_port": 0, + "to": "blend", + "to_port": 0 }, { - "a": 1, - "b": 0.947917, - "g": 0.947917, - "pos": 0.049912, - "r": 0.947917 + "from": "colorize", + "from_port": 0, + "to": "blend", + "to_port": 1 }, { - "a": 1, - "b": 0.115584, - "g": 0.115584, - "pos": 0.106977, - "r": 0.115584 + "from": "blend", + "from_port": 0, + "to": "gen_outputs", + "to_port": 0 }, { - "a": 1, - "b": 0, - "g": 0, - "pos": 0.290909, - "r": 0 + "from": "blend", + "from_port": 0, + "to": "gen_outputs", + "to_port": 0 + }, + { + "from": "blend", + "from_port": 0, + "to": "gen_outputs", + "to_port": 0 + }, + { + "from": "blend", + "from_port": 0, + "to": "gen_outputs", + "to_port": 0 + }, + { + "from": "beehive_2", + "from_port": 0, + "to": "colorize_2", + "to_port": 0 + }, + { + "from": "beehive_2", + "from_port": 1, + "to": "colorize", + "to_port": 0 } ], - "type": "Gradient" - } - }, - "type": "colorize" - }, - { - "name": "blend", - "node_position": { - "x": -528.009644, - "y": 89 - }, - "parameters": { - "amount": 1, - "blend_type": 9 - }, - "type": "blend" - }, - { - "name": "normal_map", - "node_position": { - "x": -138.009644, - "y": 78 - }, - "parameters": { - "amount": 0.5, - "param0": 11, - "param1": 1.02, - "param2": 0, - "param3": 0, - "param4": 1, - "size": 4 - }, - "type": "normal_map" - }, - { - "name": "colorize_3", - "node_position": { - "x": -132.009644, - "y": 208.5 - }, - "parameters": { - "gradient": { - "interpolation": 1, - "points": [ + "label": "Graph", + "name": "graph", + "node_position": { + "x": -514.685547, + "y": 2.186363 + }, + "nodes": [ { - "a": 1, - "b": 1, - "g": 1, - "pos": 0, - "r": 1 + "name": "colorize", + "node_position": { + "x": -510.5, + "y": 45 + }, + "parameters": { + "gradient": { + "interpolation": 1, + "points": [ + { + "a": 1, + "b": 0, + "g": 0, + "pos": 0, + "r": 0 + }, + { + "a": 1, + "b": 0.225431, + "g": 0.225431, + "pos": 0.583818, + "r": 0.225431 + }, + { + "a": 1, + "b": 0.96875, + "g": 0.96875, + "pos": 0.672727, + "r": 0.96875 + } + ], + "type": "Gradient" + } + }, + "type": "colorize" }, { - "a": 1, - "b": 0, - "g": 0, - "pos": 1, - "r": 0 - } - ], - "type": "Gradient" - } - }, - "type": "colorize" - }, - { - "name": "uniform_greyscale", - "node_position": { - "x": -98.009644, - "y": -64.5 - }, - "parameters": { - "color": 0.16 - }, - "type": "uniform_greyscale" - }, - { - "name": "colorize_4", - "node_position": { - "x": -153.009644, - "y": 10 - }, - "parameters": { - "gradient": { - "interpolation": 1, - "points": [ - { - "a": 1, - "b": 0.65625, - "g": 0.65625, - "pos": 0.518182, - "r": 0.65625 + "name": "colorize_2", + "node_position": { + "x": -510.5, + "y": -26 + }, + "parameters": { + "gradient": { + "interpolation": 1, + "points": [ + { + "a": 1, + "b": 1, + "g": 1, + "pos": 0, + "r": 1 + }, + { + "a": 1, + "b": 0.947917, + "g": 0.947917, + "pos": 0.049912, + "r": 0.947917 + }, + { + "a": 1, + "b": 0.115584, + "g": 0.115584, + "pos": 0.106977, + "r": 0.115584 + }, + { + "a": 1, + "b": 0, + "g": 0, + "pos": 0.290909, + "r": 0 + } + ], + "type": "Gradient" + } + }, + "type": "colorize" }, { - "a": 1, - "b": 0, - "g": 0, - "pos": 0.890909, - "r": 0 - } - ], - "type": "Gradient" - } - }, - "type": "colorize" - }, - { - "name": "colorize_5", - "node_position": { - "x": -106.009644, - "y": -151 - }, - "parameters": { - "gradient": { - "interpolation": 1, - "points": [ - { - "a": 1, - "b": 0, - "g": 0.068034, - "pos": 0, - "r": 0.098958 + "name": "blend", + "node_position": { + "x": -523.009644, + "y": 117 + }, + "parameters": { + "amount": 1, + "blend_type": 9 + }, + "seed_value": -12215, + "type": "blend" }, { - "a": 1, - "b": 0, - "g": 0.6875, - "pos": 0.881818, - "r": 1 + "name": "beehive_2", + "node_position": { + "x": -514.732483, + "y": -127.254547 + }, + "parameters": { + "sx": 20, + "sy": 12 + }, + "type": "beehive" + }, + { + "name": "gen_inputs", + "node_position": { + "x": -823.009644, + "y": 2.186363 + }, + "parameters": { + + }, + "ports": [ + + ], + "type": "ios" + }, + { + "name": "gen_outputs", + "node_position": { + "x": -210.5, + "y": 2.186363 + }, + "parameters": { + + }, + "ports": [ + { + "name": "port0", + "type": "rgba" + } + ], + "type": "ios" + }, + { + "name": "gen_parameters", + "node_position": { + "x": -714.685547, + "y": -427.254547 + }, + "parameters": { + + }, + "type": "remote", + "widgets": [ + + ] } ], - "type": "Gradient" + "parameters": { + + }, + "type": "graph" } - }, - "type": "colorize" - }, - { - "name": "beehive_2", - "node_position": { - "x": -496.732483, - "y": -162.254547 - }, + ], "parameters": { - "sx": 20, - "sy": 12 + }, - "type": "beehive" + "type": "graph" } ], "parameters": { diff --git a/material_maker/examples/bricks.ptex b/material_maker/examples/bricks.ptex index b709f71..1272181 100644 --- a/material_maker/examples/bricks.ptex +++ b/material_maker/examples/bricks.ptex @@ -207,7 +207,6 @@ "emission_energy": 1, "metallic": 1, "normal_scale": 1, - "resolution": 1, "roughness": 1, "size": 11, "subsurf_scatter_strength": 0 @@ -292,15 +291,9 @@ "y": 86 }, "parameters": { - "color": { - "a": 1, - "b": 1, - "g": 1, - "r": 1, - "type": "Color" - }, - "name": 0 + }, + "seed_value": 60630, "type": "combine" }, { @@ -485,8 +478,7 @@ }, "parameters": { "amount": 0.04, - "eps": 0.045, - "epsilon": 0 + "eps": 0.045 }, "type": "warp" }, @@ -551,435 +543,7 @@ } ] }, - { - "connections": [ - { - "from": "switch_0", - "from_port": 0, - "to": "gen_outputs", - "to_port": 0 - }, - { - "from": "switch_0", - "from_port": 1, - "to": "gen_outputs", - "to_port": 1 - }, - { - "from": "Bricks", - "from_port": 0, - "to": "switch_0", - "to_port": 0 - }, - { - "from": "voronoi_0", - "from_port": 2, - "to": "switch_0", - "to_port": 3 - }, - { - "from": "voronoi_0", - "from_port": 1, - "to": "colorize_5", - "to_port": 0 - }, - { - "from": "colorize_5", - "from_port": 0, - "to": "switch_0", - "to_port": 2 - }, - { - "from": "Bricks", - "from_port": 1, - "to": "switch_0", - "to_port": 1 - } - ], - "label": "Modular Bricks", - "name": "graph", - "node_position": { - "x": 15, - "y": 56 - }, - "nodes": [ - { - "name": "colorize_5", - "node_position": { - "x": -238.515076, - "y": -62.762329 - }, - "parameters": { - "gradient": { - "interpolation": 1, - "points": [ - { - "a": 1, - "b": 0, - "g": 0, - "pos": 0.027273, - "r": 0 - }, - { - "a": 1, - "b": 1, - "g": 1, - "pos": 0.2, - "r": 1 - } - ], - "type": "Gradient" - } - }, - "type": "colorize" - }, - { - "name": "Bricks", - "node_position": { - "x": -250, - "y": -240 - }, - "parameters": { - "bevel": 0.2, - "columns": 2, - "corner": 0, - "mortar": 0.05, - "pattern": 3, - "repeat": 2, - "round": 0, - "row_offset": 0.5, - "rows": 2 - }, - "type": "bricks" - }, - { - "name": "voronoi_0", - "node_position": { - "x": -248.515076, - "y": -2.762329 - }, - "parameters": { - "intensity": 1, - "randomness": 1, - "scale_x": 8, - "scale_y": 8, - "stretch_x": 1, - "stretch_y": 1 - }, - "type": "voronoi" - }, - { - "name": "switch_0", - "node_position": { - "x": -7.515076, - "y": -126.762329 - }, - "parameters": { - "choices": 2, - "outputs": 2, - "source": 0 - }, - "type": "switch" - }, - { - "name": "gen_parameters", - "node_position": { - "x": -295.330811, - "y": -317.657043 - }, - "parameters": { - "param0": 0 - }, - "type": "remote", - "widgets": [ - { - "configurations": { - "Basket weave": [ - { - "node": "Bricks", - "value": 3, - "widget": "pattern" - }, - { - "node": "Bricks", - "value": 2, - "widget": "repeat" - }, - { - "node": "Bricks", - "value": 2, - "widget": "rows" - }, - { - "node": "Bricks", - "value": 2, - "widget": "columns" - }, - { - "node": "switch_0", - "value": 0, - "widget": "source" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_x" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_y" - } - ], - "Herring bone": [ - { - "node": "Bricks", - "value": 2, - "widget": "pattern" - }, - { - "node": "Bricks", - "value": 2, - "widget": "repeat" - }, - { - "node": "Bricks", - "value": 2, - "widget": "rows" - }, - { - "node": "Bricks", - "value": 2, - "widget": "columns" - }, - { - "node": "switch_0", - "value": 0, - "widget": "source" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_x" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_y" - } - ], - "Running bond 1": [ - { - "node": "Bricks", - "value": 0, - "widget": "pattern" - }, - { - "node": "Bricks", - "value": 1, - "widget": "repeat" - }, - { - "node": "Bricks", - "value": 8, - "widget": "rows" - }, - { - "node": "Bricks", - "value": 4, - "widget": "columns" - }, - { - "node": "switch_0", - "value": 0, - "widget": "source" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_x" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_y" - } - ], - "Running bond 2": [ - { - "node": "Bricks", - "value": 1, - "widget": "pattern" - }, - { - "node": "Bricks", - "value": 1, - "widget": "repeat" - }, - { - "node": "Bricks", - "value": 8, - "widget": "rows" - }, - { - "node": "Bricks", - "value": 4, - "widget": "columns" - }, - { - "node": "switch_0", - "value": 0, - "widget": "source" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_x" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_y" - } - ], - "Spanish bond": [ - { - "node": "Bricks", - "value": 4, - "widget": "pattern" - }, - { - "node": "Bricks", - "value": 3, - "widget": "repeat" - }, - { - "node": "Bricks", - "value": 2, - "widget": "rows" - }, - { - "node": "Bricks", - "value": 2, - "widget": "columns" - }, - { - "node": "switch_0", - "value": 0, - "widget": "source" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_x" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_y" - } - ], - "Uneven": [ - { - "node": "Bricks", - "value": 3, - "widget": "pattern" - }, - { - "node": "Bricks", - "value": 2, - "widget": "repeat" - }, - { - "node": "Bricks", - "value": 2, - "widget": "rows" - }, - { - "node": "Bricks", - "value": 2, - "widget": "columns" - }, - { - "node": "switch_0", - "value": 1, - "widget": "source" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_x" - }, - { - "node": "voronoi_0", - "value": 8, - "widget": "scale_y" - } - ] - }, - "label": "Pattern", - "linked_widgets": [ - { - "node": "Bricks", - "widget": "pattern" - }, - { - "node": "Bricks", - "widget": "repeat" - }, - { - "node": "Bricks", - "widget": "rows" - }, - { - "node": "Bricks", - "widget": "columns" - }, - { - "node": "switch_0", - "widget": "source" - }, - { - "node": "voronoi_0", - "widget": "scale_x" - }, - { - "node": "voronoi_0", - "widget": "scale_y" - } - ], - "name": "param0", - "type": "config_control" - } - ] - }, - { - "name": "gen_outputs", - "node_position": { - "x": 190, - "y": -124 - }, - "parameters": { - - }, - "ports": [ - { - "name": "port0", - "type": "rgba" - }, - { - "name": "port1", - "type": "rgba" - } - ], - "type": "ios" - } - ], - "parameters": { - - }, - "type": "graph" - }, + null, { "name": "normal_map_2", "node_position": { @@ -987,13 +551,10 @@ "y": 281.520294 }, "parameters": { - "amount": 0.5, "param0": 11, "param1": 1.02, "param2": 0, - "param3": 0, - "param4": 0, - "size": 4 + "param4": 0 }, "type": "normal_map" } diff --git a/material_maker/examples/mandala.ptex b/material_maker/examples/mandala.ptex index 36ecd3e..d097a6b 100644 --- a/material_maker/examples/mandala.ptex +++ b/material_maker/examples/mandala.ptex @@ -101,8 +101,8 @@ { "name": "Material", "node_position": { - "x": -465, - "y": 71 + "x": -433, + "y": 1 }, "parameters": { "albedo_color": { @@ -160,8 +160,8 @@ { "name": "colorize_4", "node_position": { - "x": -43.577881, - "y": 5.555542 + "x": -56.577881, + "y": 46.555542 }, "parameters": { "gradient": { @@ -228,17 +228,14 @@ { "name": "normal_map", "node_position": { - "x": -54.577881, - "y": -82.444458 + "x": -47.577881, + "y": -84.444458 }, "parameters": { - "amount": 0.5, "param0": 11, "param1": 0.995, "param2": 0, - "param3": 0, - "param4": 1, - "size": 4 + "param4": 1 }, "type": "normal_map" } @@ -250,18 +247,6 @@ }, { "connections": [ - { - "from": "shape", - "from_port": 0, - "to": "transform", - "to_port": 0 - }, - { - "from": "transform", - "from_port": 0, - "to": "transform_2", - "to_port": 0 - }, { "from": "transform_2", "from_port": 0, @@ -279,50 +264,40 @@ "from_port": 0, "to": "gen_outputs", "to_port": 0 + }, + { + "from": "shape", + "from_port": 0, + "to": "transform_2", + "to_port": 0 } ], "label": "Grid", "name": "graph_2", "node_position": { - "x": -888.524597, - "y": -77 + "x": -927.524597, + "y": 38 }, "nodes": [ { "name": "shape", "node_position": { - "x": -549.5, - "y": -97.5 + "x": -539.5, + "y": 27.5 }, "parameters": { "edge": 1, - "radius": 1, + "radius": 1.2, "shape": 1, "sides": 8 }, "type": "shape" }, - { - "name": "transform", - "node_position": { - "x": -580.5, - "y": 118.5 - }, - "parameters": { - "repeat": false, - "rotate": 0, - "scale_x": 1.2, - "scale_y": 1.2, - "translate_x": 0, - "translate_y": 0 - }, - "type": "transform" - }, { "name": "transform_2", "node_position": { - "x": -579.5, - "y": 312 + "x": -581.5, + "y": 153 }, "parameters": { "repeat": true, @@ -418,8 +393,8 @@ { "name": "gen_outputs", "node_position": { - "x": -55.5, - "y": 225 + "x": -56.5, + "y": 223 }, "parameters": { @@ -436,6 +411,7 @@ "parameters": { }, + "seed_value": -27638, "type": "graph" }, { @@ -462,15 +438,15 @@ "label": "Frame", "name": "graph_3", "node_position": { - "x": -919.184326, - "y": 75.568512 + "x": -928.184326, + "y": 93.568512 }, "nodes": [ { "name": "colorize_4", "node_position": { - "x": -558.307007, - "y": 443.205566 + "x": -559.307007, + "y": 442.205566 }, "parameters": { "gradient": { @@ -543,7 +519,7 @@ { "name": "pattern", "node_position": { - "x": -580.623047, + "x": -581.623047, "y": 274.5 }, "parameters": { @@ -558,8 +534,8 @@ { "name": "gen_outputs", "node_position": { - "x": -258.307007, - "y": 364.568512 + "x": -314.307007, + "y": 448.568512 }, "parameters": { @@ -576,13 +552,14 @@ "parameters": { }, + "seed_value": -53251, "type": "graph" }, { "name": "transform", "node_position": { - "x": -1138.172852, - "y": 24.856049 + "x": -1258.172852, + "y": -68.143951 }, "parameters": { "repeat": true, @@ -597,8 +574,8 @@ { "name": "colorize", "node_position": { - "x": -1127.944092, - "y": 216.956055 + "x": -1232.944092, + "y": 121.956055 }, "parameters": { "gradient": { @@ -642,8 +619,8 @@ "label": "Flower1", "name": "graph_5", "node_position": { - "x": -1105.223755, - "y": -43.758514 + "x": -1216.223755, + "y": -332.758514 }, "nodes": [ { @@ -731,8 +708,8 @@ { "name": "shape", "node_position": { - "x": -580.281982, - "y": 291.324799 + "x": -583.281982, + "y": 248.324799 }, "parameters": { "edge": 1, @@ -746,7 +723,7 @@ "name": "pattern", "node_position": { "x": -646.281982, - "y": 452.324799 + "y": 447.324799 }, "parameters": { "mix": 0, @@ -804,8 +781,8 @@ { "name": "transform", "node_position": { - "x": -630.912109, - "y": 611.324829 + "x": -633.912109, + "y": 619.324829 }, "parameters": { "repeat": false, @@ -820,8 +797,8 @@ { "name": "gen_outputs", "node_position": { - "x": 113.718018, - "y": 533.074829 + "x": 146.718018, + "y": 576.074829 }, "parameters": { @@ -837,8 +814,8 @@ { "name": "colorize_2", "node_position": { - "x": -599.834045, - "y": 394.574799 + "x": -604.834045, + "y": 380.574799 }, "parameters": { "gradient": { @@ -874,8 +851,8 @@ { "name": "blend", "node_position": { - "x": -142.870667, - "y": 465.158081 + "x": -106.870667, + "y": 476.158081 }, "parameters": { "amount": 1, @@ -886,8 +863,8 @@ { "name": "colorize_3", "node_position": { - "x": -346.870667, - "y": 413.158081 + "x": -352.870667, + "y": 451.158081 }, "parameters": { "gradient": { @@ -916,8 +893,8 @@ { "name": "pattern_2", "node_position": { - "x": -364.870667, - "y": 744.158081 + "x": -368.870667, + "y": 749.158081 }, "parameters": { "mix": 0, @@ -968,8 +945,8 @@ { "name": "blend_2", "node_position": { - "x": -141.870667, - "y": 561.158081 + "x": -106.870667, + "y": 576.158081 }, "parameters": { "amount": 1, @@ -980,8 +957,8 @@ { "name": "mirror", "node_position": { - "x": -316.870667, - "y": 611.158081 + "x": -315.870667, + "y": 605.158081 }, "parameters": { "direction": 1, @@ -1089,12 +1066,12 @@ { "name": "shape", "node_position": { - "x": -604.145874, - "y": 279.741486 + "x": -607.145874, + "y": 269.741486 }, "parameters": { "edge": 1, - "radius": 0.264981, + "radius": 0.3, "shape": 0, "sides": 6 }, @@ -1166,7 +1143,7 @@ }, "parameters": { "param0": 7, - "param1": 0.264981 + "param1": 0.3 }, "type": "remote", "widgets": [ @@ -1236,7 +1213,6 @@ }, "parameters": { "count": 7, - "direction": 0, "offset": 0 }, "type": "kaleidoscope" @@ -1244,7 +1220,7 @@ ], "parameters": { "param0": 7, - "param1": 0.264981 + "param1": 0.3 }, "type": "graph" } @@ -1252,13 +1228,14 @@ "parameters": { }, + "seed_value": 53876, "type": "graph" }, { "name": "transform_2", "node_position": { - "x": -1063.855835, - "y": 370.619873 + "x": -1083.855835, + "y": 514.619873 }, "parameters": { "repeat": false, @@ -1273,8 +1250,8 @@ { "name": "transform_2_2", "node_position": { - "x": -832.475098, - "y": 370.055542 + "x": -1083.475098, + "y": 325.055542 }, "parameters": { "repeat": true, @@ -1304,8 +1281,8 @@ "label": "Flower2", "name": "graph_7", "node_position": { - "x": -952.17395, - "y": 292.142639 + "x": -1032.17395, + "y": 704.142639 }, "nodes": [ { @@ -1393,8 +1370,8 @@ { "name": "shape", "node_position": { - "x": -552.281982, - "y": 258.324799 + "x": -554.281982, + "y": 225.324799 }, "parameters": { "edge": 1, @@ -1422,8 +1399,8 @@ { "name": "colorize", "node_position": { - "x": -575.912109, - "y": 518.324829 + "x": -577.912109, + "y": 523.324829 }, "parameters": { "gradient": { @@ -1473,8 +1450,8 @@ { "name": "transform", "node_position": { - "x": -602.912109, - "y": 578.324829 + "x": -605.912109, + "y": 590.324829 }, "parameters": { "repeat": false, @@ -1506,8 +1483,8 @@ { "name": "colorize_2", "node_position": { - "x": -571.834045, - "y": 361.574799 + "x": -572.834045, + "y": 352.574799 }, "parameters": { "gradient": { @@ -1637,8 +1614,8 @@ { "name": "blend_2", "node_position": { - "x": -117.870667, - "y": 536.158081 + "x": -118.870667, + "y": 546.158081 }, "parameters": { "amount": 1, @@ -1725,8 +1702,8 @@ { "name": "transform_2", "node_position": { - "x": -651.912109, - "y": 396.324829 + "x": -650.912109, + "y": 409.324829 }, "parameters": { "repeat": false, @@ -1883,12 +1860,11 @@ { "name": "kaleidoscope", "node_position": { - "x": -612.808228, - "y": 591.706787 + "x": -611.808228, + "y": 604.706787 }, "parameters": { "count": 4, - "direction": 0, "offset": 0 }, "type": "kaleidoscope" @@ -1903,8 +1879,8 @@ { "name": "gen_outputs", "node_position": { - "x": -177.034424, - "y": 596.142639 + "x": -181.034424, + "y": 593.142639 }, "parameters": { @@ -1921,6 +1897,7 @@ "parameters": { }, + "seed_value": -30264, "type": "graph" }, { @@ -1991,7 +1968,7 @@ "name": "blend", "node_position": { "x": 14.376953, - "y": 246.5 + "y": 232.5 }, "parameters": { "amount": 1, @@ -2002,8 +1979,8 @@ { "name": "blend_3", "node_position": { - "x": 14.710419, - "y": 426.119873 + "x": 13.710419, + "y": 441.119873 }, "parameters": { "amount": 1, @@ -2061,13 +2038,14 @@ "parameters": { }, + "seed_value": -31817, "type": "graph" }, { "name": "colorize_2", "node_position": { - "x": -819.609863, - "y": 296.695862 + "x": -1057.609863, + "y": 261.695862 }, "parameters": { "gradient": { @@ -2096,8 +2074,8 @@ { "name": "perlin", "node_position": { - "x": -730.287415, - "y": -51.888901 + "x": -743.287415, + "y": -212.888901 }, "parameters": { "iterations": 7, @@ -2110,8 +2088,8 @@ { "name": "colorize_3", "node_position": { - "x": -494.287415, - "y": -28.888901 + "x": -714.287415, + "y": -86.888901 }, "parameters": { "gradient": { @@ -2140,8 +2118,8 @@ { "name": "transform_3", "node_position": { - "x": -1369.070557, - "y": 25.255157 + "x": -1256.070557, + "y": -258.744843 }, "parameters": { "repeat": false, diff --git a/material_maker/examples/pile_of_bricks.ptex b/material_maker/examples/pile_of_bricks.ptex index d28e5eb..521c969 100644 --- a/material_maker/examples/pile_of_bricks.ptex +++ b/material_maker/examples/pile_of_bricks.ptex @@ -169,7 +169,7 @@ "name": "uniform", "node_position": { "x": 467.5, - "y": 84 + "y": 78 }, "parameters": { "color": { @@ -189,14 +189,9 @@ "y": -156 }, "parameters": { - "a": 0, "r": 0.3, "rx": 6, - "ry": 6, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 + "ry": 6 }, "type": "sdf3d_repeat" }, @@ -207,28 +202,18 @@ "y": 72 }, "parameters": { - "a": 0, - "s": 0.25, - "x": 0.35, - "y": 0, - "z": 0 + "s": 0.25 }, "type": "sdf3d_scale" }, { "name": "sdf3d_boolean_3", "node_position": { - "x": -16.214783, - "y": -56 + "x": -6.214783, + "y": -55 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 0, - "r": 0.3, - "w": 0.28 + "op": 0 }, "type": "sdf3d_boolean" }, @@ -332,13 +317,7 @@ "y": -118 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 1, - "r": 0.3, - "w": 0.28 + "op": 1 }, "type": "sdf3d_boolean" }, @@ -362,13 +341,7 @@ "y": -168.333344 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 1, - "r": 0.3, - "w": 0.28 + "op": 1 }, "type": "sdf3d_boolean" }, @@ -430,14 +403,9 @@ "y": -52.060181 }, "parameters": { - "a": 0, "r": 0.3, "rx": 6, - "ry": 6, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 + "ry": 6 }, "type": "sdf3d_repeat" }, @@ -461,14 +429,9 @@ "y": 259.034729 }, "parameters": { - "a": 0, "r": 0.3, "rx": 6, - "ry": 6, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 + "ry": 6 }, "type": "sdf3d_repeat" }, @@ -479,14 +442,9 @@ "y": 155.09491 }, "parameters": { - "a": 0, "r": 0.3, "rx": 6, - "ry": 6, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 + "ry": 6 }, "type": "sdf3d_repeat" }, @@ -510,30 +468,18 @@ "y": 251.09491 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 0, - "r": 0.3, - "w": 0.28 + "op": 0 }, "type": "sdf3d_boolean" }, { "name": "sdf3d_boolean_3_3", "node_position": { - "x": 183.957428, - "y": 120.689819 + "x": 195.957428, + "y": 116.689819 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 0, - "r": 0.3, - "w": 0.28 + "op": 0 }, "type": "sdf3d_boolean" }, @@ -553,8 +499,8 @@ { "name": "sdf3d_translate_3_2_3", "node_position": { - "x": -19.542572, - "y": 10.189819 + "x": -26.542572, + "y": 18.189819 }, "parameters": { "x": 0.04, @@ -566,8 +512,8 @@ { "name": "raymarching", "node_position": { - "x": 187.457397, - "y": 303.189819 + "x": 184.457397, + "y": 297.189819 }, "parameters": { @@ -575,17 +521,321 @@ "type": "raymarching" }, { + "connections": [ + { + "from": "buffer", + "from_port": 0, + "to": "blurx_convolution", + "to_port": 0 + }, + { + "from": "buffer_2", + "from_port": 0, + "to": "blurx_convolution_2", + "to_port": 0 + }, + { + "from": "gen_inputs", + "from_port": 0, + "to": "buffer", + "to_port": 0 + }, + { + "from": "blend", + "from_port": 0, + "to": "colorize", + "to_port": 0 + }, + { + "from": "blurx_convolution", + "from_port": 0, + "to": "buffer_2", + "to_port": 0 + }, + { + "from": "blurx_convolution_2", + "from_port": 0, + "to": "blend", + "to_port": 1 + }, + { + "from": "buffer", + "from_port": 0, + "to": "blend", + "to_port": 0 + }, + { + "from": "colorize", + "from_port": 0, + "to": "_2", + "to_port": 0 + }, + { + "from": "_2", + "from_port": 0, + "to": "gen_outputs", + "to_port": 0 + } + ], + "label": "Occlusion", "name": "occlusion", "node_position": { "x": 410.234558, - "y": 303.189819 + "y": 289.189819 }, + "nodes": [ + { + "convolution_params": { + "input_type": "rgba", + "matrix_function": "exp(-0.5*(pow(x/sigma, 2.0)))/(6.28318530718 *sigma*sigma)", + "normalized": true, + "output_type": "rgba", + "parameters": [ + { + "max": 50, + "min": 0.05, + "name": "sigma", + "type": "float" + } + ], + "x": 50, + "y": 0 + }, + "name": "blurx_convolution", + "node_position": { + "x": -407.5, + "y": -192.5 + }, + "parameters": { + "sigma": 50, + "size": 9 + }, + "type": "convolution" + }, + { + "name": "buffer_2", + "node_position": { + "x": -404.875, + "y": -116.625 + }, + "parameters": { + "lod": 0, + "size": 9 + }, + "type": "buffer" + }, + { + "convolution_params": { + "input_type": "rgba", + "matrix_function": "exp(-0.5*(pow(y/sigma, 2.0)))/(6.28318530718 *sigma*sigma)", + "normalized": true, + "output_type": "rgba", + "parameters": [ + { + "max": 50, + "min": 0.05, + "name": "sigma", + "type": "float" + } + ], + "x": 0, + "y": 50 + }, + "name": "blurx_convolution_2", + "node_position": { + "x": -407.125, + "y": -44.375 + }, + "parameters": { + "sigma": 50, + "size": 9 + }, + "type": "convolution" + }, + { + "name": "buffer", + "node_position": { + "x": -408.25, + "y": -265.75 + }, + "parameters": { + "lod": 0, + "size": 9 + }, + "type": "buffer" + }, + { + "name": "gen_parameters", + "node_position": { + "x": -447.666626, + "y": -370.666656 + }, + "parameters": { + "param0": 9, + "param2": 5.2 + }, + "type": "remote", + "widgets": [ + { + "label": "Grid size:", + "linked_widgets": [ + { + "node": "buffer", + "widget": "size" + }, + { + "node": "blurx_convolution", + "widget": "size" + }, + { + "node": "buffer_2", + "widget": "size" + }, + { + "node": "blurx_convolution_2", + "widget": "size" + } + ], + "name": "param0", + "type": "linked_control" + }, + { + "label": "Strength", + "linked_widgets": [ + { + "node": "_2", + "widget": "g" + } + ], + "name": "param2", + "type": "linked_control" + } + ] + }, + { + "name": "gen_inputs", + "node_position": { + "x": -585.666626, + "y": -112.392853 + }, + "parameters": { + + }, + "ports": [ + { + "name": "port0", + "type": "rgba" + } + ], + "type": "ios" + }, + { + "name": "gen_outputs", + "node_position": { + "x": 55.547607, + "y": -133.392853 + }, + "parameters": { + + }, + "ports": [ + { + "name": "port0", + "type": "rgba" + } + ], + "type": "ios" + }, + { + "name": "blend", + "node_position": { + "x": -420.79895, + "y": 27.16272 + }, + "parameters": { + "amount": 1, + "blend_type": 11 + }, + "type": "blend" + }, + { + "name": "colorize", + "node_position": { + "x": -167.79895, + "y": -178.83728 + }, + "parameters": { + "gradient": { + "interpolation": 1, + "points": [ + { + "a": 1, + "b": 1, + "g": 1, + "pos": 0, + "r": 1 + }, + { + "a": 1, + "b": 0, + "g": 0, + "pos": 1, + "r": 0 + } + ], + "type": "Gradient" + } + }, + "type": "colorize" + }, + { + "name": "_2", + "node_position": { + "x": -134.403687, + "y": -110.29187 + }, + "parameters": { + "g": 5.2 + }, + "shader_model": { + "code": "", + "global": "", + "inputs": [ + { + "default": "0.0", + "label": "", + "name": "in", + "type": "f" + } + ], + "instance": "", + "name": "", + "outputs": [ + { + "f": "pow($in($uv), $g)", + "type": "f" + } + ], + "parameters": [ + { + "default": 1, + "label": "", + "max": 2, + "min": 0, + "name": "g", + "step": 0.1, + "type": "float" + } + ] + }, + "type": "shader" + } + ], "parameters": { "param0": 9, - "param1": 50, "param2": 5.2 }, - "type": "occlusion" + "type": "graph" }, { "name": "colorize", diff --git a/material_maker/examples/skulls.ptex b/material_maker/examples/skulls.ptex index 424f826..21fd35c 100644 --- a/material_maker/examples/skulls.ptex +++ b/material_maker/examples/skulls.ptex @@ -30,36 +30,6 @@ "to": "Material", "to_port": 5 }, - { - "from": "sdf3d_scale", - "from_port": 0, - "to": "sdf3d_scale_2", - "to_port": 0 - }, - { - "from": "sdf3d_scale_2", - "from_port": 0, - "to": "sdf3d_boolean_2", - "to_port": 0 - }, - { - "from": "sdf3d_translate_4", - "from_port": 0, - "to": "sdf3d_boolean_2", - "to_port": 1 - }, - { - "from": "sdf3d_scale", - "from_port": 0, - "to": "sdf3d_repeat", - "to_port": 0 - }, - { - "from": "sdf3d_repeat", - "from_port": 0, - "to": "sdf3d_translate_4", - "to_port": 0 - }, { "from": "perlin", "from_port": 0, @@ -85,59 +55,11 @@ "to_port": 0 }, { - "from": "graph_2", - "from_port": 0, - "to": "sdf3d_scale_3", - "to_port": 0 - }, - { - "from": "sdf3d_scale_3", - "from_port": 0, - "to": "sdf3d_repeat_2", - "to_port": 0 - }, - { - "from": "sdf3d_boolean_2", + "from": "graph", "from_port": 0, "to": "sdf3d_boolean_2_2", "to_port": 0 }, - { - "from": "sdf3d_repeat_2", - "from_port": 0, - "to": "sdf3d_translate_4_2", - "to_port": 0 - }, - { - "from": "sdf3d_translate_4_2", - "from_port": 0, - "to": "sdf3d_boolean_2_2", - "to_port": 1 - }, - { - "from": "sdf3d_repeat_2_2", - "from_port": 0, - "to": "sdf3d_translate_4_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_scale_3", - "from_port": 0, - "to": "sdf3d_repeat_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_boolean_2_2", - "from_port": 0, - "to": "sdf3d_boolean_2_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_translate_4_2_2", - "from_port": 0, - "to": "sdf3d_boolean_2_2_2", - "to_port": 1 - }, { "from": "blend_2", "from_port": 0, @@ -162,12 +84,6 @@ "to": "blend_2", "to_port": 2 }, - { - "from": "graph_3", - "from_port": 0, - "to": "sdf3d_scale", - "to_port": 0 - }, { "from": "buffer", "from_port": 0, @@ -216,12 +132,6 @@ "to": "blend", "to_port": 2 }, - { - "from": "sdf3d_boolean_2_2_2", - "from_port": 0, - "to": "raymarching", - "to_port": 0 - }, { "from": "raymarching", "from_port": 0, @@ -233,6 +143,18 @@ "from_port": 1, "to": "blend_2", "to_port": 0 + }, + { + "from": "graph_3", + "from_port": 0, + "to": "sdf3d_boolean_2_2", + "to_port": 1 + }, + { + "from": "sdf3d_boolean_2_2", + "from_port": 0, + "to": "raymarching", + "to_port": 0 } ], "label": "Graph", @@ -245,8 +167,8 @@ { "name": "Material", "node_position": { - "x": 390, - "y": 1354 + "x": 356, + "y": 1343 }, "parameters": { "albedo_color": { @@ -270,8 +192,8 @@ { "name": "perlin", "node_position": { - "x": -385.399658, - "y": 1196.349854 + "x": -404.399658, + "y": 1199.349854 }, "parameters": { "iterations": 5, @@ -284,8 +206,8 @@ { "name": "colorize", "node_position": { - "x": -347.399658, - "y": 1342.349976 + "x": -371.399658, + "y": 1324.349976 }, "parameters": { "gradient": { @@ -314,8 +236,8 @@ { "name": "colorize_2", "node_position": { - "x": -126.553131, - "y": 1179.272949 + "x": -120, + "y": 1180 }, "parameters": { "gradient": { @@ -344,8 +266,8 @@ { "name": "uniform_greyscale", "node_position": { - "x": 138.446899, - "y": 1239.272949 + "x": 122.446899, + "y": 1231.272949 }, "parameters": { "color": 0.31 @@ -355,8 +277,8 @@ { "name": "colorize_3", "node_position": { - "x": 38.446899, - "y": 1686.272949 + "x": 45.446899, + "y": 1704.272949 }, "parameters": { "gradient": { @@ -382,154 +304,23 @@ }, "type": "colorize" }, - { - "name": "sdf3d_scale", - "node_position": { - "x": -994.911377, - "y": 1248.772949 - }, - "parameters": { - "a": 0, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 - }, - "type": "sdf3d_scale" - }, - { - "name": "sdf3d_scale_2", - "node_position": { - "x": -811.183411, - "y": 1198.851807 - }, - "parameters": { - "a": 0, - "r": 0.25, - "rx": 4, - "ry": 4, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 - }, - "shader_model": { - "code": "", - "global": "vec3 repeat(vec3 p, vec3 r, float seed, float randomness) {\n\tvec3 a = (rand3(floor(mod((p.xy+0.5*r.xy)/r.xy, 1.0/r.xy)+vec2(seed)))-0.5)*6.28*randomness;\n\tp = mod(p+0.5*r,r)-0.5*r;\n\tvec3 rv;\n\tfloat c;\n\tfloat s;\n\tc = cos(a.x);\n\ts = sin(a.x);\n\trv.x = p.x;\n\trv.y = p.y*c+p.z*s;\n\trv.z = -p.y*s+p.z*c;\n\tc = cos(a.y);\n\ts = sin(a.y);\n\tp.x = rv.x*c+rv.z*s;\n\tp.y = rv.y;\n\tp.z = -rv.x*s+rv.z*c;\n\tc = cos(a.z);\n\ts = sin(a.z);\n\trv.x = p.x*c+p.y*s;\n\trv.y = -p.x*s+p.y*c;\n\trv.z = p.z;\n\treturn rv;\n}\n", - "inputs": [ - { - "default": "0.0", - "label": "", - "name": "in", - "type": "sdf3d" - } - ], - "instance": "", - "name": "Repeat", - "outputs": [ - { - "sdf3d": "$in(repeat($uv, vec3(1.0/$rx, 1.0/$ry, 0.0), $seed, $r))", - "type": "sdf3d" - } - ], - "parameters": [ - { - "default": 4, - "label": "X", - "max": 32, - "min": 1, - "name": "rx", - "step": 1, - "type": "float" - }, - { - "default": 4, - "label": "Y", - "max": 32, - "min": 1, - "name": "ry", - "step": 1, - "type": "float" - }, - { - "default": 0.5, - "label": "R", - "max": 1, - "min": 0, - "name": "r", - "step": 0.01, - "type": "float" - } - ] - }, - "type": "shader" - }, { "name": "occlusion", "node_position": { - "x": 12.088623, - "y": 1608.272949 + "x": 19.088623, + "y": 1626.272949 }, "parameters": { "param0": 10, - "param1": 50, "param2": 15 }, "type": "occlusion" }, - { - "name": "sdf3d_translate_4", - "node_position": { - "x": -813.195313, - "y": 1400.797363 - }, - "parameters": { - "x": 0.4, - "y": 0.35, - "z": 0 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_boolean_2", - "node_position": { - "x": -622.79303, - "y": 1304.297363 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 0, - "r": 0.3, - "w": 0.28 - }, - "type": "sdf3d_boolean" - }, - { - "name": "sdf3d_repeat", - "node_position": { - "x": -812.79303, - "y": 1300.297363 - }, - "parameters": { - "a": 0, - "r": 0.25, - "rx": 4, - "ry": 4, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 - }, - "type": "sdf3d_repeat" - }, { "name": "colorize_4", "node_position": { - "x": -128.79303, - "y": 1246.013184 + "x": -120, + "y": 1246 }, "parameters": { "gradient": { @@ -558,8 +349,8 @@ { "name": "colorize_5", "node_position": { - "x": -147.127869, - "y": 1324.013184 + "x": -120.127869, + "y": 1312.013184 }, "parameters": { "gradient": { @@ -588,8 +379,8 @@ { "name": "blend", "node_position": { - "x": 126.872131, - "y": 1141.013184 + "x": 117.872131, + "y": 1129.013184 }, "parameters": { "amount": 0.5, @@ -597,464 +388,14 @@ }, "type": "blend" }, - { - "name": "sdf3d_repeat_2", - "node_position": { - "x": -931.880676, - "y": 1576.431152 - }, - "parameters": { - "a": 0, - "r": 0.46, - "rx": 4, - "ry": 4, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 - }, - "type": "sdf3d_repeat" - }, - { - "connections": [ - { - "from": "sdf3d_sphere_2", - "from_port": 0, - "to": "sdf3d_translate_4_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_sphere_2_2", - "from_port": 0, - "to": "sdf3d_translate_4_2", - "to_port": 0 - }, - { - "from": "sdf3d_translate_4_2_2", - "from_port": 0, - "to": "sdf3d_smoothboolean_3", - "to_port": 0 - }, - { - "from": "sdf3d_translate_4_2", - "from_port": 0, - "to": "sdf3d_smoothboolean_3", - "to_port": 1 - }, - { - "from": "sdf3d_smoothboolean_3", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2", - "to_port": 0 - }, - { - "from": "sdf3d_sphere_2_2_2", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2", - "to_port": 1 - }, - { - "from": "sdf3d_sphere_2_2_3", - "from_port": 0, - "to": "sdf3d_translate_4_2_3", - "to_port": 0 - }, - { - "from": "sdf3d_smoothboolean_3_2", - "from_port": 0, - "to": "sdf3d_boolean_2_2", - "to_port": 1 - }, - { - "from": "sdf3d_translate_4_2_3", - "from_port": 0, - "to": "sdf3d_boolean_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_boolean_2_2", - "from_port": 0, - "to": "gen_outputs", - "to_port": 0 - } - ], - "label": "Bone", - "name": "graph_2", - "node_position": { - "x": -1109.480713, - "y": 1577.556274 - }, - "nodes": [ - { - "name": "sdf3d_translate_4_2_2", - "node_position": { - "x": -935.880676, - "y": 1383.431152 - }, - "parameters": { - "x": -0.03, - "y": -0.22, - "z": 0 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_sphere_2", - "node_position": { - "x": -930.880676, - "y": 1327.931152 - }, - "parameters": { - "r": 0.03 - }, - "type": "sdf3d_sphere" - }, - { - "name": "sdf3d_sphere_2_2_2", - "node_position": { - "x": -937.880676, - "y": 1638.431152 - }, - "parameters": { - "h": 0.4, - "r": 0.025 - }, - "shader_model": { - "code": "vec3 $(name_uv)_p = $uv;\n$(name_uv)_p.y -= clamp($(name_uv)_p.y, -0.5*$h, 0.5*$h);\n", - "global": "", - "inputs": [ - - ], - "instance": "", - "name": "Sphere", - "outputs": [ - { - "sdf3d": "length($(name_uv)_p)-$r", - "type": "sdf3d" - } - ], - "parameters": [ - { - "default": 0.5, - "label": "H", - "max": 1, - "min": 0, - "name": "h", - "step": 0.01, - "type": "float" - }, - { - "default": 0.1, - "label": "R", - "max": 0.5, - "min": 0, - "name": "r", - "step": 0.01, - "type": "float" - } - ] - }, - "type": "shader" - }, - { - "name": "sdf3d_smoothboolean_3_2", - "node_position": { - "x": -744.380676, - "y": 1604.931152 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.02, - "op": 0, - "r": 0.3, - "w": 0.28 - }, - "type": "sdf3d_smoothboolean" - }, - { - "name": "sdf3d_smoothboolean_3", - "node_position": { - "x": -744.880676, - "y": 1527.931152 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.01, - "op": 0, - "r": 0.3, - "w": 0.28 - }, - "shader_model": { - "code": "", - "global": "float sdf3SmoothUnion(float d1, float d2, float k) {\n float h = clamp(0.5+0.5*(d2-d1)/k, 0.0, 1.0);\n return mix(d2, d1, h)-k*h*(1.0-h);\n}\n\nfloat sdf3SmoothSubtraction( float d1, float d2, float k ) {\n float h = clamp(0.5-0.5*(d2+d1)/k, 0.0, 1.0);\n return mix( d2, -d1, h )+k*h*(1.0-h);\n}\n\nfloat sdf3SmoothIntersection( float d1, float d2, float k ) {\n float h = clamp(0.5-0.5*(d2-d1)/k, 0.0, 1.0);\n return mix(d2, d1, h)+k*h*(1.0-h);\n}\n", - "inputs": [ - { - "default": "0.0", - "label": "", - "name": "in1", - "type": "sdf3d" - }, - { - "default": "0.0", - "label": "", - "name": "in2", - "type": "sdf3d" - } - ], - "instance": "", - "name": "sdSmoothBoolean", - "outputs": [ - { - "sdf3d": "sdf3Smooth$op($in1($uv), $in2($uv), $k)", - "type": "sdf3d" - } - ], - "parameters": [ - { - "default": 0, - "label": "", - "name": "op", - "type": "enum", - "values": [ - { - "name": "Union", - "value": "Union" - }, - { - "name": "Subtraction", - "value": "Subtraction" - }, - { - "name": "Intersection", - "value": "Intersection" - } - ] - }, - { - "default": 0, - "label": "", - "max": 1, - "min": 0, - "name": "k", - "step": 0.01, - "type": "float" - } - ] - }, - "type": "shader" - }, - { - "name": "sdf3d_sphere_2_2", - "node_position": { - "x": -929.880676, - "y": 1483.431152 - }, - "parameters": { - "r": 0.04 - }, - "type": "sdf3d_sphere" - }, - { - "name": "sdf3d_translate_4_2", - "node_position": { - "x": -934.880676, - "y": 1534.431152 - }, - "parameters": { - "x": 0.02, - "y": -0.25, - "z": 0 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_translate_4_2_3", - "node_position": { - "x": -936.380676, - "y": 1792.181152 - }, - "parameters": { - "x": -0.04, - "y": 0.21, - "z": 0 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_sphere_2_2_3", - "node_position": { - "x": -931.380676, - "y": 1741.181152 - }, - "parameters": { - "r": 0.06 - }, - "type": "sdf3d_sphere" - }, - { - "name": "sdf3d_boolean_2_2", - "node_position": { - "x": -747.380676, - "y": 1680.681152 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 1, - "r": 0.3, - "w": 0.28 - }, - "type": "sdf3d_boolean" - }, - { - "name": "gen_inputs", - "node_position": { - "x": -1237.880615, - "y": 1568.556274 - }, - "parameters": { - - }, - "ports": [ - - ], - "type": "ios" - }, - { - "name": "gen_outputs", - "node_position": { - "x": -447.380676, - "y": 1568.556274 - }, - "parameters": { - - }, - "ports": [ - { - "name": "port0", - "type": "sdf3d" - } - ], - "type": "ios" - }, - { - "name": "gen_parameters", - "node_position": { - "x": -1079.480713, - "y": 1027.931152 - }, - "parameters": { - - }, - "type": "remote", - "widgets": [ - - ] - } - ], - "parameters": { - - }, - "type": "graph" - }, - { - "name": "sdf3d_scale_3", - "node_position": { - "x": -1130.764893, - "y": 1621.628418 - }, - "parameters": { - "a": 0, - "s": 0.4, - "x": 0.35, - "y": 0, - "z": 0 - }, - "type": "sdf3d_scale" - }, { "name": "sdf3d_boolean_2_2", "node_position": { - "x": -546.264893, - "y": 1515.128418 + "x": -716.264893, + "y": 1477.128418 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 0, - "r": 0.3, - "w": 0.28 - }, - "type": "sdf3d_boolean" - }, - { - "name": "sdf3d_translate_4_2", - "node_position": { - "x": -753.844666, - "y": 1576.628418 - }, - "parameters": { - "x": 0.35, - "y": 0.52, - "z": 0.02 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_repeat_2_2", - "node_position": { - "x": -936.362671, - "y": 1681.529785 - }, - "parameters": { - "a": 0, - "r": 0.5, - "rx": 4, - "ry": 4, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 - }, - "type": "sdf3d_repeat" - }, - { - "name": "sdf3d_translate_4_2_2", - "node_position": { - "x": -753.32666, - "y": 1681.727051 - }, - "parameters": { - "x": 0.51, - "y": 0.38, - "z": 0.02 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_boolean_2_2_2", - "node_position": { - "x": -546.344666, - "y": 1580.128418 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 0, - "r": 0.3, - "w": 0.28 + "op": 0 }, "type": "sdf3d_boolean" }, @@ -1065,21 +406,18 @@ "y": 1392.238892 }, "parameters": { - "amount": 0.5, "param0": 11, "param1": 1.02, "param2": 0, - "param3": 0, - "param4": 1, - "size": 4 + "param4": 1 }, "type": "normal_map" }, { "name": "blend_2", "node_position": { - "x": 23.85556, - "y": 1485.238892 + "x": 30.85556, + "y": 1522.238892 }, "parameters": { "amount": 1, @@ -1117,481 +455,884 @@ }, "type": "colorize" }, + { + "name": "buffer", + "node_position": { + "x": -382.830994, + "y": 1550.222534 + }, + "parameters": { + "lod": 0, + "size": 11 + }, + "type": "buffer" + }, + { + "name": "blend_3", + "node_position": { + "x": 116.334427, + "y": 1285.834595 + }, + "parameters": { + "amount": 1, + "blend_type": 3 + }, + "type": "blend" + }, + { + "name": "raymarching", + "node_position": { + "x": -563.992065, + "y": 1480.176514 + }, + "parameters": { + + }, + "type": "raymarching" + }, { "connections": [ { - "from": "sdf3d_sphere_2", + "from": "sdf3d_scale", "from_port": 0, - "to": "sdf3d_translate_4", + "to": "sdf3d_scale_2", "to_port": 0 }, { - "from": "sdf3d_translate_4_2", + "from": "sdf3d_scale_2", "from_port": 0, - "to": "sdf3d_smoothboolean_3", + "to": "sdf3d_boolean_2", + "to_port": 0 + }, + { + "from": "sdf3d_translate_4", + "from_port": 0, + "to": "sdf3d_boolean_2", "to_port": 1 }, { "from": "sdf3d_scale", "from_port": 0, - "to": "sdf3d_translate_4_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_smoothboolean_3", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2", - "to_port": 1 - }, - { - "from": "sdf3d_translate_4_2_2", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2", - "to_port": 0 - }, - { - "from": "sdf3d_sphere_2_2", - "from_port": 0, - "to": "sdf3d_translate_4_3", - "to_port": 0 - }, - { - "from": "sdf3d_translate_4_3", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_smoothboolean_3_2", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2_2", - "to_port": 1 - }, - { - "from": "sdf3d_sphere_2_2_2", - "from_port": 0, - "to": "sdf3d_translate_4_3_2", - "to_port": 0 - }, - { - "from": "sdf3d_smoothboolean_3_2_2", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2_3", - "to_port": 1 - }, - { - "from": "sdf3d_translate_4_3_2", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2_3", - "to_port": 0 - }, - { - "from": "sdf3d_smoothboolean_3_2_3", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2_3_2", - "to_port": 1 - }, - { - "from": "sdf3d_box_2", - "from_port": 0, - "to": "sdf3d_rotate_2", - "to_port": 0 - }, - { - "from": "sdf3d_rotate_2", - "from_port": 0, - "to": "sdf3d_translate_4_3_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_translate_4_3_2_2", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2_3_2", - "to_port": 0 - }, - { - "from": "sdf3d_translate_4_3_2_2_2", - "from_port": 0, "to": "sdf3d_repeat", "to_port": 0 }, - { - "from": "sdf3d_rotate_2_2_2", - "from_port": 0, - "to": "sdf3d_translate_4_3_2_2_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_cylinder", - "from_port": 0, - "to": "sdf3d_translate_4_2", - "to_port": 0 - }, - { - "from": "sdf3d_cylinder", - "from_port": 0, - "to": "sdf3d_scale", - "to_port": 0 - }, - { - "from": "sdf3d_smoothboolean_3_3", - "from_port": 0, - "to": "sdf3d_smoothboolean_3", - "to_port": 0 - }, - { - "from": "sdf3d_sphere_2", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_3", - "to_port": 1 - }, - { - "from": "sdf3d_translate_4", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_3", - "to_port": 0 - }, - { - "from": "sdf3d_box_2_2", - "from_port": 0, - "to": "sdf3d_rotate_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_box_2_2", - "from_port": 0, - "to": "sdf3d_translate_4_3_2_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_smoothboolean_3_2_3_2", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2_3_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_smoothboolean_3_2_3_2_2", - "from_port": 0, - "to": "sdf3d_translate_4_3_3", - "to_port": 0 - }, - { - "from": "sdf3d_sphere_2_3", - "from_port": 0, - "to": "sdf3d_translate_4_3_2_2_2_3", - "to_port": 0 - }, - { - "from": "sdf3d_translate_4_3_2_2_2_3", - "from_port": 0, - "to": "sdf3d_boolean", - "to_port": 0 - }, - { - "from": "sdf3d_boolean", - "from_port": 0, - "to": "sdf3d_rotate_2_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_translate_4_3_2_2_2_2", - "from_port": 0, - "to": "sdroundedshape", - "to_port": 0 - }, - { - "from": "sdroundedshape", - "from_port": 0, - "to": "sdf3d_smoothboolean_3_2_3_2_2", - "to_port": 1 - }, { "from": "sdf3d_repeat", "from_port": 0, - "to": "sdf3d_rotate_2_2_3", + "to": "sdf3d_translate_4", "to_port": 0 }, { - "from": "sdf3d_rotate_2_2_3", - "from_port": 0, - "to": "sdf3d_boolean", - "to_port": 1 - }, - { - "from": "sdf3d_translate_4_3_3", + "from": "sdf3d_boolean_2", "from_port": 0, "to": "gen_outputs", "to_port": 0 + }, + { + "from": "graph_3", + "from_port": 0, + "to": "sdf3d_scale", + "to_port": 0 } ], - "label": "Skull", - "name": "graph_3", + "label": "Skulls", + "name": "graph", "node_position": { - "x": -960.932495, - "y": 1204.712646 + "x": -875.801453, + "y": 1470.12146 }, "nodes": [ - { - "name": "sdf3d_smoothboolean_3", - "node_position": { - "x": -841.989258, - "y": 938.422729 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.04, - "op": 0, - "r": 0.3, - "w": 0.28 - }, - "type": "sdf3d_smoothboolean" - }, { "name": "sdf3d_translate_4", "node_position": { - "x": -1309.989258, - "y": 736.422729 + "x": -987.195313, + "y": 1473.797363 }, "parameters": { - "x": 0.52, - "y": -0.22, + "x": 0.4, + "y": 0.35, "z": 0 }, "type": "sdf3d_translate" }, { - "name": "sdf3d_smoothboolean_3_2", + "connections": [ + { + "from": "sdf3d_sphere_2", + "from_port": 0, + "to": "sdf3d_translate_4", + "to_port": 0 + }, + { + "from": "sdf3d_translate_4_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3", + "to_port": 1 + }, + { + "from": "sdf3d_scale", + "from_port": 0, + "to": "sdf3d_translate_4_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_smoothboolean_3", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2", + "to_port": 1 + }, + { + "from": "sdf3d_translate_4_2_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2", + "to_port": 0 + }, + { + "from": "sdf3d_sphere_2_2", + "from_port": 0, + "to": "sdf3d_translate_4_3", + "to_port": 0 + }, + { + "from": "sdf3d_translate_4_3", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_smoothboolean_3_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2_2", + "to_port": 1 + }, + { + "from": "sdf3d_sphere_2_2_2", + "from_port": 0, + "to": "sdf3d_translate_4_3_2", + "to_port": 0 + }, + { + "from": "sdf3d_smoothboolean_3_2_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2_3", + "to_port": 1 + }, + { + "from": "sdf3d_translate_4_3_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2_3", + "to_port": 0 + }, + { + "from": "sdf3d_smoothboolean_3_2_3", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2_3_2", + "to_port": 1 + }, + { + "from": "sdf3d_box_2", + "from_port": 0, + "to": "sdf3d_rotate_2", + "to_port": 0 + }, + { + "from": "sdf3d_rotate_2", + "from_port": 0, + "to": "sdf3d_translate_4_3_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_translate_4_3_2_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2_3_2", + "to_port": 0 + }, + { + "from": "sdf3d_translate_4_3_2_2_2", + "from_port": 0, + "to": "sdf3d_repeat", + "to_port": 0 + }, + { + "from": "sdf3d_rotate_2_2_2", + "from_port": 0, + "to": "sdf3d_translate_4_3_2_2_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_cylinder", + "from_port": 0, + "to": "sdf3d_translate_4_2", + "to_port": 0 + }, + { + "from": "sdf3d_cylinder", + "from_port": 0, + "to": "sdf3d_scale", + "to_port": 0 + }, + { + "from": "sdf3d_smoothboolean_3_3", + "from_port": 0, + "to": "sdf3d_smoothboolean_3", + "to_port": 0 + }, + { + "from": "sdf3d_sphere_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_3", + "to_port": 1 + }, + { + "from": "sdf3d_translate_4", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_3", + "to_port": 0 + }, + { + "from": "sdf3d_box_2_2", + "from_port": 0, + "to": "sdf3d_rotate_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_box_2_2", + "from_port": 0, + "to": "sdf3d_translate_4_3_2_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_smoothboolean_3_2_3_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2_3_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_smoothboolean_3_2_3_2_2", + "from_port": 0, + "to": "sdf3d_translate_4_3_3", + "to_port": 0 + }, + { + "from": "sdf3d_sphere_2_3", + "from_port": 0, + "to": "sdf3d_translate_4_3_2_2_2_3", + "to_port": 0 + }, + { + "from": "sdf3d_translate_4_3_2_2_2_3", + "from_port": 0, + "to": "sdf3d_boolean", + "to_port": 0 + }, + { + "from": "sdf3d_boolean", + "from_port": 0, + "to": "sdf3d_rotate_2_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_translate_4_3_2_2_2_2", + "from_port": 0, + "to": "sdroundedshape", + "to_port": 0 + }, + { + "from": "sdroundedshape", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2_3_2_2", + "to_port": 1 + }, + { + "from": "sdf3d_repeat", + "from_port": 0, + "to": "sdf3d_rotate_2_2_3", + "to_port": 0 + }, + { + "from": "sdf3d_rotate_2_2_3", + "from_port": 0, + "to": "sdf3d_boolean", + "to_port": 1 + }, + { + "from": "sdf3d_translate_4_3_3", + "from_port": 0, + "to": "gen_outputs", + "to_port": 0 + } + ], + "label": "Skull", + "name": "graph_3", "node_position": { - "x": -629.489258, - "y": 873.422729 + "x": -1141.932495, + "y": 1276.712646 }, + "nodes": [ + { + "name": "sdf3d_smoothboolean_3", + "node_position": { + "x": -841.989258, + "y": 938.422729 + }, + "parameters": { + "k": 0.04, + "op": 0 + }, + "type": "sdf3d_smoothboolean" + }, + { + "name": "sdf3d_translate_4", + "node_position": { + "x": -1309.989258, + "y": 736.422729 + }, + "parameters": { + "x": 0.52, + "y": -0.22, + "z": 0 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_smoothboolean_3_2", + "node_position": { + "x": -629.489258, + "y": 873.422729 + }, + "parameters": { + "k": 0.17, + "op": 1 + }, + "type": "sdf3d_smoothboolean" + }, + { + "name": "sdf3d_sphere_2_2", + "node_position": { + "x": -830.318359, + "y": 1023.672852 + }, + "parameters": { + "r": 0.07 + }, + "type": "sdf3d_sphere" + }, + { + "name": "sdf3d_translate_4_3", + "node_position": { + "x": -834.318359, + "y": 1078.672852 + }, + "parameters": { + "x": 0.13, + "y": -0.04, + "z": 0.18 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_sphere_2_2_2", + "node_position": { + "x": -831.318359, + "y": 1179.672852 + }, + "parameters": { + "r": 0.08 + }, + "type": "sdf3d_sphere" + }, + { + "name": "sdf3d_sphere_2", + "node_position": { + "x": -1297.989258, + "y": 844.922729 + }, + "parameters": { + "r": 0.28 + }, + "type": "sdf3d_sphere" + }, + { + "name": "sdf3d_box_2", + "node_position": { + "x": -855.193726, + "y": 1338.172852 + }, + "parameters": { + "r": 0, + "sx": 0.05, + "sy": 0.05, + "sz": 0.05 + }, + "type": "sdf3d_box" + }, + { + "name": "sdf3d_translate_4_3_2", + "node_position": { + "x": -834.318359, + "y": 1232.672852 + }, + "parameters": { + "x": 0.12, + "y": -0.03, + "z": 0.18 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_rotate_2", + "node_position": { + "x": -839.193726, + "y": 1471.172852 + }, + "parameters": { + "ax": -30, + "ay": 45, + "az": 0 + }, + "type": "sdf3d_rotate" + }, + { + "name": "sdf3d_translate_4_3_2_2", + "node_position": { + "x": -835.193726, + "y": 1573.172852 + }, + "parameters": { + "x": 0, + "y": 0.11, + "z": 0.19 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_smoothboolean_3_2_3", + "node_position": { + "x": -623.818359, + "y": 1236.172852 + }, + "parameters": { + "k": 0.09, + "op": 1 + }, + "type": "sdf3d_smoothboolean" + }, + { + "name": "sdf3d_smoothboolean_3_2_2", + "node_position": { + "x": -622.818359, + "y": 1073.172852 + }, + "parameters": { + "k": 0.15, + "op": 0 + }, + "type": "sdf3d_smoothboolean" + }, + { + "name": "sdf3d_translate_4_2_2", + "node_position": { + "x": -832.989258, + "y": 826.922729 + }, + "parameters": { + "x": 0, + "y": 0.24, + "z": 0.01 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_scale", + "node_position": { + "x": -823.989258, + "y": 776.422729 + }, + "parameters": { + "s": 0.48 + }, + "type": "sdf3d_scale" + }, + { + "name": "sdf3d_smoothboolean_3_2_3_2", + "node_position": { + "x": -602.693726, + "y": 1454.672852 + }, + "parameters": { + "k": 0.03, + "op": 1 + }, + "type": "sdf3d_smoothboolean" + }, + { + "name": "sdf3d_translate_4_2", + "node_position": { + "x": -1141.989258, + "y": 1070.922729 + }, + "parameters": { + "x": 0, + "y": 0.21, + "z": 0.08 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_translate_4_3_3", + "node_position": { + "x": -363.318359, + "y": 1762.672852 + }, + "parameters": { + + }, + "shader_model": { + "code": "", + "global": "", + "inputs": [ + { + "default": "0.0", + "label": "", + "name": "in", + "type": "sdf3d" + } + ], + "instance": "", + "name": "Mirror", + "outputs": [ + { + "sdf3d": "$in(vec3(abs($uv.x), $uv.y, $uv.z))", + "type": "sdf3d" + } + ], + "parameters": [ + + ] + }, + "type": "shader" + }, + { + "name": "gen_inputs", + "node_position": { + "x": -1375.989258, + "y": 1121.935181 + }, + "parameters": { + + }, + "ports": [ + + ], + "type": "ios" + }, + { + "name": "gen_outputs", + "node_position": { + "x": -194.318359, + "y": 1767.935181 + }, + "parameters": { + + }, + "ports": [ + { + "name": "port0", + "type": "sdf3d" + } + ], + "type": "ios" + }, + { + "name": "gen_parameters", + "node_position": { + "x": -1028.995361, + "y": 476.422729 + }, + "parameters": { + + }, + "type": "remote", + "widgets": [ + + ] + }, + { + "name": "sdf3d_translate_4_3_2_2_2", + "node_position": { + "x": -1172.482544, + "y": 1931.119385 + }, + "parameters": { + "x": 0, + "y": 0.14, + "z": 0 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_rotate_2_2", + "node_position": { + "x": -1172.482544, + "y": 1829.119385 + }, + "parameters": { + "ax": 0, + "ay": 0, + "az": 45 + }, + "type": "sdf3d_rotate" + }, + { + "name": "sdf3d_repeat", + "node_position": { + "x": -1166.482544, + "y": 2035.119385 + }, + "parameters": { + "c": 15 + }, + "shader_model": { + "code": "", + "global": "vec3 circle_repeat_transform(vec3 p, float count) {\n\tfloat r = 6.28/count;\n\tfloat pa = atan(p.x, p.y);\n\tfloat a = mod(pa+0.5*r, r)-0.5*r;\n\tvec3 rv;\n\tfloat c = cos(a-pa);\n\tfloat s = sin(a-pa);\n\trv.x = p.x*c+p.y*s;\n\trv.y = -p.x*s+p.y*c;\n\trv.z = p.z;\n\treturn rv;\n}\n", + "inputs": [ + { + "default": "0.0", + "label": "", + "name": "in", + "type": "sdf3d" + } + ], + "instance": "", + "name": "Circle Repeat", + "outputs": [ + { + "sdf3d": "$in(circle_repeat_transform($uv, $c))", + "type": "sdf3d" + } + ], + "parameters": [ + { + "default": 4, + "label": "", + "max": 32, + "min": 1, + "name": "c", + "step": 1, + "type": "float" + } + ] + }, + "type": "shader" + }, + { + "name": "sdf3d_rotate_2_2_2", + "node_position": { + "x": -791.235718, + "y": 1859.869385 + }, + "parameters": { + "ax": -90, + "ay": 0, + "az": 0 + }, + "type": "sdf3d_rotate" + }, + { + "name": "sdf3d_translate_4_3_2_2_2_2", + "node_position": { + "x": -788.235718, + "y": 1967.869385 + }, + "parameters": { + "x": 0, + "y": 0.315, + "z": 0.08 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_cylinder", + "node_position": { + "x": -1161, + "y": 994.5 + }, + "parameters": { + "l": 0.06, + "r": 0.15 + }, + "type": "sdf3d_cylinder" + }, + { + "name": "sdf3d_smoothboolean_3_3", + "node_position": { + "x": -1104.305908, + "y": 815.75 + }, + "parameters": { + "k": 0.1, + "op": 1 + }, + "type": "sdf3d_smoothboolean" + }, + { + "name": "sdf3d_box_2_2", + "node_position": { + "x": -1190.880981, + "y": 1701 + }, + "parameters": { + "r": 0, + "sx": 0.01, + "sy": 0.01, + "sz": 0.015 + }, + "type": "sdf3d_box" + }, + { + "name": "sdf3d_smoothboolean_3_2_3_2_2", + "node_position": { + "x": -562.468933, + "y": 1761.75 + }, + "parameters": { + "k": 0.05, + "op": 0 + }, + "type": "sdf3d_smoothboolean" + }, + { + "name": "sdf3d_sphere_2_3", + "node_position": { + "x": -1165.397095, + "y": 2204.25 + }, + "parameters": { + "r": 0.28 + }, + "type": "sdf3d_sphere" + }, + { + "name": "sdf3d_translate_4_3_2_2_2_3", + "node_position": { + "x": -1175.397095, + "y": 2261.5 + }, + "parameters": { + "x": 0, + "y": 0.28, + "z": 0 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_boolean", + "node_position": { + "x": -990.397095, + "y": 2076 + }, + "parameters": { + "op": 2 + }, + "type": "sdf3d_boolean" + }, + { + "name": "sdroundedshape", + "node_position": { + "x": -794.225342, + "y": 2070.75 + }, + "parameters": { + "r": 0.01 + }, + "shader_model": { + "code": "", + "global": "", + "inputs": [ + { + "default": "0.0", + "label": "", + "name": "in", + "type": "sdf3d" + } + ], + "instance": "", + "name": "Rounded", + "outputs": [ + { + "sdf3d": "$in($uv)-$r", + "type": "sdf3d" + } + ], + "parameters": [ + { + "default": 0, + "label": "", + "max": 1, + "min": 0, + "name": "r", + "step": 0.01, + "type": "float" + } + ] + }, + "type": "shader" + }, + { + "name": "sdf3d_rotate_2_2_3", + "node_position": { + "x": -1172.268311, + "y": 2085.75 + }, + "parameters": { + "ax": 0, + "ay": 0, + "az": 11 + }, + "type": "sdf3d_rotate" + } + ], "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.17, - "op": 1, - "r": 0.3, - "w": 0.28 + }, - "type": "sdf3d_smoothboolean" - }, - { - "name": "sdf3d_sphere_2_2", - "node_position": { - "x": -830.318359, - "y": 1023.672852 - }, - "parameters": { - "r": 0.07 - }, - "type": "sdf3d_sphere" - }, - { - "name": "sdf3d_translate_4_3", - "node_position": { - "x": -834.318359, - "y": 1078.672852 - }, - "parameters": { - "x": 0.13, - "y": -0.04, - "z": 0.18 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_sphere_2_2_2", - "node_position": { - "x": -831.318359, - "y": 1179.672852 - }, - "parameters": { - "r": 0.08 - }, - "type": "sdf3d_sphere" - }, - { - "name": "sdf3d_sphere_2", - "node_position": { - "x": -1297.989258, - "y": 844.922729 - }, - "parameters": { - "r": 0.28 - }, - "type": "sdf3d_sphere" - }, - { - "name": "sdf3d_box_2", - "node_position": { - "x": -855.193726, - "y": 1338.172852 - }, - "parameters": { - "r": 0, - "sx": 0.05, - "sy": 0.05, - "sz": 0.05 - }, - "type": "sdf3d_box" - }, - { - "name": "sdf3d_translate_4_3_2", - "node_position": { - "x": -834.318359, - "y": 1232.672852 - }, - "parameters": { - "x": 0.12, - "y": -0.03, - "z": 0.18 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_rotate_2", - "node_position": { - "x": -839.193726, - "y": 1471.172852 - }, - "parameters": { - "a": 0, - "ax": -30, - "ay": 45, - "az": 0, - "x": 0.35, - "y": 0, - "z": 0 - }, - "type": "sdf3d_rotate" - }, - { - "name": "sdf3d_translate_4_3_2_2", - "node_position": { - "x": -835.193726, - "y": 1573.172852 - }, - "parameters": { - "x": 0, - "y": 0.11, - "z": 0.19 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_smoothboolean_3_2_3", - "node_position": { - "x": -623.818359, - "y": 1236.172852 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.09, - "op": 1, - "r": 0.3, - "w": 0.28 - }, - "type": "sdf3d_smoothboolean" - }, - { - "name": "sdf3d_smoothboolean_3_2_2", - "node_position": { - "x": -622.818359, - "y": 1073.172852 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.15, - "op": 0, - "r": 0.3, - "w": 0.28 - }, - "type": "sdf3d_smoothboolean" - }, - { - "name": "sdf3d_translate_4_2_2", - "node_position": { - "x": -832.989258, - "y": 826.922729 - }, - "parameters": { - "x": 0, - "y": 0.24, - "z": 0.01 - }, - "type": "sdf3d_translate" + "type": "graph" }, { "name": "sdf3d_scale", "node_position": { - "x": -823.989258, - "y": 776.422729 + "x": -1151.911377, + "y": 1325.772949 }, "parameters": { - "a": 0, - "s": 0.48, - "x": 0.35, - "y": 0, - "z": 0 + "s": 0.3 }, "type": "sdf3d_scale" }, { - "name": "sdf3d_smoothboolean_3_2_3_2", + "name": "sdf3d_boolean_2", "node_position": { - "x": -602.693726, - "y": 1454.672852 + "x": -793.79303, + "y": 1373.297363 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.03, - "op": 1, - "r": 0.3, - "w": 0.28 + "op": 0 }, - "type": "sdf3d_smoothboolean" + "type": "sdf3d_boolean" }, { - "name": "sdf3d_translate_4_2", + "name": "sdf3d_scale_2", "node_position": { - "x": -1141.989258, - "y": 1070.922729 + "x": -985.183411, + "y": 1271.851807 }, "parameters": { - "x": 0, - "y": 0.21, - "z": 0.08 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_translate_4_3_3", - "node_position": { - "x": -363.318359, - "y": 1762.672852 - }, - "parameters": { - "x": 0.15, - "y": 0, - "z": 0.18 + "r": 0.25, + "rx": 4, + "ry": 4 }, "shader_model": { "code": "", - "global": "", + "global": "vec3 repeat(vec3 p, vec3 r, float seed, float randomness) {\n\tvec3 a = (rand3(floor(mod((p.xy+0.5*r.xy)/r.xy, 1.0/r.xy)+vec2(seed)))-0.5)*6.28*randomness;\n\tp = mod(p+0.5*r,r)-0.5*r;\n\tvec3 rv;\n\tfloat c;\n\tfloat s;\n\tc = cos(a.x);\n\ts = sin(a.x);\n\trv.x = p.x;\n\trv.y = p.y*c+p.z*s;\n\trv.z = -p.y*s+p.z*c;\n\tc = cos(a.y);\n\ts = sin(a.y);\n\tp.x = rv.x*c+rv.z*s;\n\tp.y = rv.y;\n\tp.z = -rv.x*s+rv.z*c;\n\tc = cos(a.z);\n\ts = sin(a.z);\n\trv.x = p.x*c+p.y*s;\n\trv.y = -p.x*s+p.y*c;\n\trv.z = p.z;\n\treturn rv;\n}\n", "inputs": [ { "default": "0.0", @@ -1601,24 +1342,63 @@ } ], "instance": "", - "name": "Mirror", + "name": "Repeat", "outputs": [ { - "sdf3d": "$in(vec3(abs($uv.x), $uv.y, $uv.z))", + "sdf3d": "$in(repeat($uv, vec3(1.0/$rx, 1.0/$ry, 0.0), $seed, $r))", "type": "sdf3d" } ], "parameters": [ - + { + "default": 4, + "label": "X", + "max": 32, + "min": 1, + "name": "rx", + "step": 1, + "type": "float" + }, + { + "default": 4, + "label": "Y", + "max": 32, + "min": 1, + "name": "ry", + "step": 1, + "type": "float" + }, + { + "default": 0.5, + "label": "R", + "max": 1, + "min": 0, + "name": "r", + "step": 0.01, + "type": "float" + } ] }, "type": "shader" }, + { + "name": "sdf3d_repeat", + "node_position": { + "x": -986.79303, + "y": 1373.297363 + }, + "parameters": { + "r": 0.25, + "rx": 4, + "ry": 4 + }, + "type": "sdf3d_repeat" + }, { "name": "gen_inputs", "node_position": { - "x": -1375.989258, - "y": 1121.935181 + "x": -1451.911377, + "y": 1349.12146 }, "parameters": { @@ -1631,8 +1411,8 @@ { "name": "gen_outputs", "node_position": { - "x": -194.318359, - "y": 1767.935181 + "x": -493.79303, + "y": 1349.12146 }, "parameters": { @@ -1640,7 +1420,7 @@ "ports": [ { "name": "port0", - "type": "sdf3d" + "type": "sdf3dc" } ], "type": "ios" @@ -1648,8 +1428,8 @@ { "name": "gen_parameters", "node_position": { - "x": -1028.995361, - "y": 476.422729 + "x": -1207.801514, + "y": 971.851807 }, "parameters": { @@ -1658,288 +1438,6 @@ "widgets": [ ] - }, - { - "name": "sdf3d_translate_4_3_2_2_2", - "node_position": { - "x": -1172.482544, - "y": 1931.119385 - }, - "parameters": { - "x": 0, - "y": 0.14, - "z": 0 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_rotate_2_2", - "node_position": { - "x": -1172.482544, - "y": 1829.119385 - }, - "parameters": { - "a": 0, - "ax": 0, - "ay": 0, - "az": 45, - "x": 0.35, - "y": 0, - "z": 0 - }, - "type": "sdf3d_rotate" - }, - { - "name": "sdf3d_repeat", - "node_position": { - "x": -1166.482544, - "y": 2035.119385 - }, - "parameters": { - "a": 0, - "c": 15, - "r": 0.24, - "rx": 4, - "ry": 4, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 - }, - "shader_model": { - "code": "", - "global": "vec3 circle_repeat_transform(vec3 p, float count) {\n\tfloat r = 6.28/count;\n\tfloat pa = atan(p.x, p.y);\n\tfloat a = mod(pa+0.5*r, r)-0.5*r;\n\tvec3 rv;\n\tfloat c = cos(a-pa);\n\tfloat s = sin(a-pa);\n\trv.x = p.x*c+p.y*s;\n\trv.y = -p.x*s+p.y*c;\n\trv.z = p.z;\n\treturn rv;\n}\n", - "inputs": [ - { - "default": "0.0", - "label": "", - "name": "in", - "type": "sdf3d" - } - ], - "instance": "", - "name": "Circle Repeat", - "outputs": [ - { - "sdf3d": "$in(circle_repeat_transform($uv, $c))", - "type": "sdf3d" - } - ], - "parameters": [ - { - "default": 4, - "label": "", - "max": 32, - "min": 1, - "name": "c", - "step": 1, - "type": "float" - } - ] - }, - "type": "shader" - }, - { - "name": "sdf3d_rotate_2_2_2", - "node_position": { - "x": -791.235718, - "y": 1859.869385 - }, - "parameters": { - "a": 0, - "ax": -90, - "ay": 0, - "az": 0, - "x": 0.35, - "y": 0, - "z": 0 - }, - "type": "sdf3d_rotate" - }, - { - "name": "sdf3d_translate_4_3_2_2_2_2", - "node_position": { - "x": -788.235718, - "y": 1967.869385 - }, - "parameters": { - "x": 0, - "y": 0.315, - "z": 0.08 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_cylinder", - "node_position": { - "x": -1161, - "y": 994.5 - }, - "parameters": { - "l": 0.06, - "r": 0.15, - "sx": 0.25, - "sy": 0.25, - "sz": 0.5 - }, - "type": "sdf3d_cylinder" - }, - { - "name": "sdf3d_smoothboolean_3_3", - "node_position": { - "x": -1104.305908, - "y": 815.75 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.1, - "op": 1, - "r": 0.3, - "w": 0.28 - }, - "type": "sdf3d_smoothboolean" - }, - { - "name": "sdf3d_box_2_2", - "node_position": { - "x": -1190.880981, - "y": 1701 - }, - "parameters": { - "r": 0, - "sx": 0.01, - "sy": 0.01, - "sz": 0.015 - }, - "type": "sdf3d_box" - }, - { - "name": "sdf3d_smoothboolean_3_2_3_2_2", - "node_position": { - "x": -562.468933, - "y": 1761.75 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.05, - "op": 0, - "r": 0.3, - "w": 0.28 - }, - "type": "sdf3d_smoothboolean" - }, - { - "name": "sdf3d_sphere_2_3", - "node_position": { - "x": -1165.397095, - "y": 2204.25 - }, - "parameters": { - "r": 0.28 - }, - "type": "sdf3d_sphere" - }, - { - "name": "sdf3d_translate_4_3_2_2_2_3", - "node_position": { - "x": -1175.397095, - "y": 2261.5 - }, - "parameters": { - "x": 0, - "y": 0.28, - "z": 0 - }, - "type": "sdf3d_translate" - }, - { - "name": "sdf3d_boolean", - "node_position": { - "x": -990.397095, - "y": 2076 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 2, - "r": 0.3, - "w": 0.28 - }, - "type": "sdf3d_boolean" - }, - { - "name": "sdroundedshape", - "node_position": { - "x": -794.225342, - "y": 2070.75 - }, - "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.15, - "op": 0, - "r": 0.01, - "w": 0.28 - }, - "shader_model": { - "code": "", - "global": "", - "inputs": [ - { - "default": "0.0", - "label": "", - "name": "in", - "type": "sdf3d" - } - ], - "instance": "", - "name": "Rounded", - "outputs": [ - { - "sdf3d": "$in($uv)-$r", - "type": "sdf3d" - } - ], - "parameters": [ - { - "default": 0, - "label": "", - "max": 1, - "min": 0, - "name": "r", - "step": 0.01, - "type": "float" - } - ] - }, - "type": "shader" - }, - { - "name": "sdf3d_rotate_2_2_3", - "node_position": { - "x": -1172.268311, - "y": 2085.75 - }, - "parameters": { - "a": 0, - "ax": 0, - "ay": 0, - "az": 11, - "x": 0.35, - "y": 0, - "z": 0 - }, - "type": "sdf3d_rotate" } ], "parameters": { @@ -1948,39 +1446,519 @@ "type": "graph" }, { - "name": "buffer", + "connections": [ + { + "from": "graph_2", + "from_port": 0, + "to": "sdf3d_scale_3", + "to_port": 0 + }, + { + "from": "sdf3d_scale_3", + "from_port": 0, + "to": "sdf3d_repeat_2", + "to_port": 0 + }, + { + "from": "sdf3d_repeat_2", + "from_port": 0, + "to": "sdf3d_translate_4_2", + "to_port": 0 + }, + { + "from": "sdf3d_repeat_2_2", + "from_port": 0, + "to": "sdf3d_translate_4_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_scale_3", + "from_port": 0, + "to": "sdf3d_repeat_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_translate_4_2_2", + "from_port": 0, + "to": "sdf3d_boolean_2_2_2", + "to_port": 1 + }, + { + "from": "sdf3d_translate_4_2", + "from_port": 0, + "to": "sdf3d_boolean_2_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_boolean_2_2_2", + "from_port": 0, + "to": "gen_outputs", + "to_port": 0 + } + ], + "label": "Bones", + "name": "graph_3", "node_position": { - "x": -353.830994, - "y": 1560.222534 - }, - "parameters": { - "lod": 0, - "size": 11 - }, - "type": "buffer" - }, - { - "name": "blend_3", - "node_position": { - "x": 84.334427, - "y": 1296.834595 - }, - "parameters": { - "amount": 1, - "blend_type": 3 - }, - "type": "blend" - }, - { - "name": "raymarching", - "node_position": { - "x": -371.992065, - "y": 1466.176514 + "x": -876.000732, + "y": 1520.518677 }, + "nodes": [ + { + "name": "sdf3d_boolean_2_2_2", + "node_position": { + "x": -727.344666, + "y": 1629.128418 + }, + "parameters": { + "op": 0 + }, + "type": "sdf3d_boolean" + }, + { + "name": "sdf3d_translate_4_2_2", + "node_position": { + "x": -904.32666, + "y": 1690.727051 + }, + "parameters": { + "x": 0.51, + "y": 0.38, + "z": 0.02 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_repeat_2_2", + "node_position": { + "x": -1087.362671, + "y": 1690.529785 + }, + "parameters": { + "r": 0.5, + "rx": 4, + "ry": 4 + }, + "type": "sdf3d_repeat" + }, + { + "name": "sdf3d_translate_4_2", + "node_position": { + "x": -904.844666, + "y": 1585.628418 + }, + "parameters": { + "x": 0.35, + "y": 0.52, + "z": 0.02 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_scale_3", + "node_position": { + "x": -1281.764893, + "y": 1630.628418 + }, + "parameters": { + "s": 0.4 + }, + "type": "sdf3d_scale" + }, + { + "connections": [ + { + "from": "sdf3d_sphere_2", + "from_port": 0, + "to": "sdf3d_translate_4_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_sphere_2_2", + "from_port": 0, + "to": "sdf3d_translate_4_2", + "to_port": 0 + }, + { + "from": "sdf3d_translate_4_2_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3", + "to_port": 0 + }, + { + "from": "sdf3d_translate_4_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3", + "to_port": 1 + }, + { + "from": "sdf3d_smoothboolean_3", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2", + "to_port": 0 + }, + { + "from": "sdf3d_sphere_2_2_2", + "from_port": 0, + "to": "sdf3d_smoothboolean_3_2", + "to_port": 1 + }, + { + "from": "sdf3d_sphere_2_2_3", + "from_port": 0, + "to": "sdf3d_translate_4_2_3", + "to_port": 0 + }, + { + "from": "sdf3d_smoothboolean_3_2", + "from_port": 0, + "to": "sdf3d_boolean_2_2", + "to_port": 1 + }, + { + "from": "sdf3d_translate_4_2_3", + "from_port": 0, + "to": "sdf3d_boolean_2_2", + "to_port": 0 + }, + { + "from": "sdf3d_boolean_2_2", + "from_port": 0, + "to": "gen_outputs", + "to_port": 0 + } + ], + "label": "Bone", + "name": "graph_2", + "node_position": { + "x": -1263.480713, + "y": 1580.556274 + }, + "nodes": [ + { + "name": "sdf3d_translate_4_2_2", + "node_position": { + "x": -935.880676, + "y": 1383.431152 + }, + "parameters": { + "x": -0.03, + "y": -0.22, + "z": 0 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_sphere_2", + "node_position": { + "x": -930.880676, + "y": 1327.931152 + }, + "parameters": { + "r": 0.03 + }, + "type": "sdf3d_sphere" + }, + { + "name": "sdf3d_sphere_2_2_2", + "node_position": { + "x": -937.880676, + "y": 1638.431152 + }, + "parameters": { + "h": 0.4, + "r": 0.025 + }, + "shader_model": { + "code": "vec3 $(name_uv)_p = $uv;\n$(name_uv)_p.y -= clamp($(name_uv)_p.y, -0.5*$h, 0.5*$h);\n", + "global": "", + "inputs": [ + + ], + "instance": "", + "name": "Sphere", + "outputs": [ + { + "sdf3d": "length($(name_uv)_p)-$r", + "type": "sdf3d" + } + ], + "parameters": [ + { + "default": 0.5, + "label": "H", + "max": 1, + "min": 0, + "name": "h", + "step": 0.01, + "type": "float" + }, + { + "default": 0.1, + "label": "R", + "max": 0.5, + "min": 0, + "name": "r", + "step": 0.01, + "type": "float" + } + ] + }, + "type": "shader" + }, + { + "name": "sdf3d_smoothboolean_3_2", + "node_position": { + "x": -744.380676, + "y": 1604.931152 + }, + "parameters": { + "k": 0.02, + "op": 0 + }, + "type": "sdf3d_smoothboolean" + }, + { + "name": "sdf3d_smoothboolean_3", + "node_position": { + "x": -744.880676, + "y": 1527.931152 + }, + "parameters": { + "k": 0.01, + "op": 0 + }, + "shader_model": { + "code": "", + "global": "float sdf3SmoothUnion(float d1, float d2, float k) {\n float h = clamp(0.5+0.5*(d2-d1)/k, 0.0, 1.0);\n return mix(d2, d1, h)-k*h*(1.0-h);\n}\n\nfloat sdf3SmoothSubtraction( float d1, float d2, float k ) {\n float h = clamp(0.5-0.5*(d2+d1)/k, 0.0, 1.0);\n return mix( d2, -d1, h )+k*h*(1.0-h);\n}\n\nfloat sdf3SmoothIntersection( float d1, float d2, float k ) {\n float h = clamp(0.5-0.5*(d2-d1)/k, 0.0, 1.0);\n return mix(d2, d1, h)+k*h*(1.0-h);\n}\n", + "inputs": [ + { + "default": "0.0", + "label": "", + "name": "in1", + "type": "sdf3d" + }, + { + "default": "0.0", + "label": "", + "name": "in2", + "type": "sdf3d" + } + ], + "instance": "", + "name": "sdSmoothBoolean", + "outputs": [ + { + "sdf3d": "sdf3Smooth$op($in1($uv), $in2($uv), $k)", + "type": "sdf3d" + } + ], + "parameters": [ + { + "default": 0, + "label": "", + "name": "op", + "type": "enum", + "values": [ + { + "name": "Union", + "value": "Union" + }, + { + "name": "Subtraction", + "value": "Subtraction" + }, + { + "name": "Intersection", + "value": "Intersection" + } + ] + }, + { + "default": 0, + "label": "", + "max": 1, + "min": 0, + "name": "k", + "step": 0.01, + "type": "float" + } + ] + }, + "type": "shader" + }, + { + "name": "sdf3d_sphere_2_2", + "node_position": { + "x": -929.880676, + "y": 1483.431152 + }, + "parameters": { + "r": 0.04 + }, + "type": "sdf3d_sphere" + }, + { + "name": "sdf3d_translate_4_2", + "node_position": { + "x": -934.880676, + "y": 1534.431152 + }, + "parameters": { + "x": 0.02, + "y": -0.25, + "z": 0 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_translate_4_2_3", + "node_position": { + "x": -936.380676, + "y": 1792.181152 + }, + "parameters": { + "x": -0.04, + "y": 0.21, + "z": 0 + }, + "type": "sdf3d_translate" + }, + { + "name": "sdf3d_sphere_2_2_3", + "node_position": { + "x": -931.380676, + "y": 1741.181152 + }, + "parameters": { + "r": 0.06 + }, + "type": "sdf3d_sphere" + }, + { + "name": "sdf3d_boolean_2_2", + "node_position": { + "x": -747.380676, + "y": 1680.681152 + }, + "parameters": { + "op": 1 + }, + "type": "sdf3d_boolean" + }, + { + "name": "gen_inputs", + "node_position": { + "x": -1237.880615, + "y": 1568.556274 + }, + "parameters": { + + }, + "ports": [ + + ], + "type": "ios" + }, + { + "name": "gen_outputs", + "node_position": { + "x": -447.380676, + "y": 1568.556274 + }, + "parameters": { + + }, + "ports": [ + { + "name": "port0", + "type": "sdf3d" + } + ], + "type": "ios" + }, + { + "name": "gen_parameters", + "node_position": { + "x": -1079.480713, + "y": 1027.931152 + }, + "parameters": { + + }, + "type": "remote", + "widgets": [ + + ] + } + ], + "parameters": { + + }, + "type": "graph" + }, + { + "name": "sdf3d_repeat_2", + "node_position": { + "x": -1082.880615, + "y": 1585.431152 + }, + "parameters": { + "r": 0.46, + "rx": 4, + "ry": 4 + }, + "type": "sdf3d_repeat" + }, + { + "name": "gen_inputs", + "node_position": { + "x": -1581.764893, + "y": 1627.518677 + }, + "parameters": { + + }, + "ports": [ + + ], + "type": "ios" + }, + { + "name": "gen_outputs", + "node_position": { + "x": -427.344666, + "y": 1627.518677 + }, + "parameters": { + + }, + "ports": [ + { + "name": "port0", + "type": "sdf3dc" + } + ], + "type": "ios" + }, + { + "name": "gen_parameters", + "node_position": { + "x": -1236.000732, + "y": 1280.556274 + }, + "parameters": { + + }, + "type": "remote", + "widgets": [ + + ] + } + ], "parameters": { }, - "type": "raymarching" + "type": "graph" } ], "parameters": { diff --git a/material_maker/examples/stone_wall.ptex b/material_maker/examples/stone_wall.ptex index 315036c..2a57d1a 100644 --- a/material_maker/examples/stone_wall.ptex +++ b/material_maker/examples/stone_wall.ptex @@ -72,12 +72,6 @@ "to": "colorize_4", "to_port": 0 }, - { - "from": "voronoi_0", - "from_port": 1, - "to": "colorize_5", - "to_port": 0 - }, { "from": "blend_0", "from_port": 0, @@ -158,52 +152,6 @@ "y": 0 }, "nodes": [ - { - "name": "voronoi_0", - "node_position": { - "x": -288, - "y": -107 - }, - "parameters": { - "intensity": 1, - "randomness": 1, - "scale_x": 8, - "scale_y": 8, - "stretch_x": 1, - "stretch_y": 1 - }, - "type": "voronoi" - }, - { - "name": "colorize_5", - "node_position": { - "x": -104, - "y": -87 - }, - "parameters": { - "gradient": { - "interpolation": 1, - "points": [ - { - "a": 1, - "b": 0, - "g": 0, - "pos": 0.027273, - "r": 0 - }, - { - "a": 1, - "b": 1, - "g": 1, - "pos": 0.1, - "r": 1 - } - ], - "type": "Gradient" - } - }, - "type": "colorize" - }, { "name": "colorize_0", "node_position": { @@ -237,8 +185,8 @@ { "name": "perlin_0", "node_position": { - "x": 13, - "y": 218 + "x": -72, + "y": 250 }, "parameters": { "iterations": 4, @@ -321,8 +269,8 @@ { "name": "Perlin", "node_position": { - "x": 74, - "y": -255 + "x": -66, + "y": -133 }, "parameters": { "iterations": 8, @@ -440,7 +388,6 @@ "emission_energy": 1, "metallic": 1, "normal_scale": 1, - "resolution": 1, "roughness": 1, "size": 11, "subsurf_scatter_strength": 0 @@ -454,14 +401,7 @@ "y": -22.258774 }, "parameters": { - "color": { - "a": 1, - "b": 1, - "g": 1, - "r": 1, - "type": "Color" - }, - "name": 0 + }, "type": "combine" }, @@ -532,13 +472,10 @@ "y": 211.716217 }, "parameters": { - "amount": 0.5, "param0": 11, "param1": 0.79, "param2": 0, - "param3": 0, - "param4": 1, - "size": 4 + "param4": 1 }, "type": "normal_map" }, @@ -550,8 +487,7 @@ }, "parameters": { "amount": 0.05, - "eps": 0.05, - "epsilon": 0 + "eps": 0.05 }, "type": "warp" }, @@ -570,8 +506,8 @@ { "name": "Bricks", "node_position": { - "x": -56, - "y": -6 + "x": -61, + "y": 2 }, "parameters": { "bevel": 0.15,