From a6f26464d2af4179a55be0ad91b95200c1198157 Mon Sep 17 00:00:00 2001 From: RodZill4 Date: Tue, 24 Mar 2020 21:18:59 +0100 Subject: [PATCH] Fixed examples (random seed related changes) --- material_maker/examples/brick_rotated.ptex | 214 +++---------- material_maker/examples/mmm_donuts.ptex | 353 +++++---------------- material_maker/examples/skulls.ptex | 108 ++----- 3 files changed, 166 insertions(+), 509 deletions(-) diff --git a/material_maker/examples/brick_rotated.ptex b/material_maker/examples/brick_rotated.ptex index bce9a5e..dc2faa1 100644 --- a/material_maker/examples/brick_rotated.ptex +++ b/material_maker/examples/brick_rotated.ptex @@ -1,23 +1,5 @@ { "connections": [ - { - "from": "bricks", - "from_port": 2, - "to": "transform", - "to_port": 1 - }, - { - "from": "bricks", - "from_port": 3, - "to": "transform", - "to_port": 2 - }, - { - "from": "bricks", - "from_port": 0, - "to": "blend", - "to_port": 1 - }, { "from": "transform", "from_port": 0, @@ -30,12 +12,6 @@ "to": "transform", "to_port": 0 }, - { - "from": "bricks", - "from_port": 1, - "to": "transform", - "to_port": 3 - }, { "from": "blend", "from_port": 0, @@ -59,6 +35,30 @@ "from_port": 0, "to": "Material", "to_port": 4 + }, + { + "from": "bricks_2", + "from_port": 2, + "to": "transform", + "to_port": 1 + }, + { + "from": "bricks_2", + "from_port": 3, + "to": "transform", + "to_port": 2 + }, + { + "from": "bricks_2", + "from_port": 0, + "to": "blend", + "to_port": 1 + }, + { + "from": "bricks_2", + "from_port": 1, + "to": "transform", + "to_port": 3 } ], "label": "Graph", @@ -69,6 +69,9 @@ }, "nodes": [ { + "export_paths": { + + }, "name": "Material", "node_position": { "x": 70, @@ -82,148 +85,17 @@ "r": 1, "type": "Color" }, - "ao_light_affect": 1, + "ao": 1, "depth_scale": 1, "emission_energy": 1, "metallic": 1, - "normal_scale": 1, + "normal": 1, "roughness": 1, "size": 11, - "subsurf_scatter_strength": 0 + "sss": 0 }, "type": "material" }, - { - "name": "bricks", - "node_position": { - "x": -549.5, - "y": -120.5 - }, - "parameters": { - "bevel": 0.1, - "columns": 3, - "mortar": 0.1, - "pattern": 0, - "repeat": 1, - "row_offset": 0.5, - "rows": 6 - }, - "shader_model": { - "code": "vec4 $(name_uv) = $(name)_xyzw($(uv));\n", - "global": "vec4 brick(vec2 uv, vec2 bmin, vec2 bmax, float mortar, float bevel) {\n\tfloat color;\n\tvec2 c1 = (uv-bmin-vec2(mortar))/bevel;\n\tvec2 c2 = (bmax-uv-vec2(mortar))/bevel;\n\tvec2 c = min(c1, c2);\n\tcolor = clamp(min(c.x, c.y), 0.0, 1.0);\n\tvec2 tiled_brick_pos = mod(bmin, vec2(1.0, 1.0));\n\treturn vec4(color, 0.5*(bmin+bmax), tiled_brick_pos.x+7.0*tiled_brick_pos.y);\n}\n\nvec4 bricks_rb(vec2 uv, vec2 count, float repeat, float offset, float mortar, float bevel) {\n\tcount *= repeat;\n\tmortar /= max(count.x, count.y);\n\tbevel /= max(count.x, count.y);\n\tfloat x_offset = offset*step(0.5, fract(uv.y*count.y*0.5));\n\tvec2 bmin = floor(vec2(uv.x*count.x-x_offset, uv.y*count.y));\n\tbmin.x += x_offset;\n\tbmin /= count;\n\treturn brick(uv, bmin, bmin+vec2(1.0)/count, mortar, bevel);\n}\n\nvec4 bricks_rb2(vec2 uv, vec2 count, float repeat, float offset, float mortar, float bevel) {\n\tcount *= repeat;\n\tmortar /= max(2.0*count.x, count.y);\n\tbevel /= max(2.0*count.x, count.y);\n\tfloat x_offset = offset*step(0.5, fract(uv.y*count.y*0.5));\n\tcount.x = count.x*(1.0+step(0.5, fract(uv.y*count.y*0.5)));\n\tvec2 bmin = floor(vec2(uv.x*count.x-x_offset, uv.y*count.y));\n\tbmin.x += x_offset;\n\tbmin /= count;\n\treturn brick(uv, bmin, bmin+vec2(1.0)/count, mortar, bevel);\n}\n\nvec4 bricks_hb(vec2 uv, vec2 count, float repeat, float offset, float mortar, float bevel) {\n\tfloat pc = count.x+count.y;\n\tfloat c = pc*repeat;\n\tmortar /= c;\n\tbevel /= c;\n\tvec2 corner = floor(uv*c);\n\tfloat cdiff = mod(corner.x-corner.y, pc);\n\tif (cdiff < count.x) {\n\t\treturn brick(uv, (corner-vec2(cdiff, 0.0))/c, (corner-vec2(cdiff, 0.0)+vec2(count.x, 1.0))/c, mortar, bevel);\n\t} else {\n\t\treturn brick(uv, (corner-vec2(0.0, pc-cdiff-1.0))/c, (corner-vec2(0.0, pc-cdiff-1.0)+vec2(1.0, count.y))/c, mortar, bevel);\n\t}\n}\n\nvec4 bricks_bw(vec2 uv, vec2 count, float repeat, float offset, float mortar, float bevel) {\n\tvec2 c = 2.0*count*repeat;\n\tfloat mc = max(c.x, c.y);\n\tmortar /= mc;\n\tbevel /= mc;\n\tvec2 corner1 = floor(uv*c);\n\tvec2 corner2 = count*floor(repeat*2.0*uv);\n\tfloat cdiff = mod(dot(floor(repeat*2.0*uv), vec2(1.0)), 2.0);\n\tvec2 corner;\n\tvec2 size;\n\tif (cdiff == 0.0) {\n\t\tcorner = vec2(corner1.x, corner2.y);\n\t\tsize = vec2(1.0, count.y);\n\t} else {\n\t\tcorner = vec2(corner2.x, corner1.y);\n\t\tsize = vec2(count.x, 1.0);\n\t}\n\treturn brick(uv, corner/c, (corner+size)/c, mortar, bevel);\n}\n\nvec4 bricks_sb(vec2 uv, vec2 count, float repeat, float offset, float mortar, float bevel) {\n\tvec2 c = (count+vec2(1.0))*repeat;\n\tfloat mc = max(c.x, c.y);\n\tmortar /= mc;\n\tbevel /= mc;\n\tvec2 corner1 = floor(uv*c);\n\tvec2 corner2 = (count+vec2(1.0))*floor(repeat*uv);\n\tvec2 rcorner = corner1 - corner2;\n\tvec2 corner;\n\tvec2 size;\n\tif (rcorner.x == 0.0 && rcorner.y < count.y) {\n\t\tcorner = corner2;\n\t\tsize = vec2(1.0, count.y);\n\t} else if (rcorner.y == 0.0) {\n\t\tcorner = corner2+vec2(1.0, 0.0);\n\t\tsize = vec2(count.x, 1.0);\n\t} else if (rcorner.x == count.x) {\n\t\tcorner = corner2+vec2(count.x, 1.0);\n\t\tsize = vec2(1.0, count.y);\n\t} else if (rcorner.y == count.y) {\n\t\tcorner = corner2+vec2(0.0, count.y);\n\t\tsize = vec2(count.x, 1.0);\n\t} else {\n\t\tcorner = corner2+vec2(1.0);\n\t\tsize = vec2(count.x-1.0, count.y-1.0);\n\t}\n\treturn brick(uv, corner/c, (corner+size)/c, mortar, bevel);\n}", - "inputs": [ - - ], - "instance": "vec4 $(name)_xyzw(vec2 uv) {\n return bricks_$(pattern)(uv, vec2($(columns), $(rows)), $(repeat), $(row_offset), $(mortar), max(0.001, $(bevel)));\n}", - "name": "Bricks", - "outputs": [ - { - "f": "$(name_uv).x", - "type": "f" - }, - { - "rgb": "rand3(vec2($(name_uv).w, $(seed)))", - "type": "rgb" - }, - { - "f": "$(name_uv).y", - "type": "f" - }, - { - "f": "$(name_uv).z", - "type": "f" - } - ], - "parameters": [ - { - "default": 0, - "label": "", - "name": "pattern", - "type": "enum", - "values": [ - { - "name": "Running bond", - "value": "rb" - }, - { - "name": "Running bond (2)", - "value": "rb2" - }, - { - "name": "HerringBone", - "value": "hb" - }, - { - "name": "Basket weave", - "value": "bw" - }, - { - "name": "Spanish bond", - "value": "sb" - } - ] - }, - { - "default": 1, - "label": "Repeat:", - "max": 8, - "min": 1, - "name": "repeat", - "step": 1, - "type": "float", - "widget": "spinbox" - }, - { - "default": 6, - "label": "Rows:", - "max": 64, - "min": 1, - "name": "rows", - "step": 1, - "type": "float", - "widget": "spinbox" - }, - { - "default": 3, - "label": "Columns:", - "max": 64, - "min": 1, - "name": "columns", - "step": 1, - "type": "float", - "widget": "spinbox" - }, - { - "default": 0.5, - "label": "Offset:", - "max": 1, - "min": 0, - "name": "row_offset", - "step": 0, - "type": "float" - }, - { - "default": 0.1, - "label": "Mortar:", - "max": 0.5, - "min": 0, - "name": "mortar", - "step": 0, - "type": "float" - }, - { - "default": 0.1, - "label": "Bevel:", - "max": 0.5, - "min": 0, - "name": "bevel", - "step": 0, - "type": "float" - } - ] - }, - "type": "shader" - }, { "name": "blend", "node_position": { @@ -311,7 +183,7 @@ "y": 165.542206 }, "parameters": { - "size": 4 + }, "size": { "x": 280, @@ -328,15 +200,31 @@ "y": -40.645294 }, "parameters": { - "amount": 0.5, "param0": 11, "param1": 0.995, "param2": 0, - "param3": 0, - "param4": 1, - "size": 4 + "param4": 1 }, "type": "normal_map" + }, + { + "name": "bricks_2", + "node_position": { + "x": -528.086548, + "y": -114.154938 + }, + "parameters": { + "bevel": 0.1, + "columns": 3, + "corner": 0, + "mortar": 0.1, + "pattern": 0, + "repeat": 1, + "round": 0, + "row_offset": 0.5, + "rows": 6 + }, + "type": "bricks" } ], "parameters": { diff --git a/material_maker/examples/mmm_donuts.ptex b/material_maker/examples/mmm_donuts.ptex index dc30143..c146b0d 100644 --- a/material_maker/examples/mmm_donuts.ptex +++ b/material_maker/examples/mmm_donuts.ptex @@ -6,30 +6,6 @@ "to": "sdf3d_scale_2", "to_port": 0 }, - { - "from": "sdf3d_scale_2", - "from_port": 0, - "to": "sdf3d_repeat", - "to_port": 0 - }, - { - "from": "sdf3d_scale_2", - "from_port": 0, - "to": "sdf3d_repeat_2", - "to_port": 0 - }, - { - "from": "sdf3d_repeat_2", - "from_port": 0, - "to": "sdf3d_translate_3_2_2", - "to_port": 0 - }, - { - "from": "sdf3d_repeat", - "from_port": 0, - "to": "sdf3d_boolean", - "to_port": 0 - }, { "from": "sdf3d_translate_3_2_2", "from_port": 0, @@ -401,6 +377,30 @@ "from_port": 2, "to": "mul_detect_2_2", "to_port": 1 + }, + { + "from": "sdf3d_scale_2", + "from_port": 0, + "to": "sdf3d_repeat_3", + "to_port": 0 + }, + { + "from": "sdf3d_repeat_3", + "from_port": 0, + "to": "sdf3d_boolean", + "to_port": 0 + }, + { + "from": "sdf3d_scale_2", + "from_port": 0, + "to": "sdf3d_repeat_3_2", + "to_port": 0 + }, + { + "from": "sdf3d_repeat_3_2", + "from_port": 0, + "to": "sdf3d_translate_3_2_2", + "to_port": 0 } ], "label": "Graph", @@ -411,6 +411,9 @@ }, "nodes": [ { + "export_paths": { + + }, "name": "Material", "node_position": { "x": 1596.135986, @@ -424,14 +427,14 @@ "r": 1, "type": "Color" }, - "ao_light_affect": 1, + "ao": 1, "depth_scale": 0.3, "emission_energy": 1, "metallic": 1, - "normal_scale": 1, + "normal": 1, "roughness": 1, "size": 11, - "subsurf_scatter_strength": 0 + "sss": 0 }, "type": "material" }, @@ -562,8 +565,8 @@ "label": "Donut", "name": "graph", "node_position": { - "x": -664.759155, - "y": -18.094296 + "x": -660.759155, + "y": 14.905704 }, "nodes": [ { @@ -573,15 +576,7 @@ "y": 249.420105 }, "parameters": { - "bevel": 0, - "c": 0.31, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.15, - "op": 0, - "r": 0.15, - "w": 0.28 + "c": 0.31 }, "shader_model": { "code": "", @@ -624,13 +619,7 @@ "y": 320.541656 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 2, - "r": 0.3, - "w": 0.28 + "op": 2 }, "shader_model": { "code": "", @@ -699,18 +688,13 @@ "name": "sdf3d_repeat", "node_position": { "x": -768.854126, - "y": 276.291656 + "y": 281.291656 }, "parameters": { - "a": 0, "r": 0.51, "rx": 16, "ry": 16, - "rz": 16, - "s": 0.3, - "x": 0.35, - "y": 0, - "z": 0 + "rz": 16 }, "shader_model": { "code": "", @@ -727,7 +711,7 @@ "name": "Repeat", "outputs": [ { - "sdf3dc": "$in(sdf3d_repeat($uv, vec3(1.0/$rx, 1.0/$ry, 1.0/$rz), $seed, $r))", + "sdf3dc": "$in(sdf3d_repeat($uv, vec3(1.0/$rx, 1.0/$ry, 1.0/$rz), float($seed), $r))", "type": "sdf3dc" } ], @@ -784,10 +768,7 @@ }, "parameters": { "l": 0.02, - "r": 0.01, - "sx": 0.25, - "sy": 0.25, - "sz": 0.5 + "r": 0.01 }, "type": "sdf3d_capsule" }, @@ -799,10 +780,7 @@ }, "parameters": { "R": 0.3, - "r": 0.14, - "sx": 0.1, - "sy": 0.1, - "sz": 0.02 + "r": 0.14 }, "type": "sdf3d_torus" }, @@ -814,10 +792,7 @@ }, "parameters": { "R": 0.3, - "r": 0.15, - "sx": 0.1, - "sy": 0.1, - "sz": 0.02 + "r": 0.15 }, "type": "sdf3d_torus" }, @@ -828,13 +803,7 @@ "y": -3.083344 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 0, - "r": 0.3, - "w": 0.28 + "op": 0 }, "shader_model": { "code": "", @@ -893,15 +862,7 @@ "y": -156.583344 }, "parameters": { - "bevel": 0, - "c": 0.08, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.15, - "op": 0, - "r": 0.15, - "w": 0.28 + "c": 0.08 }, "shader_model": { "code": "", @@ -957,15 +918,7 @@ "y": 130.166656 }, "parameters": { - "bevel": 0, - "c": 0.87, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.15, - "op": 0, - "r": 0.15, - "w": 0.28 + "c": 0.87 }, "shader_model": { "code": "", @@ -1008,13 +961,7 @@ "y": 127.920105 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 0, - "r": 0.3, - "w": 0.28 + "op": 0 }, "shader_model": { "code": "", @@ -1117,76 +1064,6 @@ }, "type": "graph" }, - { - "name": "sdf3d_repeat", - "node_position": { - "x": -482.202179, - "y": -14.881774 - }, - "parameters": { - "a": 0, - "r": 0.2, - "rx": 3, - "ry": 3, - "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": "sdf3dc" - } - ], - "instance": "", - "name": "Repeat", - "outputs": [ - { - "sdf3dc": "$in(repeat($uv, vec3(1.0/$rx, 1.0/$ry, 0.0), $seed, $r))", - "type": "sdf3dc" - } - ], - "parameters": [ - { - "control": "None", - "default": 4, - "label": "X", - "max": 32, - "min": 1, - "name": "rx", - "step": 1, - "type": "float" - }, - { - "control": "None", - "default": 4, - "label": "Y", - "max": 32, - "min": 1, - "name": "ry", - "step": 1, - "type": "float" - }, - { - "control": "None", - "default": 0.5, - "label": "R", - "max": 1, - "min": 0, - "name": "r", - "step": 0.01, - "type": "float" - } - ] - }, - "type": "shader" - }, { "name": "sdf3d_scale_2", "node_position": { @@ -1194,11 +1071,7 @@ "y": 66.030228 }, "parameters": { - "a": 0, - "s": 0.37, - "x": 0.35, - "y": 0, - "z": 0 + "s": 0.37 }, "shader_model": { "code": "vec2 $(name_uv)_in = $in(($uv)/$s);", @@ -1234,86 +1107,16 @@ }, "type": "shader" }, - { - "name": "sdf3d_repeat_2", - "node_position": { - "x": -480.202179, - "y": 110.618225 - }, - "parameters": { - "a": 0, - "r": 0.21, - "rx": 3, - "ry": 3, - "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": "sdf3dc" - } - ], - "instance": "", - "name": "Repeat", - "outputs": [ - { - "sdf3dc": "$in(repeat($uv, vec3(1.0/$rx, 1.0/$ry, 0.0), $seed, $r))", - "type": "sdf3dc" - } - ], - "parameters": [ - { - "control": "None", - "default": 4, - "label": "X", - "max": 32, - "min": 1, - "name": "rx", - "step": 1, - "type": "float" - }, - { - "control": "None", - "default": 4, - "label": "Y", - "max": 32, - "min": 1, - "name": "ry", - "step": 1, - "type": "float" - }, - { - "control": "None", - "default": 0.5, - "label": "R", - "max": 1, - "min": 0, - "name": "r", - "step": 0.01, - "type": "float" - } - ] - }, - "type": "shader" - }, { "name": "sdf3d_translate_3_2_2", "node_position": { - "x": -479.952209, - "y": 213.034912 + "x": -478.952209, + "y": 207.034912 }, "parameters": { - "x": 0.14, + "x": 0.18, "y": 0.11, - "z": 0.2 + "z": 0.14 }, "shader_model": { "code": "", @@ -1372,17 +1175,11 @@ { "name": "sdf3d_boolean", "node_position": { - "x": -252.248795, + "x": -265.248779, "y": 76.092621 }, "parameters": { - "bevel": 0, - "cx": 0, - "cy": 0, - "h": 0.08, - "op": 0, - "r": 0.3, - "w": 0.28 + "op": 0 }, "shader_model": { "code": "", @@ -1443,7 +1240,7 @@ "parameters": { "x": 0, "y": 0, - "z": 0.1 + "z": 0.07 }, "shader_model": { "code": "", @@ -1513,7 +1310,7 @@ "y": -50.802036 }, "parameters": { - "size": 4 + }, "size": { "x": 757.167969, @@ -1907,7 +1704,6 @@ }, "parameters": { "param0": 10, - "param1": 50, "param2": 4.9 }, "type": "remote", @@ -2069,7 +1865,6 @@ ], "parameters": { "param0": 10, - "param1": 50, "param2": 4.9 }, "type": "graph" @@ -2179,7 +1974,6 @@ }, "parameters": { "param0": 0, - "param1": 10, "param2": 4.9 }, "type": "remote", @@ -2216,8 +2010,7 @@ }, "parameters": { "brightness": 0, - "contrast": 1, - "steps": 6 + "contrast": 1 }, "type": "brightness_contrast" }, @@ -2228,20 +2021,16 @@ "y": 544.75 }, "parameters": { - "amount": 0.5, "param0": 10, "param1": 1.02, "param2": 0, - "param3": 0, - "param4": 1, - "size": 4 + "param4": 1 }, "type": "normal_map" } ], "parameters": { "param0": 0, - "param1": 10, "param2": 4.9 }, "type": "graph" @@ -2428,7 +2217,7 @@ "y": -50.148132 }, "parameters": { - "size": 4 + }, "size": { "x": 255.271576, @@ -2452,7 +2241,7 @@ "y": -373.398132 }, "parameters": { - "size": 4 + }, "size": { "x": 464, @@ -2476,7 +2265,7 @@ "y": -289.750183 }, "parameters": { - "size": 4 + }, "size": { "x": 743.688171, @@ -2521,6 +2310,32 @@ "v": 0.08 }, "type": "mul_detect" + }, + { + "name": "sdf3d_repeat_3", + "node_position": { + "x": -479.340515, + "y": 4.22731 + }, + "parameters": { + "r": 0.2, + "rx": 3, + "ry": 3 + }, + "type": "sdf3d_repeat" + }, + { + "name": "sdf3d_repeat_3_2", + "node_position": { + "x": -479.107727, + "y": 105.348923 + }, + "parameters": { + "r": 0.2, + "rx": 3, + "ry": 3 + }, + "type": "sdf3d_repeat" } ], "parameters": { diff --git a/material_maker/examples/skulls.ptex b/material_maker/examples/skulls.ptex index 21fd35c..8748a22 100644 --- a/material_maker/examples/skulls.ptex +++ b/material_maker/examples/skulls.ptex @@ -165,6 +165,9 @@ }, "nodes": [ { + "export_paths": { + + }, "name": "Material", "node_position": { "x": 356, @@ -178,14 +181,14 @@ "r": 1, "type": "Color" }, - "ao_light_affect": 1, + "ao": 1, "depth_scale": 1, "emission_energy": 1, "metallic": 1, - "normal_scale": 1, + "normal": 1, "roughness": 1, "size": 11, - "subsurf_scatter_strength": 0 + "sss": 0 }, "type": "material" }, @@ -492,18 +495,6 @@ }, { "connections": [ - { - "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, @@ -533,6 +524,18 @@ "from_port": 0, "to": "sdf3d_scale", "to_port": 0 + }, + { + "from": "sdf3d_scale", + "from_port": 0, + "to": "sdf3d_repeat_2", + "to_port": 0 + }, + { + "from": "sdf3d_repeat_2", + "from_port": 0, + "to": "sdf3d_boolean_2", + "to_port": 0 } ], "label": "Skulls", @@ -1319,68 +1322,6 @@ }, "type": "sdf3d_boolean" }, - { - "name": "sdf3d_scale_2", - "node_position": { - "x": -985.183411, - "y": 1271.851807 - }, - "parameters": { - "r": 0.25, - "rx": 4, - "ry": 4 - }, - "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": "sdf3d_repeat", "node_position": { @@ -1438,6 +1379,19 @@ "widgets": [ ] + }, + { + "name": "sdf3d_repeat_2", + "node_position": { + "x": -986.70166, + "y": 1268.091553 + }, + "parameters": { + "r": 0.25, + "rx": 4, + "ry": 4 + }, + "type": "sdf3d_repeat" } ], "parameters": {