mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
Refactoring, new noise node and blur updates
Added a noise node (paints randomly pixels in black or white). Modified blur so direction can be selected (horizontal, verticla, or both). Updated code to use string formats instead of conversion + concatenation.
This commit is contained in:
parent
1d27344de2
commit
ba016797e3
@ -151,7 +151,7 @@ vec3 brick(vec2 uv, vec2 bmin, vec2 bmax, float mortar, float bevel) {
|
||||
vec2 c2 = (bmax-uv-vec2(mortar))/bevel;
|
||||
vec2 c = min(c1, c2);
|
||||
color = clamp(min(c.x, c.y), 0.0, 1.0);
|
||||
return vec3(color, bmin);
|
||||
return vec3(color, mod(bmin, vec2(1.0, 1.0)));
|
||||
}
|
||||
|
||||
vec3 bricks_rb(vec2 uv, vec2 count, float repeat, float offset, float mortar, float bevel) {
|
||||
@ -246,6 +246,14 @@ float colored_bricks(vec2 uv, vec2 count, float offset) {
|
||||
return fract(x/3.0+y/7.0);
|
||||
}
|
||||
|
||||
float dots(vec2 uv, float size, float density, int seed) {
|
||||
vec2 seed2 = rand2(vec2(float(seed), 1.0-float(seed)));
|
||||
uv /= size;
|
||||
vec2 point_pos = floor(uv)+vec2(0.5);
|
||||
float color = step(rand(seed2+point_pos), density);
|
||||
return color;
|
||||
}
|
||||
|
||||
float perlin(vec2 uv, vec2 size, int iterations, float persistence, int seed) {
|
||||
vec2 seed2 = rand2(vec2(float(seed), 1.0-float(seed)));
|
||||
float rv = 0.0;
|
||||
|
@ -30,6 +30,16 @@
|
||||
"y_scale":4,
|
||||
"y_wave":0
|
||||
},
|
||||
{
|
||||
"tree_item": "Generators/Pattern/Checkerboard",
|
||||
"type": "pattern",
|
||||
"icon": "checkerboard",
|
||||
"mix": 4,
|
||||
"x_scale": 4,
|
||||
"x_wave": 2,
|
||||
"y_scale": 4,
|
||||
"y_wave": 2
|
||||
},
|
||||
{
|
||||
"tree_item":"Generators/Bricks",
|
||||
"type":"bricks",
|
||||
@ -40,6 +50,59 @@
|
||||
"row_offset":0.5,
|
||||
"rows":6
|
||||
},
|
||||
{
|
||||
"tree_item": "Generators/Bricks/Tiles",
|
||||
"type": "bricks",
|
||||
"icon": "tiles",
|
||||
"bevel": 0.05,
|
||||
"columns": 4,
|
||||
"mortar": 0.05,
|
||||
"row_offset": 0,
|
||||
"rows": 4
|
||||
},
|
||||
{
|
||||
"tree_item": "Generators/Bricks/BasketWeave",
|
||||
"type": "bricks",
|
||||
"icon": "basketweave",
|
||||
"bevel": 0.05,
|
||||
"columns": 2,
|
||||
"mortar": 0.05,
|
||||
"pattern": 3,
|
||||
"repeat": 2,
|
||||
"row_offset": 0,
|
||||
"rows": 2
|
||||
},
|
||||
{
|
||||
"tree_item": "Generators/Bricks/HerringBone",
|
||||
"type": "bricks",
|
||||
"icon": "herringbone",
|
||||
"bevel": 0.05,
|
||||
"columns": 2,
|
||||
"mortar": 0.05,
|
||||
"pattern": 2,
|
||||
"repeat": 2,
|
||||
"row_offset": 0,
|
||||
"rows": 2
|
||||
},
|
||||
{
|
||||
"tree_item": "Generators/Bricks/SpanishBond",
|
||||
"type": "bricks",
|
||||
"icon": "spanishbond",
|
||||
"bevel": 0.05,
|
||||
"columns": 2,
|
||||
"mortar": 0.05,
|
||||
"pattern": 4,
|
||||
"repeat": 2,
|
||||
"row_offset": 0,
|
||||
"rows": 2
|
||||
},
|
||||
{
|
||||
"tree_item":"Generators/Noise",
|
||||
"type":"noise",
|
||||
"icon":"noise",
|
||||
"size":4,
|
||||
"density":0.5
|
||||
},
|
||||
{
|
||||
"tree_item":"Generators/Perlin Noise",
|
||||
"type":"perlin",
|
||||
@ -101,26 +164,6 @@
|
||||
"type":"warp",
|
||||
"amount":0.5
|
||||
},
|
||||
{
|
||||
"tree_item": "Generators/Pattern/Checkerboard",
|
||||
"type": "pattern",
|
||||
"icon": "checkerboard",
|
||||
"mix": 4,
|
||||
"x_scale": 4,
|
||||
"x_wave": 2,
|
||||
"y_scale": 4,
|
||||
"y_wave": 2
|
||||
},
|
||||
{
|
||||
"tree_item": "Generators/Bricks/Tiles",
|
||||
"type": "bricks",
|
||||
"icon": "tiles",
|
||||
"bevel": 0.05,
|
||||
"columns": 4,
|
||||
"mortar": 0.05,
|
||||
"row_offset": 0,
|
||||
"rows": 4
|
||||
},
|
||||
{
|
||||
"tree_item": "Filters/Colorize/Invert",
|
||||
"type": "colorize",
|
||||
|
BIN
addons/procedural_material/library/base/basketweave.png
Normal file
BIN
addons/procedural_material/library/base/basketweave.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 294 B |
BIN
addons/procedural_material/library/base/herringbone.png
Normal file
BIN
addons/procedural_material/library/base/herringbone.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 298 B |
BIN
addons/procedural_material/library/base/noise.png
Normal file
BIN
addons/procedural_material/library/base/noise.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 643 B |
BIN
addons/procedural_material/library/base/spanishbond.png
Normal file
BIN
addons/procedural_material/library/base/spanishbond.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 326 B |
@ -1,23 +1,42 @@
|
||||
tool
|
||||
extends "res://addons/procedural_material/node_base.gd"
|
||||
|
||||
var size = 5
|
||||
var direction = 0
|
||||
var sigma = 1.0
|
||||
var epsilon = 0.005
|
||||
|
||||
var input_shader = ""
|
||||
var input_texture
|
||||
var mid_texture
|
||||
var final_texture
|
||||
|
||||
const DIRECTION_H = 1
|
||||
const DIRECTION_V = 2
|
||||
const DIRECTIONS = [
|
||||
{ name="Both", mask=DIRECTION_H|DIRECTION_V },
|
||||
{ name="X", mask=DIRECTION_H },
|
||||
{ name="Y", mask=DIRECTION_V }
|
||||
]
|
||||
|
||||
func _ready():
|
||||
# init size widget
|
||||
$HBoxContainer1/size.clear()
|
||||
for i in range(7):
|
||||
$HBoxContainer1/size.add_item(str(int(pow(2, 5+i))), i)
|
||||
$HBoxContainer1/size.selected = size
|
||||
# init direction widget
|
||||
$HBoxContainer2/direction.clear()
|
||||
for d in DIRECTIONS:
|
||||
$HBoxContainer2/direction.add_item(d.name)
|
||||
$HBoxContainer2/direction.selected = direction
|
||||
initialize_properties([ $HBoxContainer1/size, $HBoxContainer2/direction, $HBoxContainer3/sigma ])
|
||||
input_texture = ImageTexture.new()
|
||||
mid_texture = ImageTexture.new()
|
||||
final_texture = ImageTexture.new()
|
||||
initialize_properties([ $HBoxContainer1/epsilon, $HBoxContainer2/sigma ])
|
||||
|
||||
func get_gaussian_blur_shader(horizontal):
|
||||
var convolution = { x=0, y=0, kernel=[], epsilon=epsilon }
|
||||
var kernel_size = 10
|
||||
var convolution = { x=0, y=0, kernel=[], epsilon=1.0/pow(2, 5+size) }
|
||||
var kernel_size = 50
|
||||
if horizontal:
|
||||
convolution.x = kernel_size
|
||||
else:
|
||||
@ -33,13 +52,20 @@ func get_gaussian_blur_shader(horizontal):
|
||||
return get_convolution_shader(convolution)
|
||||
|
||||
func _rerender():
|
||||
get_parent().precalculate_shader(input_shader, get_source().get_textures(), 4096, input_texture, self, "pass_1", [])
|
||||
if DIRECTIONS[direction].mask & DIRECTION_H != 0:
|
||||
get_parent().precalculate_shader(input_shader, get_source().get_textures(), int(pow(2, 5+size)), input_texture, self, "pass_1", [])
|
||||
else:
|
||||
get_parent().precalculate_shader(input_shader, get_source().get_textures(), int(pow(2, 5+size)), mid_texture, self, "pass_2", [])
|
||||
|
||||
func pass_1():
|
||||
get_parent().precalculate_shader(get_gaussian_blur_shader(true), { input=input_texture}, 4096, mid_texture, self, "pass_2", [])
|
||||
if DIRECTIONS[direction].mask & DIRECTION_V != 0:
|
||||
get_parent().precalculate_shader(get_gaussian_blur_shader(true), { input=input_texture}, int(pow(2, 5+size)), mid_texture, self, "pass_2", [])
|
||||
else:
|
||||
get_parent().precalculate_shader(get_gaussian_blur_shader(true), { input=input_texture}, int(pow(2, 5+size)), final_texture, self, "rerender_targets", [])
|
||||
|
||||
|
||||
func pass_2():
|
||||
get_parent().precalculate_shader(get_gaussian_blur_shader(false), { input=mid_texture}, 4096, final_texture, self, "rerender_targets", [])
|
||||
get_parent().precalculate_shader(get_gaussian_blur_shader(false), { input=mid_texture}, int(pow(2, 5+size)), final_texture, self, "rerender_targets", [])
|
||||
|
||||
func get_textures():
|
||||
var list = {}
|
||||
|
@ -13,8 +13,8 @@ anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 153.0
|
||||
margin_bottom = 79.0
|
||||
margin_right = 175.0
|
||||
margin_bottom = 96.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
@ -41,8 +41,14 @@ slot/1/left_color = Color( 1, 1, 1, 1 )
|
||||
slot/1/right_enabled = false
|
||||
slot/1/right_type = 0
|
||||
slot/1/right_color = Color( 1, 1, 1, 1 )
|
||||
slot/2/left_enabled = false
|
||||
slot/2/left_type = 0
|
||||
slot/2/left_color = Color( 1, 1, 1, 1 )
|
||||
slot/2/right_enabled = false
|
||||
slot/2/right_type = 0
|
||||
slot/2/right_color = Color( 1, 1, 1, 1 )
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Size Flags", "Theme", "slot" ]
|
||||
_sections_unfolded = [ "Anchor", "Margin", "Size Flags", "Theme", "slot" ]
|
||||
|
||||
[node name="HBoxContainer1" type="HBoxContainer" parent="." index="0"]
|
||||
|
||||
@ -52,15 +58,16 @@ anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 16.0
|
||||
margin_top = 24.0
|
||||
margin_right = 136.0
|
||||
margin_bottom = 48.0
|
||||
margin_right = 158.0
|
||||
margin_bottom = 44.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
alignment = 0
|
||||
_sections_unfolded = [ "Size Flags" ]
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer1" index="0"]
|
||||
|
||||
@ -68,47 +75,48 @@ anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 5.0
|
||||
margin_right = 42.0
|
||||
margin_bottom = 19.0
|
||||
margin_top = 3.0
|
||||
margin_right = 63.0
|
||||
margin_bottom = 17.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
text = "Grid:"
|
||||
text = "Grid size:"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Size Flags" ]
|
||||
_sections_unfolded = [ "Anchor", "Margin", "Size Flags" ]
|
||||
|
||||
[node name="epsilon" type="SpinBox" parent="HBoxContainer1" index="1"]
|
||||
[node name="size" type="OptionButton" parent="HBoxContainer1" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 46.0
|
||||
margin_right = 120.0
|
||||
margin_bottom = 24.0
|
||||
margin_left = 67.0
|
||||
margin_right = 142.0
|
||||
margin_bottom = 20.0
|
||||
rect_min_size = Vector2( 75, 0 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_horizontal = 11
|
||||
size_flags_vertical = 1
|
||||
min_value = 0.001
|
||||
max_value = 0.01
|
||||
step = 0.001
|
||||
page = 0.0
|
||||
value = 0.005
|
||||
exp_edit = false
|
||||
rounded = false
|
||||
editable = true
|
||||
prefix = ""
|
||||
suffix = ""
|
||||
_sections_unfolded = [ "Caret", "Placeholder" ]
|
||||
toggle_mode = false
|
||||
action_mode = 0
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = false
|
||||
align = 0
|
||||
items = [ ]
|
||||
selected = -1
|
||||
_sections_unfolded = [ "Anchor", "Caret", "Placeholder", "Rect", "Size Flags" ]
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="." index="1"]
|
||||
|
||||
@ -117,25 +125,95 @@ anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 16.0
|
||||
margin_top = 48.0
|
||||
margin_right = 136.0
|
||||
margin_bottom = 72.0
|
||||
margin_top = 44.0
|
||||
margin_right = 158.0
|
||||
margin_bottom = 64.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
alignment = 0
|
||||
_sections_unfolded = [ "Size Flags" ]
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer2" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 3.0
|
||||
margin_right = 63.0
|
||||
margin_bottom = 17.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
text = "Direction:"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Size Flags" ]
|
||||
|
||||
[node name="direction" type="OptionButton" parent="HBoxContainer2" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 67.0
|
||||
margin_right = 142.0
|
||||
margin_bottom = 20.0
|
||||
rect_min_size = Vector2( 75, 0 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 11
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
action_mode = 0
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "Y"
|
||||
flat = false
|
||||
align = 0
|
||||
items = [ ]
|
||||
selected = 2
|
||||
_sections_unfolded = [ "Caret", "Placeholder", "Rect", "Size Flags" ]
|
||||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="." index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 16.0
|
||||
margin_top = 65.0
|
||||
margin_right = 158.0
|
||||
margin_bottom = 89.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
alignment = 0
|
||||
_sections_unfolded = [ "Size Flags" ]
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer3" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 5.0
|
||||
margin_right = 42.0
|
||||
margin_right = 63.0
|
||||
margin_bottom = 19.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
@ -149,24 +227,25 @@ lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Size Flags" ]
|
||||
|
||||
[node name="sigma" type="SpinBox" parent="HBoxContainer2" index="1"]
|
||||
[node name="sigma" type="SpinBox" parent="HBoxContainer3" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 46.0
|
||||
margin_right = 120.0
|
||||
margin_left = 67.0
|
||||
margin_right = 142.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 75, 0 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_horizontal = 11
|
||||
size_flags_vertical = 1
|
||||
min_value = 0.05
|
||||
max_value = 20.0
|
||||
step = 0.05
|
||||
max_value = 50.0
|
||||
step = 0.1
|
||||
page = 0.0
|
||||
value = 1.0
|
||||
exp_edit = false
|
||||
@ -174,6 +253,6 @@ rounded = false
|
||||
editable = true
|
||||
prefix = ""
|
||||
suffix = ""
|
||||
_sections_unfolded = [ "Caret", "Placeholder" ]
|
||||
_sections_unfolded = [ "Caret", "Placeholder", "Rect", "Size Flags" ]
|
||||
|
||||
|
||||
|
@ -8,13 +8,13 @@ func _get_shader_code(uv):
|
||||
return rv
|
||||
var src_code = src.get_shader_code(uv)
|
||||
if generated_variants.empty():
|
||||
rv.defs = src_code.defs+$Control.get_shader(name+"_gradient");
|
||||
rv.defs = src_code.defs+$Control.get_shader("%s_gradient" % name);
|
||||
var variant_index = generated_variants.find(uv)
|
||||
if variant_index == -1:
|
||||
variant_index = generated_variants.size()
|
||||
generated_variants.append(uv)
|
||||
rv.code = src_code.code+"vec3 "+name+"_"+str(variant_index)+"_rgb = "+name+"_gradient("+src_code.f+");\n"
|
||||
rv.rgb = name+"_"+str(variant_index)+"_rgb"
|
||||
rv.code = src_code.code+"vec3 %s_%d_rgb = %s_gradient(%s);\n" % [ name, variant_index, name, src_code.f ]
|
||||
rv.rgb = "%s_%d_rgb" % [ name, variant_index ]
|
||||
return rv
|
||||
|
||||
func serialize():
|
||||
|
@ -50,11 +50,11 @@ func _get_shader_code(uv):
|
||||
input_shader = do_generate_shader(src.get_shader_code("UV"))
|
||||
_rerender()
|
||||
if generated_variants.empty():
|
||||
rv.defs = "uniform sampler2D "+name+"_tex;\n"
|
||||
rv.defs = "uniform sampler2D %s_tex;\n" % [ name ]
|
||||
var variant_index = generated_variants.find(uv)
|
||||
if variant_index == -1:
|
||||
variant_index = generated_variants.size()
|
||||
generated_variants.append(uv)
|
||||
rv.code = "vec3 "+name+"_"+str(variant_index)+"_rgb = texture("+name+"_tex, "+uv+").rgb;\n"
|
||||
rv.rgb = name+"_"+str(variant_index)+"_rgb"
|
||||
rv.code = "vec3 %s_%d_rgb = texture(%s_tex, %s).rgb;\n" % [ name, variant_index, name, uv ]
|
||||
rv.rgb = "%s_%d_rgb" % [ name, variant_index ]
|
||||
return rv
|
||||
|
@ -14,7 +14,7 @@ func _get_shader_code(uv):
|
||||
func export_textures(prefix):
|
||||
var suffix = $Suffix.text
|
||||
if suffix != "":
|
||||
get_parent().export_texture(get_source(), prefix+"_"+suffix+".png", 1024)
|
||||
get_parent().export_texture(get_source(), "%s_%s.png" % [ prefix, suffix ], 1024)
|
||||
|
||||
func serialize():
|
||||
var data = .serialize()
|
||||
|
@ -11,8 +11,8 @@ anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 114.0
|
||||
margin_bottom = 55.0
|
||||
margin_right = 90.0
|
||||
margin_bottom = 53.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
@ -44,7 +44,7 @@ anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 16.0
|
||||
margin_top = 24.0
|
||||
margin_right = 98.0
|
||||
margin_right = 74.0
|
||||
margin_bottom = 48.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
|
@ -22,20 +22,21 @@ func get_textures():
|
||||
func _get_shader_code(uv):
|
||||
var rv = { defs="", code="" }
|
||||
if generated_variants.empty():
|
||||
rv.defs = "uniform sampler2D "+name+"_tex;\n"
|
||||
rv.defs = "uniform sampler2D %s_tex;\n" % [ name ]
|
||||
var variant_index = generated_variants.find(uv)
|
||||
if variant_index == -1:
|
||||
variant_index = generated_variants.size()
|
||||
generated_variants.append(uv)
|
||||
rv.code = "vec3 "+name+"_"+str(variant_index)+"_rgb = texture("+name+"_tex, "+uv+").rgb;\n"
|
||||
rv.rgb = name+"_"+str(variant_index)+"_rgb"
|
||||
rv.code = "vec3 %s_%d_rgb = texture(%s_tex, %s).rgb;\n" % [ name, variant_index, name, uv ]
|
||||
rv.rgb = "%s_%d_rgb" % [ name, variant_index ]
|
||||
return rv
|
||||
|
||||
func _on_TextureButton_pressed():
|
||||
var dialog = EditorFileDialog.new()
|
||||
var dialog = FileDialog.new()
|
||||
add_child(dialog)
|
||||
dialog.access = EditorFileDialog.ACCESS_FILESYSTEM
|
||||
dialog.mode = EditorFileDialog.MODE_OPEN_FILE
|
||||
dialog.rect_min_size = Vector2(500, 500)
|
||||
dialog.access = FileDialog.ACCESS_FILESYSTEM
|
||||
dialog.mode = FileDialog.MODE_OPEN_FILE
|
||||
dialog.add_filter("*.png;PNG image")
|
||||
dialog.add_filter("*.jpg;JPG image")
|
||||
dialog.connect("file_selected", self, "set_texture")
|
||||
|
@ -6,7 +6,7 @@
|
||||
[sub_resource type="Theme" id=1]
|
||||
|
||||
|
||||
[node name="Image" type="GraphNode"]
|
||||
[node name="Image" type="GraphNode" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
|
@ -99,4 +99,4 @@ func do_update_materials(material_list):
|
||||
|
||||
func export_textures(prefix):
|
||||
for t in TEXTURE_LIST:
|
||||
get_parent().export_texture(get_source(t.port), prefix+"_"+t.texture+".png", 1024)
|
||||
get_parent().export_texture(get_source(t.port), "%s_%s.png" % [ prefix, t.texture ], 1024)
|
||||
|
28
addons/procedural_material/nodes/noise.gd
Normal file
28
addons/procedural_material/nodes/noise.gd
Normal file
@ -0,0 +1,28 @@
|
||||
tool
|
||||
extends "res://addons/procedural_material/node_base.gd"
|
||||
|
||||
var size = 4
|
||||
var density = 0.5
|
||||
|
||||
func _ready():
|
||||
$HBoxContainer1/size.clear()
|
||||
for i in range(7):
|
||||
$HBoxContainer1/size.add_item(str(int(pow(2, 5+i))), i)
|
||||
$HBoxContainer1/size.selected = size
|
||||
initialize_properties([ $HBoxContainer1/size, $HBoxContainer2/density ])
|
||||
print(size)
|
||||
|
||||
func _get_shader_code(uv):
|
||||
var rv = { defs="", code="" }
|
||||
if generated_variants.empty():
|
||||
rv.defs = "float %s_f(vec2 uv) { return dots(uv, %.9f, %.9f, %d); }\n" % [ name, 1.0/pow(2.0, 5.0+size), density, get_seed() ]
|
||||
var variant_index = generated_variants.find(uv)
|
||||
if variant_index == -1:
|
||||
variant_index = generated_variants.size()
|
||||
generated_variants.append(uv)
|
||||
rv.code = "float %s_%d_f = %s_f(%s);\n" % [ name, variant_index, name, uv ]
|
||||
rv.f = "%s_%d_f" % [ name, variant_index ]
|
||||
return rv
|
||||
|
||||
func _on_offset_changed():
|
||||
update_shaders()
|
182
addons/procedural_material/nodes/noise.tscn
Normal file
182
addons/procedural_material/nodes/noise.tscn
Normal file
@ -0,0 +1,182 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/procedural_material/nodes/noise.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="Theme" id=1]
|
||||
|
||||
|
||||
[node name="Dots" type="GraphNode" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 1.0
|
||||
margin_top = 2.0
|
||||
margin_right = 172.0
|
||||
margin_bottom = 83.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
theme = SubResource( 1 )
|
||||
title = "Noise"
|
||||
offset = Vector2( 0, 0 )
|
||||
show_close = true
|
||||
resizable = false
|
||||
selected = false
|
||||
comment = false
|
||||
overlay = 0
|
||||
slot/0/left_enabled = false
|
||||
slot/0/left_type = 0
|
||||
slot/0/left_color = Color( 0.5, 0.5, 1, 1 )
|
||||
slot/0/right_enabled = true
|
||||
slot/0/right_type = 0
|
||||
slot/0/right_color = Color( 0.5, 0.5, 1, 1 )
|
||||
slot/1/left_enabled = false
|
||||
slot/1/left_type = 0
|
||||
slot/1/left_color = Color( 1, 1, 1, 1 )
|
||||
slot/1/right_enabled = false
|
||||
slot/1/right_type = 0
|
||||
slot/1/right_color = Color( 1, 1, 1, 1 )
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Theme" ]
|
||||
|
||||
[node name="HBoxContainer1" type="HBoxContainer" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 16.0
|
||||
margin_top = 24.0
|
||||
margin_right = 156.0
|
||||
margin_bottom = 44.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
alignment = 0
|
||||
|
||||
[node name="Label1" type="Label" parent="HBoxContainer1" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 3.0
|
||||
margin_right = 61.0
|
||||
margin_bottom = 17.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
text = "Grid size:"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="size" type="OptionButton" parent="HBoxContainer1" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 65.0
|
||||
margin_right = 140.0
|
||||
margin_bottom = 20.0
|
||||
rect_min_size = Vector2( 75, 0 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
action_mode = 0
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "1024"
|
||||
flat = false
|
||||
align = 0
|
||||
items = [ "32", null, false, 0, null, "64", null, false, 1, null, "128", null, false, 2, null, "256", null, false, 3, null, "512", null, false, 4, null, "1024", null, false, 5, null, "2048", null, false, 6, null ]
|
||||
selected = 5
|
||||
_sections_unfolded = [ "Caret", "Placeholder" ]
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="." index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 16.0
|
||||
margin_top = 44.0
|
||||
margin_right = 156.0
|
||||
margin_bottom = 68.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
alignment = 0
|
||||
|
||||
[node name="Label2" type="Label" parent="HBoxContainer2" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 5.0
|
||||
margin_right = 61.0
|
||||
margin_bottom = 19.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
text = "Density:"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="density" type="SpinBox" parent="HBoxContainer2" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 65.0
|
||||
margin_right = 140.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 75, 0 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
min_value = 0.0
|
||||
max_value = 1.0
|
||||
step = 0.05
|
||||
page = 0.0
|
||||
value = 0.5
|
||||
exp_edit = false
|
||||
rounded = false
|
||||
editable = true
|
||||
prefix = ""
|
||||
suffix = ""
|
||||
_sections_unfolded = [ "Caret", "Placeholder" ]
|
||||
|
||||
[connection signal="offset_changed" from="." to="." method="_on_offset_changed"]
|
||||
|
||||
|
@ -49,11 +49,11 @@ func _get_shader_code(uv):
|
||||
input_shader = do_generate_shader(src.get_shader_code("UV"))
|
||||
_rerender()
|
||||
if generated_variants.empty():
|
||||
rv.defs = "uniform sampler2D "+name+"_tex;\n"
|
||||
rv.defs = "uniform sampler2D %s_tex;\n" % [ name ]
|
||||
var variant_index = generated_variants.find(uv)
|
||||
if variant_index == -1:
|
||||
variant_index = generated_variants.size()
|
||||
generated_variants.append(uv)
|
||||
rv.code = "vec3 "+name+"_"+str(variant_index)+"_rgb = texture("+name+"_tex, "+uv+").rgb;\n"
|
||||
rv.rgb = name+"_"+str(variant_index)+"_rgb"
|
||||
rv.code = "vec3 %s_%d_rgb = texture(%s_tex, %s).rgb;\n" % [ name, variant_index, name, uv ]
|
||||
rv.rgb = "%s_%d_rgb" % [ name, variant_index ]
|
||||
return rv
|
||||
|
@ -13,13 +13,13 @@ func _ready():
|
||||
func _get_shader_code(uv):
|
||||
var rv = { defs="", code="" }
|
||||
if generated_variants.empty():
|
||||
rv.defs = "float "+name+"_f(vec2 uv) { return perlin(uv, vec2(%f, %f), %d, %.9f, %d); }\n" % [ scale_x, scale_y, iterations, persistence, get_seed() ]
|
||||
rv.defs = "float %s_f(vec2 uv) { return perlin(uv, vec2(%f, %f), %d, %.9f, %d); }\n" % [ name, scale_x, scale_y, iterations, persistence, get_seed() ]
|
||||
var variant_index = generated_variants.find(uv)
|
||||
if variant_index == -1:
|
||||
variant_index = generated_variants.size()
|
||||
generated_variants.append(uv)
|
||||
rv.code = "float "+name+"_"+str(variant_index)+"_f = "+name+"_f("+uv+");\n"
|
||||
rv.f = name+"_"+str(variant_index)+"_f"
|
||||
rv.code = "float %s_%d_f = %s_f(%s);\n" % [ name, variant_index, name, uv ]
|
||||
rv.f = "%s_%d_f" % [ name, variant_index ]
|
||||
return rv
|
||||
|
||||
func _on_offset_changed():
|
||||
|
@ -5,7 +5,7 @@
|
||||
[sub_resource type="Theme" id=1]
|
||||
|
||||
|
||||
[node name="Perlin" type="GraphNode"]
|
||||
[node name="Perlin" type="GraphNode" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
|
@ -17,10 +17,10 @@ func _get_shader_code(uv):
|
||||
var src = get_source()
|
||||
if src == null:
|
||||
return rv
|
||||
rv.uv = name+"_uv("+uv+")"
|
||||
rv.uv = "%s_uv(%s)" % [ name, uv ]
|
||||
var src_code = src.get_shader_code(rv.uv)
|
||||
if !generated:
|
||||
rv.defs = src_code.defs+"vec2 "+name+"_uv(vec2 uv) { return %s(uv, vec2(%.9f, %.9f), %.9f, vec2(%.9f, %.9f)); }\n" % [ "transform_repeat" if repeat else "transform_norepeat", translate_x, translate_y, PI*rotate/180.0, scale_x, scale_y ]
|
||||
rv.defs = src_code.defs+"vec2 %s_uv(vec2 uv) { return %s(uv, vec2(%.9f, %.9f), %.9f, vec2(%.9f, %.9f)); }\n" % [ name, "transform_repeat" if repeat else "transform_norepeat", translate_x, translate_y, PI*rotate/180.0, scale_x, scale_y ]
|
||||
generated = true
|
||||
rv.code = src_code.code;
|
||||
if src_code.has("f"):
|
||||
|
@ -12,18 +12,18 @@ func _ready():
|
||||
func _get_shader_code(uv, slot = 0):
|
||||
var rv = { defs="", code="" }
|
||||
if generated_variants.empty():
|
||||
rv.defs = "vec4 "+name+"_xyzw(vec2 uv) { return voronoi(uv, vec2(%f, %f), %.9f, %d); }\n" % [ scale_x, scale_y, intensity, get_seed() ]
|
||||
rv.defs = "vec4 %s_xyzw(vec2 uv) { return voronoi(uv, vec2(%f, %f), %.9f, %d); }\n" % [ name, scale_x, scale_y, intensity, get_seed() ]
|
||||
var variant_index = generated_variants.find(uv)
|
||||
if variant_index == -1:
|
||||
variant_index = generated_variants.size()
|
||||
generated_variants.append(uv)
|
||||
rv.code = "vec4 "+name+"_"+str(variant_index)+"_xyzw = "+name+"_xyzw("+uv+");\n"
|
||||
rv.code = "vec4 %s_%d_xyzw = %s_xyzw(%s);\n" % [ name, variant_index, name, uv ]
|
||||
if slot == 0:
|
||||
rv.f = name+"_"+str(variant_index)+"_xyzw.z"
|
||||
rv.f = "%s_%d_xyzw.z" % [ name, variant_index ]
|
||||
elif slot == 1:
|
||||
rv.f = name+"_"+str(variant_index)+"_xyzw.w"
|
||||
rv.f = "%s_%d_xyzw.w" % [ name, variant_index ]
|
||||
else:
|
||||
rv.rgb = "rand3(fract("+name+"_"+str(variant_index)+"_xyzw.xy))"
|
||||
rv.rgb = "rand3(fract(%s_%d_xyzw.xy))" % [ name, variant_index ]
|
||||
return rv
|
||||
|
||||
func _on_offset_changed():
|
||||
|
@ -24,12 +24,12 @@ func _get_shader_code(uv):
|
||||
var src1_code3 = src1.get_shader_code(uv+"-vec2(0.0, 0.01)")
|
||||
rv.defs = src1_code0.defs
|
||||
rv.code = src1_code0.code+src1_code1.code+src1_code2.code+src1_code3.code
|
||||
rv.code += "vec2 "+name+"_"+str(variant_index)+"_uv = "+uv+"+%.9f*vec2((%s)-(%s), (%s)-(%s));\n" % [ amount, src1_code0.f, src1_code1.f, src1_code2.f, src1_code3.f ]
|
||||
var src0_code = src0.get_shader_code(name+"_"+str(variant_index)+"_uv")
|
||||
rv.code += "vec2 %s_%d_uv = %s+%.9f*vec2((%s)-(%s), (%s)-(%s));\n" % [ name, variant_index, uv, amount, src1_code0.f, src1_code1.f, src1_code2.f, src1_code3.f ]
|
||||
var src0_code = src0.get_shader_code("%s_%d_uv" % [ name, variant_index ])
|
||||
rv.defs += src0_code.defs
|
||||
rv.code += src0_code.code
|
||||
rv.code += "vec3 "+name+"_"+str(variant_index)+"_rgb = "+get_source_rgb(src0_code)+";\n"
|
||||
rv.code += "float "+name+"_"+str(variant_index)+"_f = "+get_source_f(src0_code)+";\n"
|
||||
rv.rgb = name+"_"+str(variant_index)+"_rgb"
|
||||
rv.f = name+"_"+str(variant_index)+"_f"
|
||||
rv.code += "vec3 %s_%d_rgb = %s;\n" % [ name, variant_index, src0_code.rgb ]
|
||||
rv.code += "float %s_%d_f = %s;\n" % [ name, variant_index, src0_code.f ]
|
||||
rv.rgb = "%s_%d_rgb" % [ name, variant_index ]
|
||||
rv.f = "%s_%d_f" % [ name, variant_index ]
|
||||
return rv
|
||||
|
@ -5,7 +5,7 @@
|
||||
[sub_resource type="Theme" id=1]
|
||||
|
||||
|
||||
[node name="Warp" type="GraphNode"]
|
||||
[node name="Warp" type="GraphNode" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
@ -58,7 +58,7 @@ anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 16.0
|
||||
margin_top = 24.0
|
||||
margin_right = 74.0
|
||||
margin_right = 90.0
|
||||
margin_bottom = 38.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
@ -79,7 +79,7 @@ anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 16.0
|
||||
margin_top = 38.0
|
||||
margin_right = 74.0
|
||||
margin_right = 90.0
|
||||
margin_bottom = 52.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
@ -92,7 +92,7 @@ percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="amount" type="LineEdit" parent="." index="2"]
|
||||
[node name="amount" type="SpinBox" parent="." index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
@ -100,22 +100,24 @@ anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 16.0
|
||||
margin_top = 53.0
|
||||
margin_right = 74.0
|
||||
margin_right = 90.0
|
||||
margin_bottom = 77.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
text = "0.5"
|
||||
focus_mode = 2
|
||||
context_menu_enabled = true
|
||||
placeholder_alpha = 0.6
|
||||
caret_blink = false
|
||||
caret_blink_speed = 0.65
|
||||
caret_position = 0
|
||||
min_value = 0.0
|
||||
max_value = 1.0
|
||||
step = 0.05
|
||||
page = 0.0
|
||||
value = 0.5
|
||||
exp_edit = false
|
||||
rounded = false
|
||||
editable = true
|
||||
prefix = ""
|
||||
suffix = ""
|
||||
_sections_unfolded = [ "Caret", "Placeholder" ]
|
||||
|
||||
[connection signal="close_request" from="." to="." method="queue_free"]
|
||||
|
@ -1,3 +1,4 @@
|
||||
tool
|
||||
extends WindowDialog
|
||||
|
||||
signal ok
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/procedural_material/widgets/line_dialog.gd" type="Script" id=1]
|
||||
|
||||
[node name="LineDialog" type="WindowDialog"]
|
||||
[node name="LineDialog" type="WindowDialog" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
@ -79,14 +79,13 @@ caret_position = 0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer" index="2"]
|
||||
|
||||
anchor_left = 0.5
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.5
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -62.0
|
||||
margin_top = 49.0
|
||||
margin_right = 62.0
|
||||
margin_bottom = 69.0
|
||||
margin_top = 46.0
|
||||
margin_right = 124.0
|
||||
margin_bottom = 66.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 1
|
||||
|
@ -1 +1 @@
|
||||
{"connections":[{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"pattern_0","from_port":0,"to":"transform_0","to_port":0},{"from":"transform_0","from_port":0,"to":"transform_1","to_port":0},{"from":"transform_0","from_port":0,"to":"blend_0","to_port":0},{"from":"transform_1","from_port":0,"to":"blend_0","to_port":1},{"from":"blend_0","from_port":0,"to":"transform_2","to_port":0},{"from":"transform_2","from_port":0,"to":"colorize_2","to_port":0},{"from":"bricks_0","from_port":0,"to":"blend_1","to_port":0},{"from":"colorize_2","from_port":0,"to":"blend_1","to_port":1},{"from":"blend_1","from_port":0,"to":"blend_2","to_port":0},{"from":"transform_2","from_port":0,"to":"colorize_3","to_port":0},{"from":"colorize_3","from_port":0,"to":"blend_2","to_port":1},{"from":"perlin_1","from_port":0,"to":"colorize_5","to_port":0},{"from":"perlin_1","from_port":0,"to":"colorize_6","to_port":0},{"from":"colorize_5","from_port":0,"to":"blend_3","to_port":0},{"from":"colorize_6","from_port":0,"to":"blend_3","to_port":1},{"from":"blend_1","from_port":0,"to":"blend_3","to_port":2},{"from":"blend_2","from_port":0,"to":"blend_4","to_port":1},{"from":"perlin_1","from_port":0,"to":"blend_4","to_port":0},{"from":"uniform_0","from_port":0,"to":"Material","to_port":1},{"from":"uniform_1","from_port":0,"to":"Material","to_port":2},{"from":"blend_4","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"normal_map_0","to_port":0},{"from":"perlin_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"blend_5","from_port":0,"to":"Material","to_port":0},{"from":"colorize_3","from_port":0,"to":"blend_5","to_port":2},{"from":"blend_3","from_port":0,"to":"blend_5","to_port":1},{"from":"colorize_1","from_port":0,"to":"blend_5","to_port":0}],"nodes":[{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"emission_energy":1,"metallic":1,"name":"Material","node_position":{"x":916,"y":424},"roughness":1,"type":"material"},{"mix":0,"name":"pattern_0","node_position":{"x":-358,"y":630},"type":"pattern","x_scale":1,"x_wave":0,"y_scale":1,"y_wave":0},{"name":"transform_0","node_position":{"x":-349,"y":730},"repeat":false,"rotate":0,"scale_x":0.5,"scale_y":1,"translate_x":0,"translate_y":0,"type":"transform"},{"name":"transform_1","node_position":{"x":-147,"y":781},"repeat":true,"rotate":90,"scale_x":1,"scale_y":1,"translate_x":0,"translate_y":0,"type":"transform"},{"amount":1,"blend_type":9,"name":"blend_0","node_position":{"x":-127,"y":673},"type":"blend"},{"name":"transform_2","node_position":{"x":49,"y":634},"repeat":true,"rotate":0,"scale_x":0.5,"scale_y":0.5,"translate_x":0,"translate_y":0,"type":"transform"},{"bevel":0.05,"columns":6,"mortar":0.05,"name":"bricks_0","node_position":{"x":-146,"y":455},"row_offset":0,"rows":6,"type":"bricks"},{"gradient":[{"b":1,"g":1,"pos":0.5,"r":1},{"b":0,"g":0,"pos":0.6,"r":0}],"name":"colorize_2","node_position":{"x":63,"y":549},"type":"colorize"},{"iterations":7,"name":"perlin_1","node_position":{"x":-146,"y":108},"persistence":0.95,"scale_x":4,"scale_y":4,"type":"perlin"},{"amount":0.65,"name":"normal_map_0","node_position":{"x":706,"y":533},"type":"normal_map"},{"color":{"a":1,"b":0.554688,"g":0.554688,"r":0.554688,"type":"Color"},"name":"uniform_1","node_position":{"x":727.308594,"y":472},"type":"uniform"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_0","node_position":{"x":630.308655,"y":598},"type":"colorize"},{"gradient":[{"b":0,"g":0.071615,"pos":0,"r":0.208333},{"b":0,"g":0.42041,"pos":0.936364,"r":0.640625}],"name":"colorize_5","node_position":{"x":95,"y":85},"type":"colorize"},{"gradient":[{"b":0.583333,"g":0.583333,"pos":0,"r":0.583333},{"b":0.244792,"g":0.244792,"pos":1,"r":0.244792}],"name":"colorize_6","node_position":{"x":95,"y":159},"type":"colorize"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0.78125},{"b":0,"g":0,"pos":1,"r":0.25}],"name":"colorize_1","node_position":{"x":101.308655,"y":249},"type":"colorize"},{"amount":1,"blend_type":9,"name":"blend_2","node_position":{"x":294,"y":514},"type":"blend"},{"amount":1,"blend_type":10,"name":"blend_1","node_position":{"x":115,"y":425},"type":"blend"},{"gradient":[{"b":0,"g":0,"pos":0.609091,"r":0},{"b":1,"g":1,"pos":0.663636,"r":1}],"name":"colorize_3","node_position":{"x":280,"y":637},"type":"colorize"},{"amount":0.5,"blend_type":0,"name":"blend_3","node_position":{"x":294.308655,"y":144},"type":"blend"},{"amount":0.5,"blend_type":0,"name":"blend_5","node_position":{"x":490.308655,"y":309},"type":"blend"},{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"},"name":"uniform_0","node_position":{"x":700.308594,"y":404},"type":"uniform"},{"amount":0.5,"blend_type":0,"name":"blend_4","node_position":{"x":489.308655,"y":477},"type":"blend"}]}
|
||||
{"connections":[{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"pattern_0","from_port":0,"to":"transform_0","to_port":0},{"from":"transform_0","from_port":0,"to":"transform_1","to_port":0},{"from":"transform_0","from_port":0,"to":"blend_0","to_port":0},{"from":"transform_1","from_port":0,"to":"blend_0","to_port":1},{"from":"blend_0","from_port":0,"to":"transform_2","to_port":0},{"from":"transform_2","from_port":0,"to":"colorize_2","to_port":0},{"from":"bricks_0","from_port":0,"to":"blend_1","to_port":0},{"from":"colorize_2","from_port":0,"to":"blend_1","to_port":1},{"from":"blend_1","from_port":0,"to":"blend_2","to_port":0},{"from":"transform_2","from_port":0,"to":"colorize_3","to_port":0},{"from":"colorize_3","from_port":0,"to":"blend_2","to_port":1},{"from":"perlin_1","from_port":0,"to":"colorize_5","to_port":0},{"from":"perlin_1","from_port":0,"to":"colorize_6","to_port":0},{"from":"colorize_5","from_port":0,"to":"blend_3","to_port":0},{"from":"colorize_6","from_port":0,"to":"blend_3","to_port":1},{"from":"blend_1","from_port":0,"to":"blend_3","to_port":2},{"from":"blend_2","from_port":0,"to":"blend_4","to_port":1},{"from":"perlin_1","from_port":0,"to":"blend_4","to_port":0},{"from":"uniform_0","from_port":0,"to":"Material","to_port":1},{"from":"blend_4","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"normal_map_0","to_port":0},{"from":"perlin_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"blend_5","from_port":0,"to":"Material","to_port":0},{"from":"colorize_3","from_port":0,"to":"blend_5","to_port":2},{"from":"blend_3","from_port":0,"to":"blend_5","to_port":1},{"from":"colorize_1","from_port":0,"to":"blend_5","to_port":0},{"from":"blend_4","from_port":0,"to":"colorize_4","to_port":0},{"from":"colorize_4","from_port":0,"to":"Material","to_port":2}],"nodes":[{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"name":"Material","node_position":{"x":916,"y":424},"normal_scale":1,"roughness":1,"type":"material"},{"name":"transform_1","node_position":{"x":-147,"y":781},"repeat":true,"rotate":90,"scale_x":1,"scale_y":1,"translate_x":0,"translate_y":0,"type":"transform"},{"gradient":[{"b":1,"g":1,"pos":0.7,"r":1},{"b":0,"g":0,"pos":0.754545,"r":0}],"name":"colorize_2","node_position":{"x":63,"y":549},"type":"colorize"},{"iterations":7,"name":"perlin_1","node_position":{"x":-146,"y":108},"persistence":0.95,"scale_x":4,"scale_y":4,"type":"perlin"},{"amount":0.25,"name":"normal_map_0","node_position":{"x":706,"y":533},"type":"normal_map"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_0","node_position":{"x":630.308655,"y":598},"type":"colorize"},{"gradient":[{"b":0,"g":0.071615,"pos":0,"r":0.208333},{"b":0,"g":0.42041,"pos":0.936364,"r":0.640625}],"name":"colorize_5","node_position":{"x":95,"y":85},"type":"colorize"},{"gradient":[{"b":0.583333,"g":0.583333,"pos":0,"r":0.583333},{"b":0.244792,"g":0.244792,"pos":1,"r":0.244792}],"name":"colorize_6","node_position":{"x":95,"y":159},"type":"colorize"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0.78125},{"b":0,"g":0,"pos":1,"r":0.25}],"name":"colorize_1","node_position":{"x":101.308655,"y":249},"type":"colorize"},{"amount":1,"blend_type":9,"name":"blend_2","node_position":{"x":294,"y":514},"type":"blend"},{"amount":1,"blend_type":10,"name":"blend_1","node_position":{"x":115,"y":425},"type":"blend"},{"amount":0.5,"blend_type":0,"name":"blend_3","node_position":{"x":294.308655,"y":144},"type":"blend"},{"amount":0.5,"blend_type":0,"name":"blend_5","node_position":{"x":490.308655,"y":309},"type":"blend"},{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"},"name":"uniform_0","node_position":{"x":700.308594,"y":404},"type":"uniform"},{"amount":0.5,"blend_type":0,"name":"blend_4","node_position":{"x":489.308655,"y":477},"type":"blend"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0.229167,"g":0.229167,"pos":1,"r":0.229167}],"name":"colorize_4","node_position":{"x":701,"y":469},"type":"colorize"},{"bevel":0.03,"columns":6,"mortar":0.01,"name":"bricks_0","node_position":{"x":-146,"y":455},"row_offset":0,"rows":6,"type":"bricks"},{"gradient":[{"b":0,"g":0,"pos":0.718182,"r":0},{"b":1,"g":1,"pos":0.781818,"r":1}],"name":"colorize_3","node_position":{"x":280,"y":637},"type":"colorize"},{"name":"transform_2","node_position":{"x":49,"y":634},"repeat":true,"rotate":0,"scale_x":0.5,"scale_y":0.5,"translate_x":0,"translate_y":0,"type":"transform"},{"mix":0,"name":"pattern_0","node_position":{"x":-358,"y":630},"type":"pattern","x_scale":1,"x_wave":0,"y_scale":1,"y_wave":0},{"name":"transform_0","node_position":{"x":-349,"y":730},"repeat":false,"rotate":0,"scale_x":0.5,"scale_y":1,"translate_x":0,"translate_y":0,"type":"transform"},{"amount":1,"blend_type":9,"name":"blend_0","node_position":{"x":-127,"y":673},"type":"blend"}]}
|
1
examples/marble.ptex
Normal file
1
examples/marble.ptex
Normal file
@ -0,0 +1 @@
|
||||
{"connections":[{"from":"perlin_0","from_port":0,"to":"warp_0","to_port":1},{"from":"warp_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"pattern_1","from_port":0,"to":"warp_1","to_port":0},{"from":"perlin_0","from_port":0,"to":"warp_1","to_port":1},{"from":"warp_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"colorize_0","from_port":0,"to":"blend_0","to_port":0},{"from":"colorize_1","from_port":0,"to":"blend_0","to_port":1},{"from":"blend_0","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"Material","to_port":0},{"from":"colorize_3","from_port":0,"to":"Material","to_port":2},{"from":"uniform_0","from_port":0,"to":"Material","to_port":1},{"from":"blend_1","from_port":0,"to":"colorize_3","to_port":0},{"from":"blend_0","from_port":0,"to":"blend_1","to_port":1},{"from":"perlin_1","from_port":0,"to":"colorize_4","to_port":0},{"from":"colorize_4","from_port":0,"to":"blend_1","to_port":0},{"from":"voronoi_0","from_port":0,"to":"warp_0","to_port":0}],"nodes":[{"mix":0,"name":"pattern_1","node_position":{"x":15,"y":492},"type":"pattern","x_scale":8,"x_wave":0,"y_scale":0,"y_wave":4},{"gradient":[{"b":1,"g":1,"pos":0.035714,"r":1},{"b":0,"g":0,"pos":0.142857,"r":0},{"b":1,"g":1,"pos":0.258929,"r":1},{"b":0,"g":0,"pos":0.535714,"r":0},{"b":1,"g":1,"pos":0.723214,"r":1},{"b":0,"g":0,"pos":0.848214,"r":0},{"b":1,"g":1,"pos":0.982143,"r":1}],"name":"colorize_1","node_position":{"x":349,"y":386},"type":"colorize"},{"amount":1,"name":"warp_1","node_position":{"x":257,"y":418},"type":"warp"},{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"},"name":"uniform_0","node_position":{"x":484,"y":126},"type":"uniform"},{"amount":0.9,"blend_type":0,"name":"blend_1","node_position":{"x":297,"y":130},"type":"blend"},{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"name":"Material","node_position":{"x":676,"y":101},"normal_scale":1,"roughness":1,"type":"material"},{"intensity":1,"name":"voronoi_0","node_position":{"x":8,"y":178},"scale_x":8,"scale_y":4,"type":"voronoi"},{"gradient":[{"b":1,"g":1,"pos":0.017857,"r":1},{"b":0,"g":0,"pos":0.125,"r":0},{"b":1,"g":1,"pos":0.241071,"r":1},{"b":1,"g":1,"pos":0.455357,"r":1},{"b":0,"g":0,"pos":0.616071,"r":0},{"b":1,"g":1,"pos":0.723214,"r":1},{"b":1,"g":1,"pos":0.857143,"r":1},{"b":0,"g":0,"pos":0.946429,"r":0},{"b":1,"g":1,"pos":0.982143,"r":1}],"name":"colorize_0","node_position":{"x":349,"y":309},"type":"colorize"},{"iterations":9,"name":"perlin_1","node_position":{"x":-264,"y":25},"persistence":1,"scale_x":16,"scale_y":16,"type":"perlin"},{"gradient":[{"b":0,"g":0,"pos":0.190909,"r":0},{"b":1,"g":1,"pos":0.463636,"r":1}],"name":"colorize_4","node_position":{"x":24,"y":81},"type":"colorize"},{"iterations":4,"name":"perlin_0","node_position":{"x":15,"y":328},"persistence":0.5,"scale_x":4,"scale_y":4,"type":"perlin"},{"amount":0.8,"name":"warp_0","node_position":{"x":246,"y":306},"type":"warp"},{"gradient":[{"b":0.744792,"g":0.744792,"pos":0,"r":0.744792},{"b":0.4375,"g":0.4375,"pos":1,"r":0.4375}],"name":"colorize_3","node_position":{"x":474,"y":193},"type":"colorize"},{"amount":0.65,"blend_type":0,"name":"blend_0","node_position":{"x":544,"y":339},"type":"blend"},{"gradient":[{"b":0.791667,"g":0.908854,"pos":0,"r":1},{"b":0.84375,"g":0.931641,"pos":0.236364,"r":1},{"b":1,"g":1,"pos":1,"r":1}],"name":"colorize_2","node_position":{"x":765,"y":404},"type":"colorize"}]}
|
1
examples/metal_pattern_3.ptex
Normal file
1
examples/metal_pattern_3.ptex
Normal file
@ -0,0 +1 @@
|
||||
{"connections":[{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"pattern_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"pattern_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"colorize_0","from_port":0,"to":"blend_0","to_port":1},{"from":"colorize_1","from_port":0,"to":"blend_0","to_port":0},{"from":"blend_0","from_port":0,"to":"normal_map_0","to_port":0},{"from":"uniform_0","from_port":0,"to":"Material","to_port":0},{"from":"uniform_1","from_port":0,"to":"Material","to_port":1},{"from":"uniform_2","from_port":0,"to":"Material","to_port":2}],"nodes":[{"mix":0,"name":"pattern_0","node_position":{"x":-108,"y":304},"type":"pattern","x_scale":16,"x_wave":0,"y_scale":16,"y_wave":0},{"mix":3,"name":"pattern_1","node_position":{"x":-115,"y":188},"type":"pattern","x_scale":1,"x_wave":1,"y_scale":1,"y_wave":1},{"gradient":[{"b":0,"g":0,"pos":0.236364,"r":0},{"b":1,"g":1,"pos":0.263636,"r":1}],"name":"colorize_1","node_position":{"x":119,"y":186},"type":"colorize"},{"gradient":[{"b":0.546875,"g":0.546875,"pos":0.845455,"r":0.546875},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_0","node_position":{"x":124,"y":298},"type":"colorize"},{"amount":1,"blend_type":9,"name":"blend_0","node_position":{"x":331,"y":210},"type":"blend"},{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"name":"Material","node_position":{"x":669,"y":81},"normal_scale":1,"roughness":1,"type":"material"},{"amount":0.5,"name":"normal_map_0","node_position":{"x":522,"y":205},"type":"normal_map"},{"color":{"a":1,"b":0.855469,"g":0.736813,"r":0.51796,"type":"Color"},"name":"uniform_0","node_position":{"x":507,"y":21},"type":"uniform"},{"color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"name":"uniform_1","node_position":{"x":510,"y":73},"type":"uniform"},{"color":{"a":1,"b":0.632813,"g":0.632813,"r":0.632813,"type":"Color"},"name":"uniform_2","node_position":{"x":513,"y":126},"type":"uniform"}]}
|
@ -1 +1 @@
|
||||
{"connections":[{"from":"Warp","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"blend_0","to_port":2},{"from":"colorize_1","from_port":0,"to":"blend_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"blend_0","to_port":1},{"from":"blend_0","from_port":0,"to":"Material","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"Bricks","from_port":0,"to":"Warp","to_port":0},{"from":"blend_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"Bricks","from_port":1,"to":"blend_1","to_port":1},{"from":"Warp","from_port":0,"to":"blend_2","to_port":0},{"from":"Perlin","from_port":0,"to":"blend_2","to_port":1},{"from":"blend_2","from_port":0,"to":"colorize_3","to_port":0},{"from":"blend_2","from_port":0,"to":"colorize_6","to_port":0},{"from":"colorize_6","from_port":0,"to":"normal_map_0","to_port":0},{"from":"Perlin","from_port":0,"to":"blend_1","to_port":0},{"from":"Perlin","from_port":0,"to":"colorize_0","to_port":0},{"from":"perlin_0","from_port":0,"to":"Warp","to_port":1},{"from":"uniform_0","from_port":0,"to":"Material","to_port":1},{"from":"uniform_1","from_port":0,"to":"Material","to_port":2},{"from":"colorize_3","from_port":0,"to":"Material","to_port":6},{"from":"blend_2","from_port":0,"to":"colorize_4","to_port":0},{"from":"colorize_4","from_port":0,"to":"Material","to_port":5}],"nodes":[{"gradient":[{"b":0,"g":0,"pos":0,"r":0},{"b":1,"g":1,"pos":0.045455,"r":1}],"name":"colorize_2","node_position":{"x":535.943665,"y":163},"type":"colorize"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0},{"b":1,"g":1,"pos":1,"r":1}],"name":"colorize_0","node_position":{"x":560.943665,"y":50},"type":"colorize"},{"iterations":4,"name":"perlin_0","node_position":{"x":92,"y":210},"persistence":0.75,"scale_x":4,"scale_y":4,"type":"perlin"},{"amount":0.5,"blend_type":6,"name":"blend_1","node_position":{"x":351,"y":244},"type":"blend"},{"bevel":0.2,"columns":3,"mortar":0.1,"name":"Bricks","node_position":{"x":107,"y":-27},"row_offset":0.5,"rows":6,"type":"bricks"},{"iterations":10,"name":"Perlin","node_position":{"x":102,"y":-195},"persistence":0.75,"scale_x":4,"scale_y":4,"type":"perlin"},{"gradient":[{"b":0.557292,"g":0.557292,"pos":0,"r":0.557292},{"b":0.180664,"g":0.22934,"pos":0.2,"r":0.234375},{"b":0.60574,"g":0.694487,"pos":0.345455,"r":0.755208},{"b":0.144423,"g":0.184147,"pos":0.545455,"r":0.229167},{"b":0.447537,"g":0.553291,"pos":0.736364,"r":0.588542},{"b":0.212674,"g":0.236125,"pos":1,"r":0.291667}],"name":"colorize_1","node_position":{"x":561.943665,"y":-78},"type":"colorize"},{"color":{"a":1,"b":0.558594,"g":0.558594,"r":0.558594,"type":"Color"},"name":"uniform_1","node_position":{"x":871,"y":159},"type":"uniform"},{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"},"name":"uniform_0","node_position":{"x":866,"y":106},"type":"uniform"},{"amount":0.5,"name":"normal_map_0","node_position":{"x":895,"y":222},"type":"normal_map"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_6","node_position":{"x":717,"y":217},"type":"colorize"},{"amount":0.5,"blend_type":0,"name":"blend_2","node_position":{"x":537,"y":264},"type":"blend"},{"gradient":[{"b":0.119792,"g":0.119792,"pos":0,"r":0.119792},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_3","node_position":{"x":757,"y":356},"type":"colorize"},{"gradient":[{"b":0.421875,"g":0.421875,"pos":0.290909,"r":0.421875},{"b":1,"g":1,"pos":0.554545,"r":1}],"name":"colorize_4","node_position":{"x":772,"y":288},"type":"colorize"},{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":0.2,"emission_energy":1,"metallic":1,"name":"Material","node_position":{"x":1031,"y":127},"normal_scale":1,"roughness":1,"type":"material"},{"amount":0.1,"name":"Warp","node_position":{"x":384,"y":10.75},"type":"warp"},{"amount":0.5,"blend_type":0,"name":"blend_0","node_position":{"x":791.943726,"y":-5},"type":"blend"}]}
|
||||
{"connections":[{"from":"Warp","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"blend_0","to_port":2},{"from":"colorize_0","from_port":0,"to":"blend_0","to_port":1},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"blend_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"Warp","from_port":0,"to":"blend_2","to_port":0},{"from":"Perlin","from_port":0,"to":"blend_2","to_port":1},{"from":"blend_2","from_port":0,"to":"colorize_3","to_port":0},{"from":"blend_2","from_port":0,"to":"colorize_6","to_port":0},{"from":"colorize_6","from_port":0,"to":"normal_map_0","to_port":0},{"from":"Perlin","from_port":0,"to":"blend_1","to_port":0},{"from":"Perlin","from_port":0,"to":"colorize_0","to_port":0},{"from":"perlin_0","from_port":0,"to":"Warp","to_port":1},{"from":"uniform_0","from_port":0,"to":"Material","to_port":1},{"from":"colorize_3","from_port":0,"to":"Material","to_port":6},{"from":"blend_2","from_port":0,"to":"colorize_4","to_port":0},{"from":"colorize_4","from_port":0,"to":"Material","to_port":5},{"from":"voronoi_0","from_port":1,"to":"colorize_5","to_port":0},{"from":"blend_0","from_port":0,"to":"Material","to_port":0},{"from":"colorize_2","from_port":0,"to":"colorize_7","to_port":0},{"from":"colorize_7","from_port":0,"to":"Material","to_port":2},{"from":"Bricks","from_port":0,"to":"Warp","to_port":0},{"from":"Bricks","from_port":1,"to":"blend_1","to_port":1},{"from":"colorize_1","from_port":0,"to":"blend_0","to_port":0}],"nodes":[{"amount":0.5,"blend_type":0,"name":"blend_2","node_position":{"x":537,"y":264},"type":"blend"},{"amount":0.1,"name":"Warp","node_position":{"x":384,"y":10.75},"type":"warp"},{"intensity":1,"name":"voronoi_0","node_position":{"x":-288,"y":-107},"scale_x":8,"scale_y":8,"type":"voronoi"},{"gradient":[{"b":0,"g":0,"pos":0.027273,"r":0},{"b":1,"g":1,"pos":0.1,"r":1}],"name":"colorize_5","node_position":{"x":-104,"y":-87},"type":"colorize"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0},{"b":1,"g":1,"pos":1,"r":1}],"name":"colorize_0","node_position":{"x":560.943665,"y":50},"type":"colorize"},{"amount":0.5,"blend_type":0,"name":"blend_0","node_position":{"x":762.943726,"y":-15},"type":"blend"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0},{"b":1,"g":1,"pos":0.045455,"r":1}],"name":"colorize_2","node_position":{"x":535.943665,"y":163},"type":"colorize"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0.479167,"g":0.479167,"pos":0.136364,"r":0.479167}],"name":"colorize_7","node_position":{"x":915.356934,"y":148},"type":"colorize"},{"gradient":[{"b":0.119792,"g":0.119792,"pos":0,"r":0.119792},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_3","node_position":{"x":757,"y":356},"type":"colorize"},{"gradient":[{"b":0.640625,"g":0.640625,"pos":0.145455,"r":0.640625},{"b":1,"g":1,"pos":0.4,"r":1}],"name":"colorize_4","node_position":{"x":772,"y":288},"type":"colorize"},{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":0.2,"emission_energy":1,"metallic":1,"name":"Material","node_position":{"x":1141,"y":88},"normal_scale":1,"roughness":1,"type":"material"},{"amount":0.5,"name":"normal_map_0","node_position":{"x":932,"y":214},"type":"normal_map"},{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"},"name":"uniform_0","node_position":{"x":942,"y":102},"type":"uniform"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_6","node_position":{"x":742,"y":216},"type":"colorize"},{"iterations":10,"name":"Perlin","node_position":{"x":74,"y":-255},"persistence":0.75,"scale_x":4,"scale_y":4,"type":"perlin"},{"amount":0.5,"blend_type":6,"name":"blend_1","node_position":{"x":293,"y":99},"type":"blend"},{"bevel":0.1,"columns":3,"mortar":0.05,"name":"Bricks","node_position":{"x":-94,"y":17},"pattern":0,"repeat":1,"row_offset":0.5,"rows":6,"type":"bricks"},{"iterations":4,"name":"perlin_0","node_position":{"x":97,"y":211},"persistence":0.75,"scale_x":4,"scale_y":4,"type":"perlin"},{"gradient":[{"b":0.557292,"g":0.557292,"pos":0,"r":0.557292},{"b":0.180664,"g":0.22934,"pos":0.145455,"r":0.234375},{"b":0.585504,"g":0.672174,"pos":0.345455,"r":0.739583},{"b":0.144423,"g":0.184147,"pos":0.545455,"r":0.229167},{"b":0.447537,"g":0.553291,"pos":0.745455,"r":0.588542},{"b":0.199002,"g":0.342478,"pos":1,"r":0.682292}],"name":"colorize_1","node_position":{"x":393.943665,"y":-124},"type":"colorize"}]}
|
@ -1 +1 @@
|
||||
{"connections":[{"from":"bricks_0","from_port":0,"to":"blend_0","to_port":0},{"from":"perlin_0","from_port":0,"to":"blend_0","to_port":1},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"perlin_1","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"blend_1","to_port":0},{"from":"colorize_0","from_port":0,"to":"blend_1","to_port":1},{"from":"perlin_2","from_port":0,"to":"colorize_3","to_port":0},{"from":"colorize_3","from_port":0,"to":"blend_1","to_port":2},{"from":"blend_1","from_port":0,"to":"Material","to_port":0},{"from":"colorize_3","from_port":0,"to":"blend_2","to_port":0},{"from":"blend_2","from_port":0,"to":"Material","to_port":2},{"from":"blend_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"blend_0","from_port":0,"to":"colorize_5","to_port":0},{"from":"colorize_5","from_port":0,"to":"normal_map_0","to_port":0},{"from":"uniform_1","from_port":0,"to":"Material","to_port":1},{"from":"uniform_0","from_port":0,"to":"blend_2","to_port":1}],"nodes":[{"name":"Material","node_position":{"x":938,"y":96},"type":"material"},{"gradient":[{"b":0,"g":0,"pos":0.563636,"r":0},{"b":1,"g":1,"pos":0.7,"r":1}],"name":"colorize_3","node_position":{"x":487.633789,"y":65},"type":"colorize"},{"iterations":6,"name":"perlin_0","node_position":{"x":12,"y":225.5},"persistence":0.7,"scale_x":20,"scale_y":3,"type":"perlin"},{"bevel":0,"columns":5,"mortar":0.05,"name":"bricks_0","node_position":{"x":-1,"y":30.5},"row_offset":0.5,"rows":1,"type":"bricks"},{"gradient":[{"b":0,"g":0.336914,"pos":0,"r":0.598958},{"b":0,"g":0.454102,"pos":0.118182,"r":0.807292},{"b":0,"g":0.37793,"pos":0.245455,"r":0.671875},{"b":0,"g":0.427734,"pos":0.345455,"r":0.760417},{"b":0.017795,"g":0.488254,"pos":0.527273,"r":0.854167},{"b":0,"g":0.37793,"pos":0.645455,"r":0.671875},{"b":0,"g":0.439453,"pos":0.845455,"r":0.78125},{"b":0,"g":0.357422,"pos":1,"r":0.635417}],"name":"colorize_0","node_position":{"x":472,"y":-41.5},"type":"colorize"},{"iterations":7,"name":"perlin_1","node_position":{"x":110.633789,"y":-143.5},"persistence":0.55,"scale_x":4,"scale_y":4,"type":"perlin"},{"amount":0.55,"blend_type":0,"name":"blend_2","node_position":{"x":690.633789,"y":201.5},"type":"blend"},{"iterations":6,"name":"perlin_2","node_position":{"x":232.633789,"y":40},"persistence":0.65,"scale_x":4,"scale_y":4,"type":"perlin"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0.515625},{"b":0,"g":0,"pos":0.145455,"r":0.25},{"b":0,"g":0,"pos":0.445455,"r":0.515625},{"b":0.013184,"g":0.013184,"pos":0.745455,"r":0.28125},{"b":0,"g":0,"pos":1,"r":0.322917}],"name":"colorize_2","node_position":{"x":487.633789,"y":-144.5},"type":"colorize"},{"amount":0.4,"name":"normal_map_0","node_position":{"x":724.633789,"y":345.5},"type":"normal_map"},{"amount":0.5,"blend_type":0,"name":"blend_1","node_position":{"x":707.633789,"y":-68},"type":"blend"},{"amount":1,"blend_type":2,"name":"blend_0","node_position":{"x":271,"y":306.5},"type":"blend"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_5","node_position":{"x":503,"y":336.5},"type":"colorize"},{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"},"name":"uniform_1","node_position":{"x":753,"y":116},"type":"uniform"},{"color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"name":"uniform_0","node_position":{"x":540,"y":234},"type":"uniform"}]}
|
||||
{"connections":[{"from":"bricks_0","from_port":0,"to":"blend_0","to_port":0},{"from":"perlin_0","from_port":0,"to":"blend_0","to_port":1},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"perlin_1","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"blend_1","to_port":0},{"from":"colorize_0","from_port":0,"to":"blend_1","to_port":1},{"from":"perlin_2","from_port":0,"to":"colorize_3","to_port":0},{"from":"colorize_3","from_port":0,"to":"blend_1","to_port":2},{"from":"blend_1","from_port":0,"to":"Material","to_port":0},{"from":"colorize_3","from_port":0,"to":"blend_2","to_port":0},{"from":"blend_2","from_port":0,"to":"Material","to_port":2},{"from":"blend_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"blend_0","from_port":0,"to":"colorize_5","to_port":0},{"from":"colorize_5","from_port":0,"to":"normal_map_0","to_port":0},{"from":"uniform_1","from_port":0,"to":"Material","to_port":1},{"from":"uniform_0","from_port":0,"to":"blend_2","to_port":1}],"nodes":[{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"name":"Material","node_position":{"x":938,"y":96},"normal_scale":1,"roughness":1,"type":"material"},{"gradient":[{"b":0,"g":0,"pos":0.545455,"r":0},{"b":1,"g":1,"pos":0.681818,"r":1}],"name":"colorize_3","node_position":{"x":487.633789,"y":65},"type":"colorize"},{"iterations":6,"name":"perlin_0","node_position":{"x":12,"y":225.5},"persistence":0.7,"scale_x":20,"scale_y":3,"type":"perlin"},{"bevel":0,"columns":5,"mortar":0.05,"name":"bricks_0","node_position":{"x":-1,"y":30.5},"pattern":0,"repeat":1,"row_offset":0.5,"rows":1,"type":"bricks"},{"gradient":[{"b":0,"g":0.336914,"pos":0,"r":0.598958},{"b":0,"g":0.454102,"pos":0.118182,"r":0.807292},{"b":0,"g":0.37793,"pos":0.245455,"r":0.671875},{"b":0,"g":0.427734,"pos":0.345455,"r":0.760417},{"b":0.017795,"g":0.488254,"pos":0.527273,"r":0.854167},{"b":0,"g":0.37793,"pos":0.645455,"r":0.671875},{"b":0,"g":0.439453,"pos":0.845455,"r":0.78125},{"b":0,"g":0.357422,"pos":1,"r":0.635417}],"name":"colorize_0","node_position":{"x":472,"y":-41.5},"type":"colorize"},{"iterations":7,"name":"perlin_1","node_position":{"x":110.633789,"y":-143.5},"persistence":0.55,"scale_x":4,"scale_y":4,"type":"perlin"},{"amount":0.5,"blend_type":0,"name":"blend_2","node_position":{"x":690.633789,"y":201.5},"type":"blend"},{"iterations":6,"name":"perlin_2","node_position":{"x":232.633789,"y":40},"persistence":0.65,"scale_x":4,"scale_y":4,"type":"perlin"},{"gradient":[{"b":0,"g":0,"pos":0,"r":0.515625},{"b":0,"g":0,"pos":0.145455,"r":0.25},{"b":0,"g":0,"pos":0.445455,"r":0.515625},{"b":0.013184,"g":0.013184,"pos":0.745455,"r":0.28125},{"b":0,"g":0,"pos":1,"r":0.322917}],"name":"colorize_2","node_position":{"x":487.633789,"y":-144.5},"type":"colorize"},{"amount":0.4,"name":"normal_map_0","node_position":{"x":724.633789,"y":345.5},"type":"normal_map"},{"amount":0.5,"blend_type":0,"name":"blend_1","node_position":{"x":707.633789,"y":-68},"type":"blend"},{"amount":1,"blend_type":2,"name":"blend_0","node_position":{"x":271,"y":306.5},"type":"blend"},{"gradient":[{"b":1,"g":1,"pos":0,"r":1},{"b":0,"g":0,"pos":1,"r":0}],"name":"colorize_5","node_position":{"x":503,"y":336.5},"type":"colorize"},{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"},"name":"uniform_1","node_position":{"x":753,"y":116},"type":"uniform"},{"color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"name":"uniform_0","node_position":{"x":540,"y":234},"type":"uniform"}]}
|
Loading…
Reference in New Issue
Block a user