Merge pull request #50 from RodZill4/export_plugin
Back to master branch !
13
.gitignore
vendored
@ -1,8 +1,5 @@
|
||||
.import
|
||||
generated_image.png
|
||||
addons/material_maker/models/Material.material
|
||||
addons/material_maker/models/models.blend1
|
||||
addons/material_maker/models/models.dae
|
||||
addons/material_maker/models/models.dae.import
|
||||
*.import
|
||||
_build
|
||||
# Files generated by Godot
|
||||
.import/
|
||||
|
||||
# Compiled documentation
|
||||
_build/
|
||||
|
2
.mailmap
Normal file
@ -0,0 +1,2 @@
|
||||
Rodolphe Suescun <rodzilla@free.fr>
|
||||
jack perkins <jackaperkins@posteo.net>
|
21
LICENSE
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Rodolphe Suescun
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -13,93 +13,6 @@ vec3 rand3(vec2 x) {
|
||||
dot(x, vec2(13.254, 5.867)))) * 43758.5453);
|
||||
}
|
||||
|
||||
vec3 blend_normal(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*c1 + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
vec3 blend_dissolve(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
if (rand(uv) < opacity) {
|
||||
return c1;
|
||||
} else {
|
||||
return c2;
|
||||
}
|
||||
}
|
||||
|
||||
vec3 blend_multiply(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*c1*c2 + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
vec3 blend_screen(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*(1.0-(1.0-c1)*(1.0-c2)) + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
float blend_overlay_f(float c1, float c2) {
|
||||
return (c1 < 0.5) ? (2.0*c1*c2) : (1.0-2.0*(1.0-c1)*(1.0-c2));
|
||||
}
|
||||
|
||||
vec3 blend_overlay(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*vec3(blend_overlay_f(c1.x, c2.x), blend_overlay_f(c1.y, c2.y), blend_overlay_f(c1.z, c2.z)) + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
vec3 blend_hard_light(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*0.5*(c1*c2+blend_overlay(uv, c1, c2, 1.0)) + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
float blend_soft_light_f(float c1, float c2) {
|
||||
return (c2 < 0.5) ? (2.0*c1*c2+c1*c1*(1.0-2.0*c2)) : 2.0*c1*(1.0-c2)+sqrt(c1)*(2.0*c2-1.0);
|
||||
}
|
||||
|
||||
vec3 blend_soft_light(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*vec3(blend_soft_light_f(c1.x, c2.x), blend_soft_light_f(c1.y, c2.y), blend_soft_light_f(c1.z, c2.z)) + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
float blend_burn_f(float c1, float c2) {
|
||||
return (c1==0.0)?c1:max((1.0-((1.0-c2)/c1)),0.0);
|
||||
}
|
||||
|
||||
vec3 blend_burn(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*vec3(blend_burn_f(c1.x, c2.x), blend_burn_f(c1.y, c2.y), blend_burn_f(c1.z, c2.z)) + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
float blend_dodge_f(float c1, float c2) {
|
||||
return (c1==1.0)?c1:min(c2/(1.0-c1),1.0);
|
||||
}
|
||||
|
||||
vec3 blend_dodge(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*vec3(blend_dodge_f(c1.x, c2.x), blend_dodge_f(c1.y, c2.y), blend_dodge_f(c1.z, c2.z)) + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
vec3 blend_lighten(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*max(c1, c2) + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
vec3 blend_darken(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*min(c1, c2) + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
vec3 blend_difference(vec2 uv, vec3 c1, vec3 c2, float opacity) {
|
||||
return opacity*clamp(c2-c1, vec3(0.0), vec3(1.0)) + (1.0-opacity)*c2;
|
||||
}
|
||||
|
||||
vec2 transform(vec2 uv, vec2 translate, float rotate, vec2 scale) {
|
||||
vec2 rv;
|
||||
uv -= vec2(0.5);
|
||||
rv.x = cos(rotate)*uv.x + sin(rotate)*uv.y;
|
||||
rv.y = -sin(rotate)*uv.x + cos(rotate)*uv.y;
|
||||
rv /= scale;
|
||||
rv += vec2(0.5);
|
||||
rv -= translate;
|
||||
return rv;
|
||||
}
|
||||
|
||||
vec2 transform_repeat(vec2 uv, vec2 translate, float rotate, vec2 scale) {
|
||||
return fract(transform(uv, translate, rotate, scale));
|
||||
}
|
||||
|
||||
vec2 transform_norepeat(vec2 uv, vec2 translate, float rotate, vec2 scale) {
|
||||
return clamp(transform(uv, translate, rotate, scale), vec2(0.0), vec2(1.0));
|
||||
}
|
||||
|
||||
// From http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl
|
||||
vec3 rgb2hsv(vec3 c) {
|
||||
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
||||
|
0
addons/material_maker/doc/.gdignore
Normal file
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 747 B |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 283 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 117 KiB |
231
addons/material_maker/engine/gen_base.gd
Normal file
@ -0,0 +1,231 @@
|
||||
tool
|
||||
extends Node
|
||||
class_name MMGenBase
|
||||
|
||||
"""
|
||||
Base class for texture generators, that defines their API
|
||||
"""
|
||||
|
||||
signal parameter_changed
|
||||
|
||||
class InputPort:
|
||||
var generator : MMGenBase = null
|
||||
var input_index : int = 0
|
||||
|
||||
func _init(g : MMGenBase, i : int) -> void:
|
||||
generator = g
|
||||
input_index = i
|
||||
|
||||
func to_str() -> String:
|
||||
return generator.name+".in("+str(input_index)+")"
|
||||
|
||||
class OutputPort:
|
||||
var generator : MMGenBase = null
|
||||
var output_index : int = 0
|
||||
|
||||
func _init(g : MMGenBase, o : int) -> void:
|
||||
generator = g
|
||||
output_index = o
|
||||
|
||||
func to_str() -> String:
|
||||
return generator.name+".out("+str(output_index)+")"
|
||||
|
||||
var position : Vector2 = Vector2(0, 0)
|
||||
var model = null
|
||||
var parameters = {}
|
||||
|
||||
var seed_locked : bool = false
|
||||
var seed_value : int = 0
|
||||
|
||||
func _ready() -> void:
|
||||
init_parameters()
|
||||
|
||||
func _post_load() -> void:
|
||||
pass
|
||||
|
||||
func can_be_deleted() -> bool:
|
||||
return true
|
||||
|
||||
func toggle_editable() -> bool:
|
||||
return false
|
||||
|
||||
func is_editable() -> bool:
|
||||
return false
|
||||
|
||||
|
||||
func has_randomness():
|
||||
return false
|
||||
|
||||
func get_seed() -> int:
|
||||
if !seed_locked:
|
||||
var s : int = ((int(position.x) * 0x1f1f1f1f) ^ int(position.y)) % 65536
|
||||
if get_parent().get("transmits_seed") != null and get_parent().transmits_seed:
|
||||
s += get_parent().get_seed()
|
||||
return s
|
||||
else:
|
||||
return seed_value
|
||||
|
||||
func toggle_lock_seed():
|
||||
if !seed_locked:
|
||||
seed_value = get_seed()
|
||||
seed_locked = !seed_locked
|
||||
return seed_locked
|
||||
|
||||
func is_seed_locked():
|
||||
return seed_locked
|
||||
|
||||
func init_parameters() -> void:
|
||||
for p in get_parameter_defs():
|
||||
if !parameters.has(p.name):
|
||||
if p.has("default"):
|
||||
parameters[p.name] = MMType.deserialize_value(p.default)
|
||||
if p.type == "size":
|
||||
parameters[p.name] -= p.first
|
||||
else:
|
||||
print("No default value for parameter "+p.name)
|
||||
|
||||
func set_position(p) -> void:
|
||||
position = p
|
||||
if has_randomness() and !is_seed_locked():
|
||||
for i in range(get_output_defs().size()):
|
||||
notify_output_change(i)
|
||||
|
||||
func get_type() -> String:
|
||||
return "generic"
|
||||
|
||||
func get_type_name() -> String:
|
||||
return "Unnamed"
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
return []
|
||||
|
||||
func get_parameter_def(param_name : String) -> Dictionary:
|
||||
var parameter_defs = get_parameter_defs()
|
||||
for p in parameter_defs:
|
||||
if p.name == param_name:
|
||||
return p
|
||||
return {}
|
||||
|
||||
func set_parameter(n : String, v):
|
||||
parameters[n] = v
|
||||
source_changed(0)
|
||||
emit_signal("parameter_changed", n, v)
|
||||
|
||||
func notify_output_change(output_index : int):
|
||||
var targets = get_targets(output_index)
|
||||
for target in targets:
|
||||
target.generator.source_changed(target.input_index)
|
||||
|
||||
func source_changed(__):
|
||||
emit_signal("parameter_changed", "__input_changed__", 0)
|
||||
for i in range(get_output_defs().size()):
|
||||
notify_output_change(i)
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
return []
|
||||
|
||||
func get_output_defs() -> Array:
|
||||
return []
|
||||
|
||||
func get_source(input_index : int) -> OutputPort:
|
||||
return get_parent().get_port_source(name, input_index)
|
||||
|
||||
func get_targets(output_index : int) -> Array:
|
||||
var parent = get_parent()
|
||||
if parent != null:
|
||||
return get_parent().get_port_targets(name, output_index)
|
||||
return []
|
||||
|
||||
# get the list of outputs that depend on the input whose index is passed as parameter
|
||||
func follow_input(input_index : int) -> Array:
|
||||
var rv = []
|
||||
for i in range(get_output_defs().size()):
|
||||
rv.push_back(OutputPort.new(self, i))
|
||||
return rv
|
||||
|
||||
func get_input_shader(input_index : int):
|
||||
var source = get_source(input_index)
|
||||
if source != null:
|
||||
return source.get_shader()
|
||||
|
||||
func get_shader(output_index : int, context) -> Dictionary:
|
||||
return get_shader_code("UV", output_index, context)
|
||||
|
||||
func render(output_index : int, size : int):
|
||||
var context : MMGenContext = MMGenContext.new()
|
||||
var source = get_shader_code("UV", output_index, context)
|
||||
while source is GDScriptFunctionState:
|
||||
source = yield(source, "completed")
|
||||
if source.empty():
|
||||
source = { defs="", code="", textures={}, rgba="vec4(0.0)" }
|
||||
var shader : String = mm_renderer.generate_shader(source)
|
||||
var result = mm_renderer.render_shader(shader, source.textures, size)
|
||||
while result is GDScriptFunctionState:
|
||||
result = yield(result, "completed")
|
||||
return result
|
||||
|
||||
func get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
||||
var rv = _get_shader_code(uv, output_index, context)
|
||||
while rv is GDScriptFunctionState:
|
||||
rv = yield(rv, "completed")
|
||||
if !rv.empty():
|
||||
if !rv.has("f"):
|
||||
if rv.has("rgb"):
|
||||
rv.f = "(dot("+rv.rgb+", vec3(1.0))/3.0)"
|
||||
elif rv.has("rgba"):
|
||||
rv.f = "(dot("+rv.rgba+".rgb, vec3(1.0))/3.0)"
|
||||
else:
|
||||
rv.f = "0.0"
|
||||
if !rv.has("rgb"):
|
||||
if rv.has("rgba"):
|
||||
rv.rgb = rv.rgba+".rgb"
|
||||
else:
|
||||
rv.rgb = "vec3("+rv.f+")"
|
||||
if !rv.has("rgba"):
|
||||
rv.rgba = "vec4("+rv.rgb+", 1.0)"
|
||||
return rv
|
||||
|
||||
func _get_shader_code(__, __, __) -> Dictionary:
|
||||
return {}
|
||||
|
||||
|
||||
func _serialize(data: Dictionary) -> Dictionary:
|
||||
print("cannot save "+name)
|
||||
return data
|
||||
|
||||
func serialize():
|
||||
var rv = { name=name, type=get_type(), parameters={}, node_position={ x=position.x, y=position.y } }
|
||||
for p in parameters.keys():
|
||||
rv.parameters[p] = MMType.serialize_value(parameters[p])
|
||||
if seed_locked:
|
||||
rv.seed_value = seed_value
|
||||
if model != null:
|
||||
rv.type = model
|
||||
else:
|
||||
rv = _serialize(rv)
|
||||
return rv
|
||||
|
||||
func _deserialize(data : Dictionary) -> void:
|
||||
pass
|
||||
|
||||
func deserialize(data : Dictionary) -> void:
|
||||
_deserialize(data)
|
||||
if data.has("name"):
|
||||
name = data.name
|
||||
if data.has("node_position"):
|
||||
position.x = data.node_position.x
|
||||
position.y = data.node_position.y
|
||||
if data.has("parameters"):
|
||||
for p in data.parameters.keys():
|
||||
set_parameter(p, MMType.deserialize_value(data.parameters[p]))
|
||||
else:
|
||||
for p in get_parameter_defs():
|
||||
if data.has(p.name) and p.name != "type":
|
||||
set_parameter(p.name, MMType.deserialize_value(data[p.name]))
|
||||
if data.has("seed_value"):
|
||||
seed_locked = true
|
||||
seed_value = data.seed_value
|
||||
else:
|
||||
seed_locked = false
|
||||
_post_load()
|
||||
|
55
addons/material_maker/engine/gen_buffer.gd
Normal file
@ -0,0 +1,55 @@
|
||||
tool
|
||||
extends MMGenTexture
|
||||
class_name MMGenBuffer
|
||||
|
||||
"""
|
||||
Texture generator buffers, that render their input in a specific resolution and provide the result as output.
|
||||
This is useful when using generators that sample their inputs several times (such as convolutions)
|
||||
"""
|
||||
|
||||
var updated : bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
if !parameters.has("size"):
|
||||
parameters.size = 9
|
||||
|
||||
func get_type() -> String:
|
||||
return "buffer"
|
||||
|
||||
func get_type_name() -> String:
|
||||
return "Buffer"
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
return [
|
||||
{ name="size", type="size", first=4, last=12, default=4 },
|
||||
{ name="lod", type="float", min=0, max=10.0, step=0.01, default=0 }
|
||||
]
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
return [ { name="in", type="rgba" } ]
|
||||
|
||||
func get_output_defs() -> Array:
|
||||
return [ { type="rgba" }, { type="rgba" } ]
|
||||
|
||||
func source_changed(input_port_index : int):
|
||||
updated = false
|
||||
.source_changed(input_port_index)
|
||||
|
||||
func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
||||
var source = get_source(0)
|
||||
if source != null and !updated:
|
||||
var result = source.generator.render(source.output_index, pow(2, parameters.size))
|
||||
while result is GDScriptFunctionState:
|
||||
result = yield(result, "completed")
|
||||
result.copy_to_texture(texture)
|
||||
result.release()
|
||||
texture.flags = Texture.FLAG_MIPMAPS
|
||||
updated = true
|
||||
var rv = ._get_shader_code_lod(uv, output_index, context, 0 if output_index == 0 else parameters.lod)
|
||||
while rv is GDScriptFunctionState:
|
||||
rv = yield(rv, "completed")
|
||||
return rv
|
||||
|
||||
func _serialize(data: Dictionary) -> Dictionary:
|
||||
data.type = "buffer"
|
||||
return data
|
41
addons/material_maker/engine/gen_comment.gd
Normal file
@ -0,0 +1,41 @@
|
||||
tool
|
||||
extends MMGenTexture
|
||||
class_name MMGenComment
|
||||
|
||||
"""
|
||||
Comments to put in the graph
|
||||
"""
|
||||
|
||||
var text : String = "Double-click to write a comment"
|
||||
var size : Vector2 = Vector2(0, 0)
|
||||
|
||||
func _ready() -> void:
|
||||
if !parameters.has("size"):
|
||||
parameters.size = 4
|
||||
|
||||
func get_type() -> String:
|
||||
return "comment"
|
||||
|
||||
func get_type_name() -> String:
|
||||
return "Comment"
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
return []
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
return []
|
||||
|
||||
func get_output_defs() -> Array:
|
||||
return []
|
||||
|
||||
func _serialize(data: Dictionary) -> Dictionary:
|
||||
data.type = "comment"
|
||||
data.text = text
|
||||
data.size = { x=size.x, y=size.y }
|
||||
return data
|
||||
|
||||
func _deserialize(data : Dictionary) -> void:
|
||||
if data.has("text"):
|
||||
text = data.text
|
||||
if data.has("size"):
|
||||
size = Vector2(data.size.x, data.size.y)
|
20
addons/material_maker/engine/gen_context.gd
Normal file
@ -0,0 +1,20 @@
|
||||
tool
|
||||
extends Object
|
||||
class_name MMGenContext
|
||||
|
||||
|
||||
var variants : Dictionary = {}
|
||||
|
||||
|
||||
func has_variant(generator) -> bool:
|
||||
return variants.has(generator)
|
||||
|
||||
func get_variant(generator, variant) -> int:
|
||||
var rv = -1
|
||||
if variants.has(generator):
|
||||
rv = variants[generator].find(variant)
|
||||
if rv == -1:
|
||||
variants[generator].push_back(variant)
|
||||
else:
|
||||
variants[generator] = [variant]
|
||||
return rv
|
184
addons/material_maker/engine/gen_convolution.gd
Normal file
@ -0,0 +1,184 @@
|
||||
tool
|
||||
extends MMGenBase
|
||||
class_name MMGenConvolution
|
||||
|
||||
var convolution_params : Dictionary = {}
|
||||
|
||||
func get_type() -> String:
|
||||
return "convolution"
|
||||
|
||||
func get_type_name() -> String:
|
||||
if convolution_params.has("name"):
|
||||
return convolution_params.name
|
||||
return .get_type_name()
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
var rv : Array = [ { name="size", type="size", first=4, last=11, default=7 } ]
|
||||
if convolution_params.has("parameters"):
|
||||
for p in convolution_params.parameters:
|
||||
rv.push_back(p)
|
||||
return rv
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
return [ { name="in", type=convolution_params.input_type } ]
|
||||
|
||||
func get_output_defs() -> Array:
|
||||
return [ { type=convolution_params.output_type } ]
|
||||
|
||||
func set_convolution_params(data: Dictionary) -> void:
|
||||
convolution_params = data
|
||||
|
||||
func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
||||
var genname = "o"+str(get_instance_id())
|
||||
var epsilon = 1.0/pow(2, parameters.size)
|
||||
var types = { "rgba": { type="vec4", init="vec4(0.0)" }, "rgb": { type="vec3", init="vec3(0.0)" }, "f": { type="float", init="0.0" } }
|
||||
var rv = { globals=[], defs="", code="", textures={} }
|
||||
var source = get_source(0)
|
||||
if source == null:
|
||||
return rv
|
||||
var variant_index = context.get_variant(self, uv)
|
||||
if variant_index == -1:
|
||||
variant_index = context.get_variant(self, uv)
|
||||
# Calculate matrix
|
||||
var errors = 0
|
||||
var sum = [ 0.0, 0.0, 0.0, 0.0 ]
|
||||
var matrix = []
|
||||
var expr : Expression = null
|
||||
var expr_variables : PoolStringArray
|
||||
var expr_values : Array
|
||||
var expr_variables_x_index : int
|
||||
if convolution_params.has("matrix_function"):
|
||||
expr = Expression.new()
|
||||
expr_variables = PoolStringArray(["size"])
|
||||
expr_values = [ pow(2, parameters.size) ]
|
||||
if convolution_params.has("parameters"):
|
||||
for p in convolution_params.parameters:
|
||||
expr_variables.push_back(p.name)
|
||||
if parameters.has(p.name):
|
||||
expr_values.push_back(parameters[p.name])
|
||||
elif p.has("default"):
|
||||
expr_values.push_back(p.default)
|
||||
else:
|
||||
expr_values.push_back(0)
|
||||
errors += 1
|
||||
print("No value for "+p.name)
|
||||
expr_variables_x_index = expr_values.size()
|
||||
expr_variables.push_back("x")
|
||||
expr_values.push_back(0)
|
||||
expr_variables.push_back("y")
|
||||
expr_values.push_back(0)
|
||||
var error = expr.parse(convolution_params.matrix_function, expr_variables)
|
||||
if error != OK:
|
||||
print("Error in expression: "+expr.get_error_text())
|
||||
return rv
|
||||
for dy in range(-convolution_params.y, convolution_params.y+1):
|
||||
var line = []
|
||||
for dx in range(-convolution_params.x, convolution_params.x+1):
|
||||
var coef = 0.0
|
||||
if convolution_params.has("matrix") and dy+convolution_params.y < convolution_params.matrix.size() and dx+convolution_params.x < convolution_params.matrix[dy+convolution_params.y].size() and convolution_params.matrix[dy+convolution_params.y][dx+convolution_params.x] != null:
|
||||
coef = convolution_params.matrix[dy+convolution_params.y][dx+convolution_params.x]
|
||||
elif convolution_params.has("matrix_sparse") and convolution_params.matrix_sparse.has(str(dy)) and convolution_params.matrix_sparse[str(dy)].has(str(dx)):
|
||||
coef = convolution_params.matrix_sparse[str(dy)][str(dx)]
|
||||
elif expr != null:
|
||||
expr_values[expr_variables_x_index] = dx
|
||||
expr_values[expr_variables_x_index+1] = dy
|
||||
coef = expr.execute(expr_values)
|
||||
if typeof(coef) == TYPE_INT:
|
||||
coef = float(coef)
|
||||
match convolution_params.output_type:
|
||||
"f":
|
||||
if typeof(coef) == TYPE_REAL or convolution_params.input_type == "f":
|
||||
sum[0] += coef
|
||||
else:
|
||||
errors += 1
|
||||
"rgb":
|
||||
if typeof(coef) == TYPE_REAL:
|
||||
sum[0] += coef
|
||||
sum[1] += coef
|
||||
sum[2] += coef
|
||||
coef = [ coef, coef, coef ]
|
||||
if convolution_params.input_type != "f" and convolution_params.input_type != "rgb":
|
||||
errors += 1
|
||||
elif typeof(coef) == TYPE_ARRAY and coef.size() == 3:
|
||||
if convolution_params.input_type == "f" or convolution_params.input_type == "rgb":
|
||||
sum[0] += coef[0]
|
||||
sum[1] += coef[1]
|
||||
sum[2] += coef[2]
|
||||
else:
|
||||
errors += 1
|
||||
else:
|
||||
errors += 1
|
||||
"rgba":
|
||||
if typeof(coef) == TYPE_REAL:
|
||||
sum[0] += coef
|
||||
sum[1] += coef
|
||||
sum[2] += coef
|
||||
sum[3] += coef
|
||||
coef = [ coef, coef, coef, coef ]
|
||||
if convolution_params.input_type != "f" and convolution_params.input_type != "rgba":
|
||||
errors += 1
|
||||
elif typeof(coef) == TYPE_ARRAY and coef.size() == 4:
|
||||
if convolution_params.input_type == "f" or convolution_params.input_type == "rgba":
|
||||
sum[0] += coef[0]
|
||||
sum[1] += coef[1]
|
||||
sum[2] += coef[2]
|
||||
sum[3] += coef[3]
|
||||
else:
|
||||
errors += 1
|
||||
else:
|
||||
errors += 1
|
||||
line.push_back(coef)
|
||||
matrix.push_back(line)
|
||||
# Generate code
|
||||
rv.code += "%s %s_%d = %s;\n" % [ types[convolution_params.output_type].type, genname, variant_index, types[convolution_params.output_type].init ]
|
||||
if errors > 0:
|
||||
pass
|
||||
else:
|
||||
if convolution_params.has("normalized") and convolution_params.normalized:
|
||||
for i in range(sum.size()):
|
||||
if sum[i] != 0:
|
||||
sum[i] = 1.0/sum[i]
|
||||
else:
|
||||
sum[i] = 1.0
|
||||
else:
|
||||
sum = [ 1.0, 1.0, 1.0, 1.0 ]
|
||||
for dy in range(-convolution_params.y, convolution_params.y+1):
|
||||
var line = matrix[dy+convolution_params.y]
|
||||
for dx in range(-convolution_params.x, convolution_params.x+1):
|
||||
var coef = line[dx+convolution_params.x]
|
||||
var uv_str = "(%s)+vec2(%.9f,%.9f)" % [ uv, dx*epsilon, dy*epsilon ]
|
||||
var src_code = source.generator.get_shader_code(uv_str, source.output_index, context)
|
||||
while src_code is GDScriptFunctionState:
|
||||
src_code = yield(src_code, "completed")
|
||||
# Add global definitions
|
||||
if src_code.has("globals"):
|
||||
for d in src_code.globals:
|
||||
if rv.globals.find(d) == -1:
|
||||
rv.globals.push_back(d)
|
||||
# Add generated definitions
|
||||
if src_code.has("defs"):
|
||||
rv.defs += src_code.defs
|
||||
# Add generated code
|
||||
if src_code.has("code"):
|
||||
rv.code += src_code.code
|
||||
var coef_str : String
|
||||
match convolution_params.output_type:
|
||||
"f":
|
||||
coef_str = "%.9f" % [ coef * sum[0] ]
|
||||
"rgb":
|
||||
coef_str = "vec3(%.9f, %.9f, %.9f)" % [ coef[0] * sum[0], coef[1] * sum[1], coef[2] * sum[2] ]
|
||||
"rgba":
|
||||
coef_str = "vec4(%.9f, %.9f, %.9f, %.9f)" % [ coef[0] * sum[0], coef[1] * sum[1], coef[2] * sum[2], coef[3] * sum[3] ]
|
||||
rv.code += "%s_%d += %s*%s;\n" % [ genname, variant_index, coef_str, src_code[convolution_params.input_type] ]
|
||||
for t in src_code.textures.keys():
|
||||
rv.textures[t] = src_code.textures[t]
|
||||
rv[convolution_params.output_type] = "%s_%d" % [ genname, variant_index ]
|
||||
return rv
|
||||
|
||||
|
||||
func _serialize(data: Dictionary) -> Dictionary:
|
||||
data.convolution_params = convolution_params
|
||||
return data
|
||||
|
||||
func _deserialize(data : Dictionary) -> void:
|
||||
set_convolution_params(data.convolution_params)
|
16
addons/material_maker/engine/gen_debug.gd
Normal file
@ -0,0 +1,16 @@
|
||||
tool
|
||||
extends MMGenBase
|
||||
class_name MMGenDebug
|
||||
|
||||
"""
|
||||
Can be used to get generated shader
|
||||
"""
|
||||
|
||||
func get_type() -> String:
|
||||
return "debug"
|
||||
|
||||
func get_type_name() -> String:
|
||||
return "Debug"
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
return [ { name="in", type="rgba" } ]
|
52
addons/material_maker/engine/gen_export.gd
Normal file
@ -0,0 +1,52 @@
|
||||
tool
|
||||
extends MMGenBase
|
||||
class_name MMGenExport
|
||||
|
||||
"""
|
||||
Can be used to export an additional texture
|
||||
"""
|
||||
|
||||
var texture = null
|
||||
|
||||
# The default texture size as a power-of-two exponent
|
||||
const TEXTURE_SIZE_DEFAULT = 10 # 1024x1024
|
||||
|
||||
func get_image_size() -> int:
|
||||
var rv : int
|
||||
if parameters.has("size"):
|
||||
rv = int(pow(2, parameters.size))
|
||||
else:
|
||||
rv = int(pow(2, TEXTURE_SIZE_DEFAULT))
|
||||
return rv
|
||||
|
||||
func get_type() -> String:
|
||||
return "export"
|
||||
|
||||
func get_type_name() -> String:
|
||||
return "Export"
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
return [
|
||||
{ name="size", type="size", first=4, last=12, default=10 },
|
||||
{ name="suffix", type="string", default="suffix" }
|
||||
]
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
return [ { name="in", type="rgba" } ]
|
||||
|
||||
func render_textures() -> void:
|
||||
var source = get_source(0)
|
||||
if source != null:
|
||||
var result = source.generator.render(source.output_index, get_image_size())
|
||||
while result is GDScriptFunctionState:
|
||||
result = yield(result, "completed")
|
||||
texture = ImageTexture.new()
|
||||
result.copy_to_texture(texture)
|
||||
result.release()
|
||||
else:
|
||||
texture = null
|
||||
|
||||
func export_textures(prefix, __ = null) -> void:
|
||||
if texture != null:
|
||||
var image = texture.get_data()
|
||||
image.save_png("%s_%s.png" % [ prefix, parameters.suffix])
|
319
addons/material_maker/engine/gen_graph.gd
Normal file
@ -0,0 +1,319 @@
|
||||
tool
|
||||
extends MMGenBase
|
||||
class_name MMGenGraph
|
||||
|
||||
var label : String = "Graph"
|
||||
var connections = []
|
||||
|
||||
var editable : bool = false
|
||||
|
||||
var transmits_seed : bool = true
|
||||
|
||||
signal connections_changed(removed_connections, added_connections)
|
||||
|
||||
|
||||
func fix_remotes() -> void:
|
||||
for c in get_children():
|
||||
if c is MMGenRemote:
|
||||
c.fix()
|
||||
|
||||
func _post_load() -> void:
|
||||
fix_remotes()
|
||||
|
||||
|
||||
func has_randomness():
|
||||
return transmits_seed
|
||||
|
||||
|
||||
func get_type() -> String:
|
||||
return "graph"
|
||||
|
||||
func get_type_name() -> String:
|
||||
return label
|
||||
|
||||
|
||||
func toggle_editable() -> bool:
|
||||
editable = !editable
|
||||
if editable:
|
||||
model = null
|
||||
return true
|
||||
|
||||
func is_editable() -> bool:
|
||||
return editable
|
||||
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
if has_node("gen_parameters"):
|
||||
return get_node("gen_parameters").get_parameter_defs()
|
||||
return []
|
||||
|
||||
func set_parameter(p, v):
|
||||
if has_node("gen_parameters"):
|
||||
return get_node("gen_parameters").set_parameter(p, v)
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
if has_node("gen_inputs"):
|
||||
return get_node("gen_inputs").get_output_defs()
|
||||
return []
|
||||
|
||||
func get_output_defs() -> Array:
|
||||
if has_node("gen_outputs"):
|
||||
return get_node("gen_outputs").get_input_defs()
|
||||
return []
|
||||
|
||||
func source_changed(input_index : int):
|
||||
if has_node("gen_inputs"):
|
||||
return get_node("gen_inputs").source_changed(input_index)
|
||||
|
||||
func get_port_source(gen_name: String, input_index: int) -> OutputPort:
|
||||
if gen_name == "gen_inputs":
|
||||
var parent = get_parent()
|
||||
if parent != null and parent.get_script() == get_script():
|
||||
return parent.get_port_source(name, input_index)
|
||||
else:
|
||||
for c in connections:
|
||||
if c.to == gen_name and c.to_port == input_index:
|
||||
var src_gen = get_node(c.from)
|
||||
if src_gen != null:
|
||||
if src_gen.get_script() == get_script():
|
||||
return src_gen.get_port_source("gen_outputs", c.from_port)
|
||||
return OutputPort.new(src_gen, c.from_port)
|
||||
return null
|
||||
|
||||
func get_port_targets(gen_name: String, output_index: int) -> Array:
|
||||
var rv = []
|
||||
for c in connections:
|
||||
if c.from == gen_name and c.from_port == output_index:
|
||||
var tgt_gen = get_node(c.to)
|
||||
if tgt_gen != null:
|
||||
rv.push_back(InputPort.new(tgt_gen, c.to_port))
|
||||
return rv
|
||||
|
||||
func add_generator(generator : MMGenBase) -> bool:
|
||||
var name = generator.name
|
||||
var index = 1
|
||||
while has_node(name):
|
||||
index += 1
|
||||
name = generator.name + "_" + str(index)
|
||||
generator.name = name
|
||||
add_child(generator)
|
||||
return true
|
||||
|
||||
func remove_generator(generator : MMGenBase) -> bool:
|
||||
if !generator.can_be_deleted():
|
||||
return false
|
||||
var new_connections = []
|
||||
for c in connections:
|
||||
if c.from != generator.name and c.to != generator.name:
|
||||
new_connections.append(c)
|
||||
connections = new_connections
|
||||
remove_child(generator)
|
||||
fix_remotes()
|
||||
generator.queue_free()
|
||||
return true
|
||||
|
||||
func replace_generator(old : MMGenBase, new : MMGenBase) -> void:
|
||||
new.name = old.name
|
||||
new.position = old.position
|
||||
remove_child(old)
|
||||
old.free()
|
||||
add_child(new)
|
||||
|
||||
func get_connected_inputs(generator) -> Array:
|
||||
var rv : Array = []
|
||||
for c in connections:
|
||||
if c.to == generator.name:
|
||||
rv.push_back(c.to_port)
|
||||
return rv
|
||||
|
||||
func get_connected_outputs(generator) -> Array:
|
||||
var rv : Array = []
|
||||
for c in connections:
|
||||
if c.from == generator.name:
|
||||
rv.push_back(c.from_port)
|
||||
return rv
|
||||
|
||||
func connect_children(from, from_port : int, to, to_port : int) -> bool:
|
||||
# check the new connection does not create a loop
|
||||
var spreadlist = [ InputPort.new(to, to_port) ]
|
||||
while !spreadlist.empty():
|
||||
var input : InputPort = spreadlist.pop_front()
|
||||
for o in input.generator.follow_input(input.input_index):
|
||||
if o.generator == from and o.output_index == from_port:
|
||||
return false
|
||||
for t in o.generator.get_parent().get_port_targets(o.generator.name, o.output_index):
|
||||
spreadlist.push_back(t)
|
||||
# disconnect target
|
||||
while true:
|
||||
var remove = -1
|
||||
for i in connections.size():
|
||||
if connections[i].to == to.name and connections[i].to_port == to_port:
|
||||
remove = i
|
||||
break
|
||||
if remove == -1:
|
||||
break
|
||||
connections.remove(remove)
|
||||
# create new connection
|
||||
connections.append({from=from.name, from_port=from_port, to=to.name, to_port=to_port})
|
||||
to.source_changed(to_port)
|
||||
return true
|
||||
|
||||
func disconnect_children(from, from_port : int, to, to_port : int) -> bool:
|
||||
var new_connections : Array = []
|
||||
for c in connections:
|
||||
if c.from != from.name or c.from_port != from_port or c.to != to.name or c.to_port != to_port:
|
||||
new_connections.push_back(c)
|
||||
else:
|
||||
to.source_changed(to_port)
|
||||
connections = new_connections
|
||||
return true
|
||||
|
||||
func reconnect_inputs(generator, reconnects : Dictionary) -> bool:
|
||||
var new_connections : Array = []
|
||||
var added_connections : Array = []
|
||||
var removed_connections : Array = []
|
||||
for c in connections:
|
||||
if c.to == generator.name and reconnects.has(c.to_port):
|
||||
removed_connections.push_back(c.duplicate(true))
|
||||
if reconnects[c.to_port] < 0:
|
||||
continue
|
||||
c.to_port = reconnects[c.to_port]
|
||||
added_connections.push_back(c.duplicate(true))
|
||||
new_connections.push_back(c)
|
||||
connections = new_connections
|
||||
if !removed_connections.empty():
|
||||
emit_signal("connections_changed", removed_connections, added_connections)
|
||||
return true
|
||||
|
||||
func reconnect_outputs(generator, reconnects : Dictionary) -> bool:
|
||||
var new_connections : Array = []
|
||||
var added_connections : Array = []
|
||||
var removed_connections : Array = []
|
||||
for c in connections:
|
||||
if c.from == generator.name and reconnects.has(c.from_port):
|
||||
removed_connections.push_back(c.duplicate(true))
|
||||
if reconnects[c.from_port] < 0:
|
||||
continue
|
||||
c.from_port = reconnects[c.from_port]
|
||||
added_connections.push_back(c.duplicate(true))
|
||||
new_connections.push_back(c)
|
||||
connections = new_connections
|
||||
if !removed_connections.empty():
|
||||
emit_signal("connections_changed", removed_connections, added_connections)
|
||||
return true
|
||||
|
||||
func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
||||
var outputs = get_node("gen_outputs")
|
||||
if outputs != null:
|
||||
var rv = outputs._get_shader_code(uv, output_index, context)
|
||||
while rv is GDScriptFunctionState:
|
||||
rv = yield(rv, "completed")
|
||||
return rv
|
||||
return { globals=[], defs="", code="", textures={} }
|
||||
|
||||
|
||||
func edit(node) -> void:
|
||||
node.get_parent().call_deferred("update_view", self)
|
||||
|
||||
func create_subgraph(gens : Array) -> void:
|
||||
# Remove material, gen_inputs and gen_outputs nodes
|
||||
var generators = []
|
||||
var center = Vector2(0, 0)
|
||||
var left_bound = 65535
|
||||
var right_bound = -65536
|
||||
var upper_bound = 65536
|
||||
var count = 0
|
||||
# Filter group nodes and calculate boundin box
|
||||
for g in gens:
|
||||
if g.name != "Material" and g.name != "gen_inputs" and g.name != "gen_outputs":
|
||||
generators.push_back(g)
|
||||
var p = g.position
|
||||
center += p
|
||||
count += 1
|
||||
if left_bound > p.x: left_bound = p.x
|
||||
if right_bound < p.x: right_bound = p.x
|
||||
if upper_bound > p.y: upper_bound = p.y
|
||||
if count == 0:
|
||||
return
|
||||
center /= count
|
||||
# Create a new graph and add it to the current one
|
||||
var new_graph = get_script().new()
|
||||
new_graph.name = "graph"
|
||||
add_generator(new_graph)
|
||||
new_graph.position = center
|
||||
# Add grouped generators and keep their names
|
||||
var names : Array = []
|
||||
for g in generators:
|
||||
names.push_back(g.name)
|
||||
remove_child(g)
|
||||
new_graph.add_generator(g)
|
||||
# Create inputs and outputs generators
|
||||
var gen_inputs = MMGenIOs.new()
|
||||
gen_inputs.name = "gen_inputs"
|
||||
gen_inputs.position = Vector2(left_bound-300, center.y)
|
||||
new_graph.add_generator(gen_inputs)
|
||||
var gen_outputs = MMGenIOs.new()
|
||||
gen_outputs.name = "gen_outputs"
|
||||
gen_outputs.position = Vector2(right_bound+300, center.y)
|
||||
new_graph.add_generator(gen_outputs)
|
||||
# Process connections
|
||||
var new_graph_connections = []
|
||||
var my_new_connections = []
|
||||
var inputs = []
|
||||
var outputs = []
|
||||
for c in connections:
|
||||
var src_name = c.from+"."+str(c.from_port)
|
||||
if names.find(c.from) != -1 and names.find(c.to) != -1:
|
||||
new_graph_connections.push_back(c)
|
||||
elif names.find(c.from) != -1:
|
||||
var port_index = outputs.find(src_name)
|
||||
if port_index == -1:
|
||||
port_index = outputs.size()
|
||||
outputs.push_back(src_name)
|
||||
gen_outputs.ports.push_back( { name="port"+str(port_index), type="rgba" } )
|
||||
print(gen_outputs.ports)
|
||||
my_new_connections.push_back( { from=new_graph.name, from_port=port_index, to=c.to, to_port=c.to_port } )
|
||||
new_graph_connections.push_back( { from=c.from, from_port=c.from_port, to="gen_outputs", to_port=port_index } )
|
||||
elif names.find(c.to) != -1:
|
||||
var port_index = inputs.find(src_name)
|
||||
if port_index == -1:
|
||||
port_index = inputs.size()
|
||||
inputs.push_back(src_name)
|
||||
gen_inputs.ports.push_back( { name="port"+str(port_index), type="rgba" } )
|
||||
my_new_connections.push_back( { from=c.from, from_port=c.from_port, to=new_graph.name, to_port=port_index } )
|
||||
new_graph_connections.push_back( { from="gen_inputs", from_port=port_index, to=c.to, to_port=c.to_port } )
|
||||
else:
|
||||
my_new_connections.push_back(c)
|
||||
connections = my_new_connections
|
||||
new_graph.connections = new_graph_connections
|
||||
var found_remote = false
|
||||
var remote_script = load("res://addons/material_maker/engine/gen_remote.gd")
|
||||
for g in generators:
|
||||
if g.get_script() == remote_script:
|
||||
g.name = "gen_parameters"
|
||||
found_remote = true
|
||||
new_graph.parameters = g.parameters.duplicate(true)
|
||||
break
|
||||
if !found_remote:
|
||||
var gen_parameters = remote_script.new()
|
||||
gen_parameters.name = "gen_parameters"
|
||||
gen_parameters.position = Vector2(center.x - 200, upper_bound-300)
|
||||
new_graph.add_child(gen_parameters)
|
||||
fix_remotes()
|
||||
new_graph.fix_remotes()
|
||||
|
||||
|
||||
func _serialize(data: Dictionary) -> Dictionary:
|
||||
data.label = label
|
||||
data.nodes = []
|
||||
for c in get_children():
|
||||
data.nodes.append(c.serialize())
|
||||
data.connections = connections
|
||||
return data
|
||||
|
||||
func _deserialize(data : Dictionary) -> void:
|
||||
if data.has("label"):
|
||||
label = data.label
|
||||
var nodes = data.nodes if data.has("nodes") else []
|
||||
var connections = data.connections if data.has("connections") else []
|
||||
load("res://addons/material_maker/engine/loader.gd").add_to_gen_graph(self, nodes, connections)
|
21
addons/material_maker/engine/gen_image.gd
Normal file
@ -0,0 +1,21 @@
|
||||
tool
|
||||
extends MMGenTexture
|
||||
class_name MMGenImage
|
||||
|
||||
"""
|
||||
Texture generator from image
|
||||
"""
|
||||
|
||||
func get_type() -> String:
|
||||
return "image"
|
||||
|
||||
func get_type_name() -> String:
|
||||
return "Image"
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
return [ { name="image", type="path" } ]
|
||||
|
||||
func set_parameter(n : String, v) -> void:
|
||||
.set_parameter(n, v)
|
||||
if n == "image":
|
||||
texture.load(v)
|
102
addons/material_maker/engine/gen_ios.gd
Normal file
@ -0,0 +1,102 @@
|
||||
tool
|
||||
extends MMGenBase
|
||||
class_name MMGenIOs
|
||||
|
||||
"""
|
||||
IOs just forward their inputs to their outputs and are used to specify graph interfaces
|
||||
"""
|
||||
|
||||
var ports : Array = []
|
||||
|
||||
var editable = false
|
||||
|
||||
func can_be_deleted() -> bool:
|
||||
return name != "gen_inputs" and name != "gen_outputs"
|
||||
|
||||
|
||||
func get_type() -> String:
|
||||
return "ios"
|
||||
|
||||
func get_type_name() -> String:
|
||||
match name:
|
||||
"gen_inputs": return "Inputs"
|
||||
"gen_outputs": return "Outputs"
|
||||
_: return "IOs"
|
||||
|
||||
|
||||
func get_io_defs() -> Array:
|
||||
var rv : Array = []
|
||||
for p in ports:
|
||||
rv.push_back({ name=p.name, type="rgba" })
|
||||
return rv
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
return [] if name == "gen_inputs" else get_io_defs()
|
||||
|
||||
func get_output_defs() -> Array:
|
||||
return [] if name == "gen_outputs" else get_io_defs()
|
||||
|
||||
|
||||
func toggle_editable() -> bool:
|
||||
editable = !editable
|
||||
if editable:
|
||||
model = null
|
||||
return true
|
||||
|
||||
func is_editable() -> bool:
|
||||
return editable
|
||||
|
||||
|
||||
func add_port() -> void:
|
||||
ports.append({ name="unnamed", type="rgba" })
|
||||
emit_signal("parameter_changed", "__update_all__", null)
|
||||
|
||||
func set_port_name(i : int, n : String) -> void:
|
||||
ports[i].name = n
|
||||
|
||||
func delete_port(i : int) -> void:
|
||||
ports.remove(i)
|
||||
var input_gen = get_parent() if name == "gen_inputs" else self
|
||||
var output_gen = get_parent() if name == "gen_outputs" else self
|
||||
var port_reconnects = { i:-1 }
|
||||
while i < ports.size():
|
||||
port_reconnects[i+1] = i
|
||||
i += 1
|
||||
input_gen.get_parent().reconnect_inputs(input_gen, port_reconnects)
|
||||
output_gen.get_parent().reconnect_outputs(output_gen, port_reconnects)
|
||||
emit_signal("parameter_changed", "__update_all__", null)
|
||||
|
||||
func swap_ports(i1 : int, i2 : int) -> void:
|
||||
var tmp = ports[i1]
|
||||
ports[i1] = ports[i2]
|
||||
ports[i2] = tmp
|
||||
var input_gen = get_parent() if name == "gen_inputs" else self
|
||||
var output_gen = get_parent() if name == "gen_outputs" else self
|
||||
var port_reconnects = { i1:i2, i2:i1 }
|
||||
input_gen.get_parent().reconnect_inputs(input_gen, port_reconnects)
|
||||
output_gen.get_parent().reconnect_outputs(output_gen, port_reconnects)
|
||||
emit_signal("parameter_changed", "__update_all__", null)
|
||||
|
||||
func source_changed(input_index : int) -> void:
|
||||
if name == "gen_outputs":
|
||||
if get_parent() != null:
|
||||
get_parent().notify_output_change(input_index)
|
||||
else:
|
||||
notify_output_change(input_index)
|
||||
|
||||
func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
||||
var source = get_source(output_index)
|
||||
if source != null:
|
||||
var rv = source.generator._get_shader_code(uv, source.output_index, context)
|
||||
while rv is GDScriptFunctionState:
|
||||
rv = yield(rv, "completed")
|
||||
return rv
|
||||
return { defs="", code="", textures={} }
|
||||
|
||||
func _serialize(data: Dictionary) -> Dictionary:
|
||||
data.type = "ios"
|
||||
data.ports = ports
|
||||
return data
|
||||
|
||||
func _deserialize(data : Dictionary) -> void:
|
||||
ports = data.ports
|
252
addons/material_maker/engine/gen_material.gd
Normal file
@ -0,0 +1,252 @@
|
||||
tool
|
||||
extends MMGenBase
|
||||
class_name MMGenMaterial
|
||||
|
||||
var material : SpatialMaterial
|
||||
var generated_textures = {}
|
||||
|
||||
const TEXTURE_LIST = [
|
||||
{ port=0, texture="albedo" },
|
||||
{ port=3, texture="emission" },
|
||||
{ port=4, texture="normal" },
|
||||
{ ports=[5, 2, 1], default_values=["1.0", "1.0", "1.0"], texture="orm" },
|
||||
{ port=6, texture="depth" },
|
||||
{ port=7, texture="subsurf_scatter" }
|
||||
]
|
||||
|
||||
# The minimum allowed texture size as a power-of-two exponent
|
||||
const TEXTURE_SIZE_MIN = 4 # 16x16
|
||||
|
||||
# The maximum allowed texture size as a power-of-two exponent
|
||||
const TEXTURE_SIZE_MAX = 12 # 4096x4096
|
||||
|
||||
# The default texture size as a power-of-two exponent
|
||||
const TEXTURE_SIZE_DEFAULT = 10 # 1024x1024
|
||||
|
||||
func _ready() -> void:
|
||||
for t in TEXTURE_LIST:
|
||||
generated_textures[t.texture] = null
|
||||
material = SpatialMaterial.new()
|
||||
|
||||
func can_be_deleted() -> bool:
|
||||
return false
|
||||
|
||||
func get_type() -> String:
|
||||
return "material"
|
||||
|
||||
func get_type_name() -> String:
|
||||
return "Material"
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
return [
|
||||
{ name="albedo_color", label="Albedo", type="color", default={ r=1.0, g=1.0, b=1.0, a=1.0} },
|
||||
{ name="metallic", label="Metallic", type="float", min=0.0, max=1.0, step=0.05, default=1.0 },
|
||||
{ name="roughness", label="Roughness", type="float", min=0.0, max=1.0, step=0.05, default=1.0 },
|
||||
{ name="emission_energy", label="Emission", type="float", min=0.0, max=8.0, step=0.05, default=1.0 },
|
||||
{ name="normal_scale", label="Normal", type="float", min=0.0, max=8.0, step=0.05, default=1.0 },
|
||||
{ name="ao_light_affect", label="Ambient occlusion", type="float", min=0.0, max=1.0, step=0.05, default=1.0 },
|
||||
{ name="depth_scale", label="Depth", type="float", min=0.0, max=1.0, step=0.05, default=1.0 },
|
||||
{ name="subsurf_scatter_strength", label="Subsurf. Scatter.", type="float", min=0.0, max=1.0, step=0.05, default=0.0 },
|
||||
{ name="size", label="Size", type="size", first=TEXTURE_SIZE_MIN, last=TEXTURE_SIZE_MAX, default=TEXTURE_SIZE_DEFAULT }
|
||||
]
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
return [
|
||||
{ name="albedo_texture", label="", type="rgb" },
|
||||
{ name="metallic_texture", label="", type="f" },
|
||||
{ name="roughness_texture", label="", type="f" },
|
||||
{ name="emission_texture", label="", type="rgb" },
|
||||
{ name="normal_texture", label="", type="rgb" },
|
||||
{ name="ao_texture", label="", type="f" },
|
||||
{ name="depth_texture", label="", type="f" },
|
||||
{ name="subsurf_scatter_texture", label="", type="f" }
|
||||
]
|
||||
|
||||
func get_image_size() -> int:
|
||||
var rv : int
|
||||
if parameters.has("size"):
|
||||
rv = int(pow(2, parameters.size))
|
||||
else:
|
||||
rv = int(pow(2, TEXTURE_SIZE_DEFAULT))
|
||||
return rv
|
||||
|
||||
func update_preview() -> void:
|
||||
var graph_edit = self
|
||||
while graph_edit is MMGenBase:
|
||||
graph_edit = graph_edit.get_parent()
|
||||
if graph_edit != null and graph_edit.has_method("send_changed_signal"):
|
||||
graph_edit.send_changed_signal()
|
||||
|
||||
func set_parameter(p, v) -> void:
|
||||
.set_parameter(p, v)
|
||||
update_preview()
|
||||
|
||||
func source_changed(input_index : int) -> void:
|
||||
for t in TEXTURE_LIST:
|
||||
if t.has("port") and t.port == input_index:
|
||||
generated_textures[t.texture] = null
|
||||
elif t.has("ports") and t.ports.has(input_index):
|
||||
generated_textures[t.texture] = null
|
||||
update_preview()
|
||||
|
||||
func render_textures() -> void:
|
||||
for t in TEXTURE_LIST:
|
||||
var texture = null
|
||||
if t.has("port"):
|
||||
if generated_textures[t.texture] != null:
|
||||
continue
|
||||
var source = get_source(t.port)
|
||||
if source != null:
|
||||
var result = source.generator.render(source.output_index, get_image_size())
|
||||
while result is GDScriptFunctionState:
|
||||
result = yield(result, "completed")
|
||||
texture = ImageTexture.new()
|
||||
result.copy_to_texture(texture)
|
||||
result.release()
|
||||
# To work, this must be set after calling `copy_to_texture()`
|
||||
texture.flags |= ImageTexture.FLAG_ANISOTROPIC_FILTER
|
||||
|
||||
# Disable filtering for small textures, as they're considered to be used
|
||||
# for a pixel art style
|
||||
if texture.get_size().x <= 128:
|
||||
texture.flags ^= ImageTexture.FLAG_FILTER
|
||||
elif t.has("ports"):
|
||||
var context : MMGenContext = MMGenContext.new()
|
||||
var code = []
|
||||
var shader_textures = {}
|
||||
for i in range(t.ports.size()):
|
||||
var source = get_source(t.ports[i])
|
||||
if source != null:
|
||||
var status = source.generator.get_shader_code("UV", source.output_index, context)
|
||||
while status is GDScriptFunctionState:
|
||||
status = yield(status, "completed")
|
||||
code.push_back(status)
|
||||
for t in status.textures.keys():
|
||||
shader_textures[t] = status.textures[t]
|
||||
else:
|
||||
code.push_back({ defs="", code="", f=t.default_values[i] })
|
||||
var shader : String = mm_renderer.generate_combined_shader(code[0], code[1], code[2])
|
||||
var result = mm_renderer.render_shader(shader, shader_textures, get_image_size())
|
||||
while result is GDScriptFunctionState:
|
||||
result = yield(result, "completed")
|
||||
texture = ImageTexture.new()
|
||||
result.copy_to_texture(texture)
|
||||
result.release()
|
||||
# To work, this must be set after calling `copy_to_texture()`
|
||||
texture.flags |= ImageTexture.FLAG_ANISOTROPIC_FILTER
|
||||
|
||||
# Disable filtering for small textures, as they're considered to be used
|
||||
# for a pixel art style
|
||||
if texture.get_size().x <= 128:
|
||||
texture.flags ^= ImageTexture.FLAG_FILTER
|
||||
|
||||
generated_textures[t.texture] = texture
|
||||
|
||||
func update_materials(material_list) -> void:
|
||||
for m in material_list:
|
||||
update_spatial_material(m)
|
||||
|
||||
func get_generated_texture(slot, file_prefix = null) -> ImageTexture:
|
||||
if file_prefix != null:
|
||||
var file_name = "%s_%s.png" % [ file_prefix, slot ]
|
||||
if File.new().file_exists(file_name):
|
||||
return load(file_name) as ImageTexture
|
||||
else:
|
||||
return null
|
||||
else:
|
||||
return generated_textures[slot]
|
||||
|
||||
func update_spatial_material(m, file_prefix = null) -> void:
|
||||
var texture
|
||||
|
||||
if m is SpatialMaterial:
|
||||
# Make the material double-sided for better visiblity in the preview
|
||||
m.params_cull_mode = SpatialMaterial.CULL_DISABLED
|
||||
|
||||
m.albedo_color = parameters.albedo_color
|
||||
m.albedo_texture = get_generated_texture("albedo", file_prefix)
|
||||
m.metallic = parameters.metallic
|
||||
m.roughness = parameters.roughness
|
||||
# Metallic
|
||||
texture = get_generated_texture("orm", file_prefix)
|
||||
m.metallic_texture = texture
|
||||
m.metallic_texture_channel = SpatialMaterial.TEXTURE_CHANNEL_BLUE
|
||||
# Roughness
|
||||
m.roughness_texture = texture
|
||||
m.roughness_texture_channel = SpatialMaterial.TEXTURE_CHANNEL_GREEN
|
||||
# Emission
|
||||
texture = get_generated_texture("emission", file_prefix)
|
||||
if texture != null:
|
||||
m.emission_enabled = true
|
||||
m.emission_energy = parameters.emission_energy
|
||||
m.emission_texture = texture
|
||||
else:
|
||||
m.emission_enabled = false
|
||||
# Normal map
|
||||
texture = get_generated_texture("normal", file_prefix)
|
||||
if texture != null:
|
||||
m.normal_enabled = true
|
||||
m.normal_texture = texture
|
||||
else:
|
||||
m.normal_enabled = false
|
||||
# Ambient occlusion
|
||||
if get_source(5) != null:
|
||||
m.ao_enabled = true
|
||||
m.ao_light_affect = parameters.ao_light_affect
|
||||
m.ao_texture = m.metallic_texture
|
||||
m.ao_texture_channel = SpatialMaterial.TEXTURE_CHANNEL_RED
|
||||
else:
|
||||
m.ao_enabled = false
|
||||
# Depth
|
||||
texture = get_generated_texture("depth", file_prefix)
|
||||
if texture != null:
|
||||
m.depth_enabled = true
|
||||
m.depth_deep_parallax = true
|
||||
m.depth_scale = parameters.depth_scale * 0.2
|
||||
m.depth_texture = texture
|
||||
else:
|
||||
m.depth_enabled = false
|
||||
# Subsurface scattering
|
||||
texture = get_generated_texture("subsurf_scatter", file_prefix)
|
||||
if texture != null:
|
||||
m.subsurf_scatter_enabled = true
|
||||
m.subsurf_scatter_strength = parameters.subsurf_scatter_strength
|
||||
m.subsurf_scatter_texture = texture
|
||||
else:
|
||||
m.subsurf_scatter_enabled = false
|
||||
else:
|
||||
m.set_shader_param("albedo", parameters.albedo_color)
|
||||
m.set_shader_param("texture_albedo", get_generated_texture("albedo", file_prefix))
|
||||
m.set_shader_param("metallic", parameters.metallic)
|
||||
m.set_shader_param("roughness", parameters.roughness)
|
||||
m.set_shader_param("texture_metallic", get_generated_texture("orm", file_prefix))
|
||||
m.set_shader_param("metallic_texture_channel", PoolRealArray([0.0, 0.0, 1.0, 0.0]))
|
||||
m.set_shader_param("texture_roughness", get_generated_texture("orm", file_prefix))
|
||||
m.set_shader_param("roughness_texture_channel", PoolRealArray([0.0, 1.0, 0.0, 0.0]))
|
||||
m.set_shader_param("emission_energy", parameters.emission_energy)
|
||||
m.set_shader_param("texture_emission", get_generated_texture("emission", file_prefix))
|
||||
m.set_shader_param("normal_scale", parameters.normal_scale)
|
||||
m.set_shader_param("texture_normal", get_generated_texture("normal", file_prefix))
|
||||
m.set_shader_param("depth_scale", parameters.depth_scale * 0.2)
|
||||
m.set_shader_param("texture_depth", get_generated_texture("depth", file_prefix))
|
||||
|
||||
func export_textures(prefix, editor_interface = null) -> SpatialMaterial:
|
||||
for t in TEXTURE_LIST:
|
||||
var texture = generated_textures[t.texture]
|
||||
if texture != null:
|
||||
var image = texture.get_data()
|
||||
image.save_png("%s_%s.png" % [ prefix, t.texture ])
|
||||
if Engine.editor_hint and editor_interface != null:
|
||||
var resource_filesystem = editor_interface.get_resource_filesystem()
|
||||
resource_filesystem.scan()
|
||||
yield(resource_filesystem, "filesystem_changed")
|
||||
var new_material = SpatialMaterial.new()
|
||||
update_spatial_material(new_material, prefix)
|
||||
ResourceSaver.save("%s.tres" % [ prefix ], new_material)
|
||||
resource_filesystem.scan()
|
||||
return new_material
|
||||
|
||||
return null
|
||||
|
||||
func _serialize(data: Dictionary) -> Dictionary:
|
||||
return data
|
225
addons/material_maker/engine/gen_remote.gd
Normal file
@ -0,0 +1,225 @@
|
||||
tool
|
||||
extends MMGenBase
|
||||
class_name MMGenRemote
|
||||
|
||||
"""
|
||||
Remote can be used to control parameters from several generators in the same graph
|
||||
"""
|
||||
|
||||
var widgets = []
|
||||
|
||||
func can_be_deleted() -> bool:
|
||||
return name != "gen_parameters"
|
||||
|
||||
func set_widgets(w : Array) -> void:
|
||||
widgets = w
|
||||
fix()
|
||||
|
||||
func get_widget(n : String) -> Dictionary:
|
||||
for w in widgets:
|
||||
if w.name == n:
|
||||
return w
|
||||
return {}
|
||||
|
||||
func get_next_widget_name():
|
||||
var i = 0
|
||||
while true:
|
||||
var param_name = "param"+str(i)
|
||||
var used = false
|
||||
for w in widgets:
|
||||
if w.has("name") and w.name == param_name:
|
||||
used = true
|
||||
break
|
||||
if !used:
|
||||
return param_name
|
||||
i += 1
|
||||
|
||||
func fix() -> void:
|
||||
# Make sure all widgets have a name
|
||||
var i = 0
|
||||
for w in widgets:
|
||||
if !w.has("name"):
|
||||
w.name = get_next_widget_name()
|
||||
print("Named "+w.name)
|
||||
var parent = get_parent()
|
||||
if parent == null:
|
||||
return
|
||||
var updated_widgets : Array = []
|
||||
var removed_widgets = false
|
||||
for w in widgets:
|
||||
var updated_linked_widgets : Array = []
|
||||
for l in w.linked_widgets:
|
||||
var linked_widget : MMGenBase = parent.get_node(l.node)
|
||||
if linked_widget != null and linked_widget.get_parameter_def(l.widget).size() > 0:
|
||||
updated_linked_widgets.push_back(l)
|
||||
if updated_linked_widgets.size() == 0:
|
||||
removed_widgets = true
|
||||
continue
|
||||
w.linked_widgets = updated_linked_widgets
|
||||
updated_widgets.push_back(w)
|
||||
if !parameters.has(w.name):
|
||||
match w.type:
|
||||
"config_control":
|
||||
parameters[w.name] = 0
|
||||
"linked_control":
|
||||
# Should get current value of a linked widget
|
||||
parameters[w.name] = 0
|
||||
if removed_widgets:
|
||||
widgets = updated_widgets
|
||||
emit_signal("parameter_changed", "__update_all__", null)
|
||||
|
||||
func get_type() -> String:
|
||||
return "remote"
|
||||
|
||||
func get_type_name() -> String:
|
||||
return "Parameters" if name == "gen_parameters" else "Remote"
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
var rv = []
|
||||
var i = 0
|
||||
for w in widgets:
|
||||
match w.type:
|
||||
"config_control":
|
||||
var p : Dictionary = { name=w.name, label=w.label, type="enum", values=[] }
|
||||
var configurations = w.configurations.keys()
|
||||
configurations.sort()
|
||||
for c in configurations:
|
||||
p.values.push_back({ name=c, value=c })
|
||||
rv.append(p)
|
||||
i += 1
|
||||
"linked_control":
|
||||
var linked = w.linked_widgets[0]
|
||||
var p : Dictionary
|
||||
if linked != null && is_inside_tree():
|
||||
var gen = get_parent().get_node(linked.node)
|
||||
if gen != null:
|
||||
var gen_params = gen.get_parameter_defs()
|
||||
for pd in gen_params:
|
||||
if pd.name == linked.widget:
|
||||
p = pd.duplicate(true)
|
||||
break
|
||||
p.name = w.name
|
||||
p.label = w.label
|
||||
rv.append(p)
|
||||
i += 1
|
||||
_:
|
||||
print("Unsupported widget of type "+str(w.type))
|
||||
return rv
|
||||
|
||||
func set_parameter(p : String, v) -> void:
|
||||
var parent = get_parent()
|
||||
if parent == null:
|
||||
return
|
||||
var widget = get_widget(p)
|
||||
if !widget.empty():
|
||||
match widget.type:
|
||||
"linked_control":
|
||||
for w in widget.linked_widgets:
|
||||
var node = parent.get_node(w.node)
|
||||
if node != null:
|
||||
node.set_parameter(w.widget, v)
|
||||
"config_control":
|
||||
if v < widget.configurations.size():
|
||||
var configurations = widget.configurations.keys()
|
||||
configurations.sort()
|
||||
for w in widget.configurations[configurations[v]]:
|
||||
var node = parent.get_node(w.node)
|
||||
if node != null:
|
||||
node.set_parameter(w.widget, MMType.deserialize_value(w.value))
|
||||
else:
|
||||
# incorrect configuration index
|
||||
print("error: incorrect config control parameter value")
|
||||
return
|
||||
.set_parameter(p, v)
|
||||
if name == "gen_parameters":
|
||||
get_parent().parameters[p] = v
|
||||
|
||||
func create_linked_control(label : String) -> String:
|
||||
var n = get_next_widget_name()
|
||||
widgets.push_back({ name=n, label=label, type="linked_control", linked_widgets=[] })
|
||||
return n
|
||||
|
||||
func create_config_control(label : String) -> String:
|
||||
var n = get_next_widget_name()
|
||||
widgets.push_back({ name=n, label=label, type="config_control", linked_widgets=[], configurations={} })
|
||||
return n
|
||||
|
||||
func set_label(widget_name : String, new_label : String) -> void:
|
||||
get_widget(widget_name).label = new_label
|
||||
|
||||
func can_link_parameter(widget_name : String, generator : MMGenBase, param : String) -> bool:
|
||||
var widget : Dictionary = get_widget(widget_name)
|
||||
if !widget.linked_widgets.empty():
|
||||
# Check if the param is already linked
|
||||
for lw in widget.linked_widgets:
|
||||
if lw.node == generator.name and lw.widget == param:
|
||||
return false
|
||||
# Check the parameter type
|
||||
var linked : Dictionary = widget.linked_widgets[0]
|
||||
var linked_generator : MMGenBase = get_parent().get_node(linked.node)
|
||||
var linked_parameter : Dictionary = linked_generator.get_parameter_def(linked.widget)
|
||||
var parameter : Dictionary = generator.get_parameter_def(param)
|
||||
if parameter.type != linked_parameter.type:
|
||||
return false
|
||||
match parameter.type:
|
||||
"enum":
|
||||
if to_json(linked_parameter.values) != to_json(parameter.values):
|
||||
return false
|
||||
return true
|
||||
|
||||
func link_parameter(widget_name : String, generator : MMGenBase, param : String) -> void:
|
||||
if !can_link_parameter(widget_name, generator, param):
|
||||
return
|
||||
var widget : Dictionary = get_widget(widget_name)
|
||||
widget.linked_widgets.push_back({ node=generator.name, widget=param })
|
||||
if widget.linked_widgets.size() == 1:
|
||||
match widget.type:
|
||||
"linked_control":
|
||||
parameters[widget_name] = generator.parameters[param]
|
||||
"config_control":
|
||||
parameters[widget_name] = 0
|
||||
emit_signal("parameter_changed", "__update_all__", null)
|
||||
|
||||
func remove_parameter(widget_name : String) -> void:
|
||||
for i in range(widgets.size()):
|
||||
if widgets[i].name == widget_name:
|
||||
widgets.remove(i)
|
||||
break
|
||||
emit_signal("parameter_changed", "__update_all__", null)
|
||||
|
||||
func add_configuration(widget_name : String, config_name : String) -> void:
|
||||
var widget = get_widget(widget_name)
|
||||
if widget.type == "config_control":
|
||||
widget.configurations[config_name] = []
|
||||
var configurations = widget.configurations.keys()
|
||||
configurations.sort()
|
||||
parameters[widget.name] = configurations.find(config_name)
|
||||
update_configuration(widget_name, config_name)
|
||||
|
||||
func update_configuration(widget_name : String, config_name : String) -> void:
|
||||
var widget = get_widget(widget_name)
|
||||
if widget.type == "config_control":
|
||||
var c = []
|
||||
var parent = get_parent()
|
||||
for w in widget.linked_widgets:
|
||||
var g = parent.get_node(w.node)
|
||||
if g != null:
|
||||
var value = MMType.serialize_value(g.parameters[w.widget])
|
||||
c.push_back({ node=w.node, widget=w.widget, value=value })
|
||||
widget.configurations[config_name] = c
|
||||
emit_signal("parameter_changed", "__update_all__", null)
|
||||
|
||||
func remove_configuration(widget_name : String, config_name : String) -> void:
|
||||
var widget = get_widget(widget_name)
|
||||
if widget.type == "config_control":
|
||||
widget.configurations.erase(config_name)
|
||||
emit_signal("parameter_changed", "__update_all__", null)
|
||||
|
||||
|
||||
func _serialize(data: Dictionary) -> Dictionary:
|
||||
data.type = "remote"
|
||||
data.widgets = widgets
|
||||
return data
|
||||
|
||||
func _deserialize(data : Dictionary) -> void:
|
||||
set_widgets(data.widgets.duplicate(true))
|
306
addons/material_maker/engine/gen_shader.gd
Normal file
@ -0,0 +1,306 @@
|
||||
tool
|
||||
extends MMGenBase
|
||||
class_name MMGenShader
|
||||
|
||||
var shader_model : Dictionary = {}
|
||||
var uses_seed = false
|
||||
|
||||
var editable = false
|
||||
|
||||
func toggle_editable() -> bool:
|
||||
editable = !editable
|
||||
if editable:
|
||||
model = null
|
||||
return true
|
||||
|
||||
func is_editable() -> bool:
|
||||
return editable
|
||||
|
||||
func has_randomness():
|
||||
return uses_seed
|
||||
|
||||
func get_type() -> String:
|
||||
return "shader"
|
||||
|
||||
func get_type_name() -> String:
|
||||
if shader_model.has("name"):
|
||||
return shader_model.name
|
||||
return .get_type_name()
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
if shader_model == null or !shader_model.has("parameters"):
|
||||
return []
|
||||
else:
|
||||
return shader_model.parameters
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
if shader_model == null or !shader_model.has("inputs"):
|
||||
return []
|
||||
else:
|
||||
return shader_model.inputs
|
||||
|
||||
func get_output_defs():
|
||||
if shader_model == null or !shader_model.has("outputs"):
|
||||
return []
|
||||
else:
|
||||
return shader_model.outputs
|
||||
|
||||
func set_shader_model(data: Dictionary):
|
||||
shader_model = data
|
||||
init_parameters()
|
||||
uses_seed = false
|
||||
if shader_model.has("outputs"):
|
||||
for i in range(shader_model.outputs.size()):
|
||||
var output = shader_model.outputs[i]
|
||||
var output_code = ""
|
||||
if output.has("rgba"):
|
||||
shader_model.outputs[i].type = "rgba"
|
||||
output_code = output.rgba
|
||||
elif output.has("rgb"):
|
||||
shader_model.outputs[i].type = "rgb"
|
||||
output_code = output.rgb
|
||||
elif output.has("f"):
|
||||
shader_model.outputs[i].type = "f"
|
||||
output_code = output.f
|
||||
else:
|
||||
print("Unsupported output type")
|
||||
if output_code.find("$seed") != -1 or output_code.find("$(seed)") != -1:
|
||||
uses_seed = true
|
||||
if shader_model.has("code"):
|
||||
if shader_model.code.find("$seed") != -1 or shader_model.code.find("$(seed)") != -1:
|
||||
uses_seed = true
|
||||
if shader_model.has("instance"):
|
||||
if shader_model.instance.find("$seed") != -1 or shader_model.instance.find("$(seed)") != -1:
|
||||
uses_seed = true
|
||||
|
||||
func find_keyword_call(string, keyword):
|
||||
var search_string = "$%s(" % keyword
|
||||
var position = string.find(search_string)
|
||||
if position == -1:
|
||||
return null
|
||||
var parenthesis_level = 0
|
||||
var parameter_begin = position+search_string.length()
|
||||
var parameter_end = -1
|
||||
for i in range(parameter_begin, string.length()):
|
||||
if string[i] == '(':
|
||||
parenthesis_level += 1
|
||||
elif string[i] == ')':
|
||||
if parenthesis_level == 0:
|
||||
return string.substr(parameter_begin, i-parameter_begin)
|
||||
parenthesis_level -= 1
|
||||
return ""
|
||||
|
||||
func replace_input(string, context, input, type, src, default) -> Dictionary:
|
||||
var required_globals = []
|
||||
var required_defs = ""
|
||||
var required_code = ""
|
||||
var required_textures = {}
|
||||
var new_pass_required = false
|
||||
while true:
|
||||
var uv = find_keyword_call(string, input)
|
||||
if uv == null:
|
||||
break
|
||||
elif uv == "":
|
||||
print("syntax error")
|
||||
break
|
||||
elif uv.find("$") != -1:
|
||||
new_pass_required = true
|
||||
break
|
||||
var src_code
|
||||
if src == null:
|
||||
src_code = subst(default, context, "(%s)" % uv)
|
||||
else:
|
||||
src_code = src.generator.get_shader_code(uv, src.output_index, context)
|
||||
while src_code is GDScriptFunctionState:
|
||||
src_code = yield(src_code, "completed")
|
||||
src_code.string = src_code[type]
|
||||
# Add global definitions
|
||||
if src_code.has("globals"):
|
||||
for d in src_code.globals:
|
||||
if required_globals.find(d) == -1:
|
||||
required_globals.push_back(d)
|
||||
# Add generated definitions
|
||||
if src_code.has("defs"):
|
||||
required_defs += src_code.defs
|
||||
# Add generated code
|
||||
if src_code.has("code"):
|
||||
required_code += src_code.code
|
||||
# Add textures
|
||||
if src_code.has("textures"):
|
||||
required_textures = src_code.textures
|
||||
string = string.replace("$%s(%s)" % [ input, uv ], src_code.string)
|
||||
return { string=string, globals=required_globals, defs=required_defs, code=required_code, textures=required_textures, new_pass_required=new_pass_required }
|
||||
|
||||
func is_word_letter(l) -> bool:
|
||||
return "azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN1234567890_".find(l) != -1
|
||||
|
||||
func replace_variable(string, variable, value) -> String:
|
||||
string = string.replace("$(%s)" % variable, value)
|
||||
var keyword_size = variable.length()+1
|
||||
var new_string = ""
|
||||
while !string.empty():
|
||||
var pos = string.find("$"+variable)
|
||||
if pos == -1:
|
||||
new_string += string
|
||||
break
|
||||
new_string += string.left(pos)
|
||||
string = string.right(pos)
|
||||
if string.empty() or !is_word_letter(string[0]):
|
||||
new_string += value
|
||||
else:
|
||||
new_string += "$"+variable
|
||||
string = string.right(keyword_size)
|
||||
return new_string
|
||||
|
||||
func subst(string, context, uv = "") -> Dictionary:
|
||||
var genname = "o"+str(get_instance_id())
|
||||
var required_globals = []
|
||||
var required_defs = ""
|
||||
var required_code = ""
|
||||
var required_textures = {}
|
||||
string = replace_variable(string, "name", genname)
|
||||
if uv != "":
|
||||
var genname_uv = genname+"_"+str(context.get_variant(self, uv))
|
||||
string = replace_variable(string, "name_uv", genname_uv)
|
||||
var tmp_string = replace_variable(string, "seed", str(get_seed()))
|
||||
if tmp_string != string:
|
||||
string = tmp_string
|
||||
if uv != "":
|
||||
string = replace_variable(string, "uv", "("+uv+")")
|
||||
if shader_model.has("parameters") and typeof(shader_model.parameters) == TYPE_ARRAY:
|
||||
for p in shader_model.parameters:
|
||||
if !p.has("name") or !p.has("type"):
|
||||
continue
|
||||
var value = parameters[p.name]
|
||||
var value_string = null
|
||||
if p.type == "float":
|
||||
value_string = "%.9f" % value
|
||||
elif p.type == "size":
|
||||
value_string = "%.9f" % pow(2, value)
|
||||
elif p.type == "enum":
|
||||
if value >= p.values.size():
|
||||
value = 0
|
||||
value_string = p.values[value].value
|
||||
elif p.type == "color":
|
||||
value_string = "vec4(%.9f, %.9f, %.9f, %.9f)" % [ value.r, value.g, value.b, value.a ]
|
||||
elif p.type == "gradient":
|
||||
value_string = genname+"_p_"+p.name+"_gradient_fct"
|
||||
elif p.type == "boolean":
|
||||
value_string = "true" if value else "false"
|
||||
else:
|
||||
print("Cannot replace parameter of type "+p.type)
|
||||
if value_string != null:
|
||||
string = replace_variable(string, p.name, value_string)
|
||||
if shader_model.has("inputs") and typeof(shader_model.inputs) == TYPE_ARRAY:
|
||||
var cont = true
|
||||
while cont:
|
||||
var changed = false
|
||||
var new_pass_required = false
|
||||
for i in range(shader_model.inputs.size()):
|
||||
var input = shader_model.inputs[i]
|
||||
var source = get_source(i)
|
||||
var result = replace_input(string, context, input.name, input.type, source, input.default)
|
||||
while result is GDScriptFunctionState:
|
||||
result = yield(result, "completed")
|
||||
if string != result.string:
|
||||
changed = true
|
||||
if result.new_pass_required:
|
||||
new_pass_required = true
|
||||
string = result.string
|
||||
# Add global definitions
|
||||
for d in result.globals:
|
||||
if required_globals.find(d) == -1:
|
||||
required_globals.push_back(d)
|
||||
# Add generated definitions
|
||||
required_defs += result.defs
|
||||
# Add generated code
|
||||
required_code += result.code
|
||||
for t in result.textures.keys():
|
||||
required_textures[t] = result.textures[t]
|
||||
cont = changed and new_pass_required
|
||||
return { string=string, globals=required_globals, defs=required_defs, code=required_code, textures=required_textures }
|
||||
|
||||
func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
||||
var genname = "o"+str(get_instance_id())
|
||||
var output_info = [ { field="rgba", type="vec4" }, { field="rgb", type="vec3" }, { field="f", type="float" } ]
|
||||
var rv = { globals=[], defs="", code="", textures={} }
|
||||
if shader_model != null and shader_model.has("outputs") and shader_model.outputs.size() > output_index:
|
||||
var output = shader_model.outputs[output_index]
|
||||
if shader_model.has("instance") && !context.has_variant(self):
|
||||
var subst_output = subst(shader_model.instance, context, "")
|
||||
while subst_output is GDScriptFunctionState:
|
||||
subst_output = yield(subst_output, "completed")
|
||||
rv.defs += subst_output.string
|
||||
for t in subst_output.textures.keys():
|
||||
rv.textures[t] = subst_output.textures[t]
|
||||
for p in shader_model.parameters:
|
||||
if p.type == "gradient":
|
||||
var g = parameters[p.name]
|
||||
if !(g is MMGradient):
|
||||
g = MMGradient.new()
|
||||
g.deserialize(parameters[p.name])
|
||||
rv.defs += g.get_shader(genname+"_p_"+p.name+"_gradient_fct")
|
||||
# Add inline code
|
||||
if shader_model.has("code"):
|
||||
var variant_index = context.get_variant(self, uv)
|
||||
if variant_index == -1:
|
||||
variant_index = context.get_variant(self, uv)
|
||||
var subst_code = subst(shader_model.code, context, uv)
|
||||
while subst_code is GDScriptFunctionState:
|
||||
subst_code = yield(subst_code, "completed")
|
||||
# Add global definitions
|
||||
for d in subst_code.globals:
|
||||
if rv.globals.find(d) == -1:
|
||||
rv.globals.push_back(d)
|
||||
# Add generated definitions
|
||||
rv.defs += subst_code.defs
|
||||
# Add generated code
|
||||
rv.code += subst_code.code
|
||||
rv.code += subst_code.string
|
||||
# Add output_code
|
||||
var variant_string = uv+","+str(output_index)
|
||||
var variant_index = context.get_variant(self, variant_string)
|
||||
if variant_index == -1:
|
||||
variant_index = context.get_variant(self, variant_string)
|
||||
for t in output_info:
|
||||
if output.has(t.field):
|
||||
var subst_output = subst(output[t.field], context, uv)
|
||||
while subst_output is GDScriptFunctionState:
|
||||
subst_output = yield(subst_output, "completed")
|
||||
# Add global definitions
|
||||
for d in subst_output.globals:
|
||||
if rv.globals.find(d) == -1:
|
||||
rv.globals.push_back(d)
|
||||
# Add generated definitions
|
||||
rv.defs += subst_output.defs
|
||||
# Add generated code
|
||||
rv.code += subst_output.code
|
||||
rv.code += "%s %s_%d_%d_%s = %s;\n" % [ t.type, genname, output_index, variant_index, t.field, subst_output.string ]
|
||||
for t in subst_output.textures.keys():
|
||||
rv.textures[t] = subst_output.textures[t]
|
||||
for t in output_info:
|
||||
if output.has(t.field):
|
||||
rv[t.field] = "%s_%d_%d_%s" % [ genname, output_index, variant_index, t.field ]
|
||||
if shader_model.has("global") && rv.globals.find(shader_model.global) == -1:
|
||||
rv.globals.push_back(shader_model.global)
|
||||
return rv
|
||||
|
||||
|
||||
func _serialize(data: Dictionary) -> Dictionary:
|
||||
data.shader_model = shader_model
|
||||
return data
|
||||
|
||||
func _deserialize(data : Dictionary) -> void:
|
||||
if data.has("shader_model"):
|
||||
set_shader_model(data.shader_model)
|
||||
elif data.has("model_data"):
|
||||
set_shader_model(data.model_data)
|
||||
|
||||
|
||||
func edit(node) -> void:
|
||||
if shader_model != null:
|
||||
var edit_window = load("res://addons/material_maker/widgets/node_editor/node_editor.tscn").instance()
|
||||
node.get_parent().add_child(edit_window)
|
||||
edit_window.set_model_data(shader_model)
|
||||
edit_window.connect("node_changed", node, "update_generator")
|
||||
edit_window.popup_centered()
|
95
addons/material_maker/engine/gen_switch.gd
Normal file
@ -0,0 +1,95 @@
|
||||
tool
|
||||
extends MMGenBase
|
||||
class_name MMGenSwitch
|
||||
|
||||
"""
|
||||
Texture generator switch
|
||||
"""
|
||||
|
||||
var editable = false
|
||||
|
||||
func get_type() -> String:
|
||||
return "switch"
|
||||
|
||||
func get_type_name() -> String:
|
||||
return "Switch"
|
||||
|
||||
func toggle_editable() -> bool:
|
||||
editable = !editable
|
||||
return true
|
||||
|
||||
func is_editable() -> bool:
|
||||
return editable
|
||||
|
||||
func get_parameter_defs() -> Array:
|
||||
var choices = parameters.choices if parameters.has("choices") else 2
|
||||
return [
|
||||
{ name="outputs", label="Outputs", type="float", min=1, max=5, step=1, default=2 },
|
||||
{ name="choices", label="Choices", type="float", min=2, max=5, step=1, default=2 },
|
||||
{ name="source", label="Source", type="float", min=0, max=choices-1, step=1, default=0 },
|
||||
]
|
||||
|
||||
func get_input_defs() -> Array:
|
||||
var rv : Array = []
|
||||
for c in range(parameters.choices):
|
||||
for o in range(parameters.outputs):
|
||||
var n = PoolByteArray([65+o]).get_string_from_ascii()+str(c)
|
||||
rv.push_back({ name=n, label=n, type="rgba" })
|
||||
return rv
|
||||
|
||||
func get_output_defs() -> Array:
|
||||
var rv : Array = []
|
||||
for o in range(parameters.outputs):
|
||||
var n = PoolByteArray([65+o]).get_string_from_ascii()
|
||||
rv.push_back({ name=n, type="rgba" })
|
||||
return rv
|
||||
|
||||
func set_parameter(p, v) -> void:
|
||||
if p == "outputs" or p == "choices":
|
||||
var parent = get_parent()
|
||||
if parent != null:
|
||||
var connected_inputs : Array = parent.get_connected_inputs(self)
|
||||
var connected_outputs : Array = parent.get_connected_outputs(self)
|
||||
var inputs_changes : Dictionary = {}
|
||||
var outputs_changes : Dictionary = {}
|
||||
if p == "outputs":
|
||||
for i in connected_inputs:
|
||||
var input = int(i) % int(parameters.outputs)
|
||||
var choice = int(i) / int(parameters.outputs)
|
||||
if input >= v:
|
||||
inputs_changes[i] = -1
|
||||
else:
|
||||
inputs_changes[i] = input + v * choice
|
||||
for i in connected_outputs:
|
||||
if i >= v:
|
||||
outputs_changes[i] = -1
|
||||
else:
|
||||
for i in connected_inputs:
|
||||
var input = int(i) % int(parameters.outputs)
|
||||
var choice = int(i) / int(parameters.outputs)
|
||||
if choice >= v:
|
||||
inputs_changes[i] = -1
|
||||
parent.reconnect_inputs(self, inputs_changes)
|
||||
parent.reconnect_outputs(self, outputs_changes)
|
||||
.set_parameter(p, v)
|
||||
emit_signal("parameter_changed", "__update_all__", null)
|
||||
|
||||
# get the list of outputs that depend on the input whose index is passed as parameter
|
||||
func follow_input(input_index : int) -> Array:
|
||||
return [ OutputPort.new(self, input_index % int(parameters.outputs)) ]
|
||||
|
||||
func source_changed(input_index : int) -> void:
|
||||
if parameters.has("outputs"):
|
||||
notify_output_change(input_index % int(parameters.outputs))
|
||||
|
||||
func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
||||
var source = get_source(output_index+parameters.source*parameters.outputs)
|
||||
if source != null:
|
||||
var rv = source.generator._get_shader_code(uv, source.output_index, context)
|
||||
while rv is GDScriptFunctionState:
|
||||
rv = yield(rv, "completed")
|
||||
return rv
|
||||
return { globals=[], defs="", code="", textures={} }
|
||||
|
||||
func _serialize(data: Dictionary) -> Dictionary:
|
||||
return data
|
30
addons/material_maker/engine/gen_texture.gd
Normal file
@ -0,0 +1,30 @@
|
||||
tool
|
||||
extends MMGenBase
|
||||
class_name MMGenTexture
|
||||
|
||||
"""
|
||||
Base class for texture generators that provide a texture as output
|
||||
"""
|
||||
|
||||
var texture : ImageTexture = ImageTexture.new()
|
||||
|
||||
func get_output_defs() -> Array:
|
||||
return [ { rgba="" } ]
|
||||
|
||||
func _get_shader_code_lod(uv : String, output_index : int, context : MMGenContext, lod : float = 0.0) -> Dictionary:
|
||||
var genname = "o"+str(get_instance_id())
|
||||
var rv = { globals=[], defs="", code="" }
|
||||
var texture_name = genname+"_tex"
|
||||
var variant_index = context.get_variant(self, uv)
|
||||
if variant_index == -1:
|
||||
variant_index = context.get_variant(self, uv)
|
||||
if lod == 0.0:
|
||||
rv.code = "vec4 %s_%d = texture(%s, %s);\n" % [ genname, variant_index, texture_name, uv ]
|
||||
else:
|
||||
rv.code = "vec4 %s_%d = textureLod(%s, %s, %.9f);\n" % [ genname, variant_index, texture_name, uv, lod ]
|
||||
rv.rgba = "%s_%d" % [ genname, variant_index ]
|
||||
rv.textures = { texture_name:texture }
|
||||
return rv
|
||||
|
||||
func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
||||
return _get_shader_code_lod(uv, output_index, context)
|
106
addons/material_maker/engine/loader.gd
Normal file
@ -0,0 +1,106 @@
|
||||
tool
|
||||
extends Object
|
||||
class_name MMGenLoader
|
||||
|
||||
const STD_GENDEF_PATH = "res://addons/material_maker/nodes"
|
||||
|
||||
static func generator_name_from_path(path : String) -> String:
|
||||
for p in [ STD_GENDEF_PATH, OS.get_executable_path().get_base_dir()+"/generators" ]:
|
||||
print(p)
|
||||
print(path.get_base_dir())
|
||||
return path.get_basename().get_file()
|
||||
|
||||
static func load_gen(filename: String) -> MMGenBase:
|
||||
var file = File.new()
|
||||
if file.open(filename, File.READ) == OK:
|
||||
var data = parse_json(file.get_as_text())
|
||||
return create_gen(data)
|
||||
return null
|
||||
|
||||
static func add_to_gen_graph(gen_graph, generators, connections) -> Dictionary:
|
||||
var rv = { generators=[], connections=[] }
|
||||
var gennames = {}
|
||||
for n in generators:
|
||||
var g = create_gen(n)
|
||||
if g != null:
|
||||
var orig_name = g.name
|
||||
gen_graph.add_generator(g)
|
||||
rv.generators.append(g)
|
||||
gennames[orig_name] = g.name
|
||||
for c in connections:
|
||||
if gennames.has(c.from) and gennames.has(c.to):
|
||||
c.from = gennames[c.from]
|
||||
c.to = gennames[c.to]
|
||||
if gen_graph.connect_children(gen_graph.get_node(c.from), c.from_port, gen_graph.get_node(c.to), c.to_port):
|
||||
rv.connections.append(c)
|
||||
return rv
|
||||
|
||||
static func create_gen(data) -> MMGenBase:
|
||||
var guess = [
|
||||
{ keyword="connections", type=MMGenGraph },
|
||||
{ keyword="nodes", type=MMGenGraph },
|
||||
{ keyword="shader_model", type=MMGenShader },
|
||||
{ keyword="convolution_params", type=MMGenConvolution },
|
||||
{ keyword="model_data", type=MMGenShader },
|
||||
{ keyword="convolution_params", type=MMGenConvolution },
|
||||
{ keyword="widgets", type=MMGenRemote }
|
||||
]
|
||||
var types = {
|
||||
material = MMGenMaterial,
|
||||
buffer = MMGenBuffer,
|
||||
image = MMGenImage,
|
||||
ios = MMGenIOs,
|
||||
switch = MMGenSwitch,
|
||||
export = MMGenExport,
|
||||
comment = MMGenComment,
|
||||
debug = MMGenDebug
|
||||
}
|
||||
var generator = null
|
||||
for g in guess:
|
||||
if data.has(g.keyword):
|
||||
generator = g.type.new()
|
||||
break
|
||||
if generator == null and data.has("type"):
|
||||
if types.has(data.type):
|
||||
generator = types[data.type].new()
|
||||
else:
|
||||
var file = File.new()
|
||||
var gen_paths = [ STD_GENDEF_PATH, OS.get_executable_path().get_base_dir()+"/generators" ]
|
||||
for p in gen_paths:
|
||||
if file.open(p+"/"+data.type+".mmg", File.READ) == OK:
|
||||
generator = create_gen(parse_json(file.get_as_text()))
|
||||
generator.model = data.type
|
||||
file.close()
|
||||
break
|
||||
elif file.open(p+"/"+data.type+".mmn", File.READ) == OK:
|
||||
generator = MMGenShader.new()
|
||||
generator.model = data.type
|
||||
generator.set_shader_model(parse_json(file.get_as_text()))
|
||||
file.close()
|
||||
break
|
||||
if generator == null:
|
||||
print("Cannot find description for "+data.type)
|
||||
if generator != null:
|
||||
generator.name = data.type
|
||||
if generator == null:
|
||||
print("LOADER: data not supported:"+str(data))
|
||||
if generator != null:
|
||||
generator.deserialize(data)
|
||||
return generator
|
||||
|
||||
static func get_generator_list() -> Array:
|
||||
var rv = []
|
||||
var dir : Directory = Directory.new()
|
||||
for p in [ STD_GENDEF_PATH, OS.get_executable_path().get_base_dir()+"/generators" ]:
|
||||
dir.open(p)
|
||||
dir.list_dir_begin(true)
|
||||
while true:
|
||||
var f = dir.get_next()
|
||||
if f == "":
|
||||
break
|
||||
if f.right(f.length()-4) == ".mmg":
|
||||
var n = f.left(f.length()-4)
|
||||
if rv.find(n) == -1:
|
||||
rv.push_back(n)
|
||||
rv.sort()
|
||||
return rv
|
113
addons/material_maker/engine/renderer.gd
Normal file
@ -0,0 +1,113 @@
|
||||
tool
|
||||
extends Viewport
|
||||
class_name MMGenRenderer
|
||||
|
||||
export(String) var debug_path = ""
|
||||
var debug_file_index : int = 0
|
||||
|
||||
var rendering : bool = false
|
||||
signal done
|
||||
|
||||
func _ready() -> void:
|
||||
$ColorRect.material = $ColorRect.material.duplicate(true)
|
||||
|
||||
static func generate_shader(src_code) -> String:
|
||||
var code
|
||||
code = "shader_type canvas_item;\n"
|
||||
code += "render_mode blend_disabled;\n"
|
||||
var file = File.new()
|
||||
file.open("res://addons/material_maker/common.shader", File.READ)
|
||||
code += file.get_as_text()
|
||||
code += "\n"
|
||||
if src_code.has("textures"):
|
||||
for t in src_code.textures.keys():
|
||||
code += "uniform sampler2D "+t+";\n"
|
||||
if src_code.has("globals"):
|
||||
for g in src_code.globals:
|
||||
code += g
|
||||
var shader_code = src_code.defs
|
||||
shader_code += "\nvoid fragment() {\n"
|
||||
shader_code += src_code.code
|
||||
shader_code += "COLOR = "+src_code.rgba+";\n"
|
||||
shader_code += "}\n"
|
||||
#print("GENERATED SHADER:\n"+shader_code)
|
||||
code += shader_code
|
||||
return code
|
||||
|
||||
static func generate_combined_shader(red_code, green_code, blue_code) -> String:
|
||||
var code
|
||||
code = "shader_type canvas_item;\n"
|
||||
code += "render_mode blend_disabled;\n"
|
||||
var file = File.new()
|
||||
file.open("res://addons/material_maker/common.shader", File.READ)
|
||||
code += file.get_as_text()
|
||||
code += "\n"
|
||||
var globals = []
|
||||
for c in [ red_code, green_code, blue_code ]:
|
||||
if c.has("globals"):
|
||||
for g in c.globals:
|
||||
if globals.find(g) == -1:
|
||||
globals.push_back(g)
|
||||
for g in globals:
|
||||
code += g
|
||||
var shader_code = ""
|
||||
shader_code += red_code.defs
|
||||
shader_code += green_code.defs
|
||||
shader_code += blue_code.defs
|
||||
shader_code += "void fragment() {\n"
|
||||
shader_code += red_code.code
|
||||
shader_code += green_code.code
|
||||
shader_code += blue_code.code
|
||||
shader_code += "COLOR = vec4("+red_code.f+", "+green_code.f+", "+blue_code.f+", 1.0);\n"
|
||||
shader_code += "}\n"
|
||||
#print("GENERATED COMBINED SHADER:\n"+shader_code)
|
||||
code += shader_code
|
||||
return code
|
||||
|
||||
func setup_material(shader_material, textures, shader_code) -> void:
|
||||
for k in textures.keys():
|
||||
shader_material.set_shader_param(k+"_tex", textures[k])
|
||||
shader_material.shader.code = shader_code
|
||||
|
||||
func render_shader(shader, textures, render_size) -> Object:
|
||||
if debug_path != null and debug_path != "":
|
||||
var file_name = debug_path+str(debug_file_index)+".shader"
|
||||
var f = File.new()
|
||||
f.open(debug_path+str(debug_file_index)+".shader", File.WRITE)
|
||||
f.store_string(shader)
|
||||
f.close()
|
||||
debug_file_index += 1
|
||||
print("shader saved as "+file_name)
|
||||
while rendering:
|
||||
yield(self, "done")
|
||||
rendering = true
|
||||
size = Vector2(render_size, render_size)
|
||||
$ColorRect.rect_position = Vector2(0, 0)
|
||||
$ColorRect.rect_size = size
|
||||
var shader_material = $ColorRect.material
|
||||
shader_material.shader.code = shader
|
||||
if textures != null:
|
||||
for k in textures.keys():
|
||||
shader_material.set_shader_param(k, textures[k])
|
||||
render_target_update_mode = Viewport.UPDATE_ONCE
|
||||
update_worlds()
|
||||
yield(get_tree(), "idle_frame")
|
||||
yield(get_tree(), "idle_frame")
|
||||
return self
|
||||
|
||||
func copy_to_texture(t : ImageTexture) -> void:
|
||||
var image : Image = get_texture().get_data()
|
||||
if image != null:
|
||||
image.lock()
|
||||
t.create_from_image(get_texture().get_data())
|
||||
image.unlock()
|
||||
|
||||
func save_to_file(fn : String) -> void:
|
||||
var image : Image = get_texture().get_data()
|
||||
image.lock()
|
||||
image.save_png(fn)
|
||||
image.unlock()
|
||||
|
||||
func release() -> void:
|
||||
rendering = false
|
||||
emit_signal("done")
|
34
addons/material_maker/engine/renderer.tscn
Normal file
@ -0,0 +1,34 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://addons/material_maker/engine/renderer.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="Shader" id=1]
|
||||
code = "shader_type canvas_item;
|
||||
|
||||
void fragment() {
|
||||
COLOR = vec4(1.0);
|
||||
}
|
||||
"
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=2]
|
||||
shader = SubResource( 1 )
|
||||
|
||||
[node name="Renderer" type="Viewport"]
|
||||
own_world = true
|
||||
transparent_bg = true
|
||||
hdr = false
|
||||
keep_3d_linear = true
|
||||
usage = 0
|
||||
render_target_v_flip = true
|
||||
render_target_update_mode = 1
|
||||
gui_disable_input = true
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
material = SubResource( 2 )
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
wait_time = 0.1
|
||||
one_shot = true
|
3
addons/material_maker/environment.gd
Normal file
@ -0,0 +1,3 @@
|
||||
extends Spatial
|
||||
|
||||
export var environment : Environment
|
331
addons/material_maker/examples/brick_rotated.ptex
Normal file
@ -0,0 +1,331 @@
|
||||
{
|
||||
"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,
|
||||
"to": "blend",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "pattern",
|
||||
"from_port": 0,
|
||||
"to": "transform",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "bricks",
|
||||
"from_port": 1,
|
||||
"to": "transform",
|
||||
"to_port": 3
|
||||
},
|
||||
{
|
||||
"from": "blend",
|
||||
"from_port": 0,
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 6
|
||||
},
|
||||
{
|
||||
"from": "blend",
|
||||
"from_port": 0,
|
||||
"to": "normal_map",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "47",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 70,
|
||||
"y": 113
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"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": {
|
||||
"x": -286.5,
|
||||
"y": 14.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 2
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "pattern",
|
||||
"node_position": {
|
||||
"x": -547.5,
|
||||
"y": -227.068176
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 0,
|
||||
"x_scale": 1,
|
||||
"x_wave": 3,
|
||||
"y_scale": 0,
|
||||
"y_wave": 4
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"node_position": {
|
||||
"x": -10.209106,
|
||||
"y": -146.068176
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"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": "transform",
|
||||
"node_position": {
|
||||
"x": -258.5,
|
||||
"y": -196.5
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": false,
|
||||
"rotate": 360,
|
||||
"scale_x": 1,
|
||||
"scale_y": 1,
|
||||
"translate_x": 0.5,
|
||||
"translate_y": 0.5
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "comment",
|
||||
"node_position": {
|
||||
"x": -391.274048,
|
||||
"y": 165.542206
|
||||
},
|
||||
"parameters": {
|
||||
"size": 4
|
||||
},
|
||||
"size": {
|
||||
"x": 280,
|
||||
"y": 85
|
||||
},
|
||||
"text": "This example shows how to use the 3rd and 4th outputs of the bricks node to get the center of each brick.",
|
||||
"type": "comment"
|
||||
},
|
||||
{
|
||||
"name": "normal_map",
|
||||
"node_position": {
|
||||
"x": 14.29071,
|
||||
"y": -40.645294
|
||||
},
|
||||
"parameters": {
|
||||
"param0": 11,
|
||||
"param1": 0.995
|
||||
},
|
||||
"type": "normal_map"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,259 @@
|
||||
{"connections":[{"from":"colorize_0","from_port":0,"to":"Material","to_port":0},{"from":"perlin_0","from_port":0,"to":"blend_0","to_port":1},{"from":"pattern_0","from_port":0,"to":"blend_0","to_port":0},{"from":"blend_0","from_port":0,"to":"transform_0","to_port":0},{"from":"transform_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_1","from_port":0,"to":"transform_0","to_port":4},{"from":"pattern_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"transform_0","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4}],"nodes":[{"name":"perlin_0","node_position":{"x":-254,"y":101},"parameters":{"iterations":4,"persistence":1,"scale_x":32,"scale_y":4},"type":"perlin"},{"name":"pattern_0","node_position":{"x":-272,"y":-14},"parameters":{"mix":0,"x_scale":1,"x_wave":0,"y_scale":1,"y_wave":3},"type":"pattern"},{"name":"blend_0","node_position":{"x":-4,"y":18},"parameters":{"amount":1,"blend_type":2},"type":"blend"},{"name":"pattern_1","node_position":{"x":-295,"y":245},"parameters":{"mix":0,"x_scale":4,"x_wave":4,"y_scale":1,"y_wave":3},"type":"pattern"},{"name":"colorize_1","node_position":{"x":-8,"y":207},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":1,"pos":0,"r":1},{"a":1,"b":0.765625,"g":0.765625,"pos":1,"r":0.765625}],"type":"Gradient"}},"type":"colorize"},{"name":"transform_0","node_position":{"x":206,"y":16},"parameters":{"repeat":false,"rotate":0,"scale_x":1.6,"scale_y":1,"translate_x":0,"translate_y":0},"type":"transform"},{"name":"colorize_0","node_position":{"x":435,"y":12},"parameters":{"gradient":{"points":[{"a":0,"b":0,"g":0.5,"pos":0.081818,"r":0.125},{"a":1,"b":0,"g":0.5,"pos":0.145455,"r":0.125},{"a":1,"b":0,"g":0.203125,"pos":0.436364,"r":0.050781},{"a":1,"b":0,"g":0.362165,"pos":0.727273,"r":0.090541},{"a":1,"b":0,"g":0.203125,"pos":1,"r":0.050781}],"type":"Gradient"}},"type":"colorize"},{"name":"normal_map_0","node_position":{"x":459.70459,"y":136},"parameters":{"amount":0.5,"size":2},"type":"normal_map"},{"name":"Material","node_position":{"x":790,"y":-6},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":0,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "pattern_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "transform_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "transform_0",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "pattern_1",
|
||||
"from_port": 0,
|
||||
"to": "colorize_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform_0",
|
||||
"from_port": 0,
|
||||
"to": "normal_map",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "222",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": -254,
|
||||
"y": 101
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 4,
|
||||
"persistence": 1,
|
||||
"scale_x": 32,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "pattern_0",
|
||||
"node_position": {
|
||||
"x": -272,
|
||||
"y": -14
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 0,
|
||||
"x_scale": 1,
|
||||
"x_wave": 0,
|
||||
"y_scale": 1,
|
||||
"y_wave": 3
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": -4,
|
||||
"y": 18
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 2
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "pattern_1",
|
||||
"node_position": {
|
||||
"x": -295,
|
||||
"y": 245
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 0,
|
||||
"x_scale": 4,
|
||||
"x_wave": 4,
|
||||
"y_scale": 1,
|
||||
"y_wave": 3
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": -8,
|
||||
"y": 207
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.765625,
|
||||
"g": 0.765625,
|
||||
"pos": 1,
|
||||
"r": 0.765625
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "transform_0",
|
||||
"node_position": {
|
||||
"x": 206,
|
||||
"y": 16
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": false,
|
||||
"rotate": 0,
|
||||
"scale_x": 1.6,
|
||||
"scale_y": 1,
|
||||
"translate_x": 0,
|
||||
"translate_y": 0
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 435,
|
||||
"y": 12
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 0,
|
||||
"b": 0,
|
||||
"g": 0.5,
|
||||
"pos": 0.081818,
|
||||
"r": 0.125
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.5,
|
||||
"pos": 0.145455,
|
||||
"r": 0.125
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.203125,
|
||||
"pos": 0.436364,
|
||||
"r": 0.050781
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.362165,
|
||||
"pos": 0.727273,
|
||||
"r": 0.090541
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.203125,
|
||||
"pos": 1,
|
||||
"r": 0.050781
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 790,
|
||||
"y": -6
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 0,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "normal_map",
|
||||
"node_position": {
|
||||
"x": 478.850098,
|
||||
"y": 143.444443
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 10,
|
||||
"param1": 0.995
|
||||
},
|
||||
"type": "normal_map"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,228 @@
|
||||
{"connections":[{"from":"voronoi_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"voronoi_0","from_port":0,"to":"colorize_1","to_port":0},{"from":"colorize_1","from_port":0,"to":"Material","to_port":0},{"from":"voronoi_0","from_port":0,"to":"colorize_3","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}],"nodes":[{"name":"Material","node_position":{"x":674,"y":164},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"colorize_1","node_position":{"x":384,"y":137},"parameters":{"gradient":{"points":[{"a":1,"b":0.010715,"g":0.411458,"pos":0,"r":0.22361},{"a":1,"b":0,"g":1,"pos":1,"r":0.9375}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_3","node_position":{"x":384,"y":258},"parameters":{"gradient":{"points":[{"a":1,"b":0.505208,"g":0.505208,"pos":0,"r":0.505208},{"a":1,"b":0.78125,"g":0.78125,"pos":1,"r":0.78125}],"type":"Gradient"}},"type":"colorize"},{"name":"uniform_0","node_position":{"x":413,"y":208},"parameters":{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"}},"type":"uniform"},{"name":"voronoi_0","node_position":{"x":71,"y":216},"parameters":{"intensity":0.4,"scale_x":16,"scale_y":16},"type":"voronoi"},{"name":"colorize_0","node_position":{"x":300,"y":330},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0,"r":0},{"a":1,"b":0.5,"g":0.5,"pos":0.345455,"r":0.5},{"a":1,"b":1,"g":1,"pos":0.618182,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"normal_map_0","node_position":{"x":479,"y":334},"parameters":{"amount":0.5,"size":2},"type":"normal_map"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_3",
|
||||
"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
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "240",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 674,
|
||||
"y": 164
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": 384,
|
||||
"y": 137
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.010715,
|
||||
"g": 0.411458,
|
||||
"pos": 0,
|
||||
"r": 0.22361
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 0.9375
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": 384,
|
||||
"y": 258
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.505208,
|
||||
"g": 0.505208,
|
||||
"pos": 0,
|
||||
"r": 0.505208
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.78125,
|
||||
"g": 0.78125,
|
||||
"pos": 1,
|
||||
"r": 0.78125
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "uniform_0",
|
||||
"node_position": {
|
||||
"x": 413,
|
||||
"y": 208
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"r": 0,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "voronoi_0",
|
||||
"node_position": {
|
||||
"x": 71,
|
||||
"y": 216
|
||||
},
|
||||
"parameters": {
|
||||
"intensity": 0.4,
|
||||
"randomness": 1,
|
||||
"scale_x": 16,
|
||||
"scale_y": 16
|
||||
},
|
||||
"type": "voronoi"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 264,
|
||||
"y": 331
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.5,
|
||||
"g": 0.5,
|
||||
"pos": 0.345455,
|
||||
"r": 0.5
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.618182,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 479,
|
||||
"y": 334
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 2
|
||||
},
|
||||
"type": "normal_map"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,375 @@
|
||||
{"connections":[{"from":"perlin_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"voronoi_0","from_port":1,"to":"colorize_1","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":"colorize_1","from_port":0,"to":"warp_0","to_port":0},{"from":"perlin_1","from_port":0,"to":"warp_0","to_port":1},{"from":"warp_0","from_port":0,"to":"blend_0","to_port":0},{"from":"colorize_3","from_port":0,"to":"Material","to_port":1},{"from":"perlin_1","from_port":0,"to":"colorize_3","to_port":0},{"from":"warp_0","from_port":0,"to":"colorize_4","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"colorize_4","from_port":0,"to":"blend_1","to_port":1},{"from":"blend_1","from_port":0,"to":"normal_map_0","to_port":0},{"from":"perlin_0","from_port":0,"to":"blend_1","to_port":0}],"nodes":[{"name":"voronoi_0","node_position":{"x":-165,"y":-96.75},"parameters":{"intensity":0.6,"scale_x":4,"scale_y":4},"type":"voronoi"},{"name":"colorize_1","node_position":{"x":93,"y":-117.75},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0,"r":0},{"a":1,"b":1,"g":1,"pos":0.063636,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"perlin_1","node_position":{"x":-144,"y":50.25},"parameters":{"iterations":3,"persistence":0.5,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"colorize_0","node_position":{"x":338,"y":-237.75},"parameters":{"gradient":{"points":[{"a":1,"b":0.200277,"g":0.378784,"pos":0.245455,"r":0.557292},{"a":1,"b":0.03776,"g":0.150513,"pos":0.645455,"r":0.25}],"type":"Gradient"}},"type":"colorize"},{"name":"perlin_0","node_position":{"x":56,"y":-361.75},"parameters":{"iterations":10,"persistence":0.9,"scale_x":2,"scale_y":2},"type":"perlin"},{"name":"Material","node_position":{"x":786,"y":53},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"colorize_3","node_position":{"x":465,"y":33.25},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0,"r":0},{"a":1,"b":0.520833,"g":0.520833,"pos":1,"r":0.520833}],"type":"Gradient"}},"type":"colorize"},{"name":"blend_0","node_position":{"x":541,"y":-82.75},"parameters":{"amount":0.4,"blend_type":2},"type":"blend"},{"name":"warp_0","node_position":{"x":264,"y":-13.75},"parameters":{"amount":0.4},"type":"warp"},{"name":"blend_1","node_position":{"x":458,"y":173.25},"parameters":{"amount":0.5,"blend_type":0},"type":"blend"},{"name":"normal_map_0","node_position":{"x":639,"y":147.25},"parameters":{"amount":0.35,"size":2},"type":"normal_map"},{"name":"colorize_4","node_position":{"x":252,"y":178.25},"parameters":{"gradient":{"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"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 1,
|
||||
"to": "colorize_1",
|
||||
"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": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "warp_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin_1",
|
||||
"from_port": 0,
|
||||
"to": "warp_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "warp_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "perlin_1",
|
||||
"from_port": 0,
|
||||
"to": "colorize_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "warp_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_4",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "colorize_4",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_1",
|
||||
"from_port": 0,
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_1",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 6
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "258",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "voronoi_0",
|
||||
"node_position": {
|
||||
"x": -165,
|
||||
"y": -96.75
|
||||
},
|
||||
"parameters": {
|
||||
"intensity": 0.6,
|
||||
"randomness": 1,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "voronoi"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": 93,
|
||||
"y": -117.75
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.063636,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "perlin_1",
|
||||
"node_position": {
|
||||
"x": -144,
|
||||
"y": 50.25
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 3,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 338,
|
||||
"y": -237.75
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.200277,
|
||||
"g": 0.378784,
|
||||
"pos": 0.245455,
|
||||
"r": 0.557292
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.03776,
|
||||
"g": 0.150513,
|
||||
"pos": 0.645455,
|
||||
"r": 0.25
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": 56,
|
||||
"y": -361.75
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 10,
|
||||
"persistence": 0.9,
|
||||
"scale_x": 2,
|
||||
"scale_y": 2
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 944,
|
||||
"y": -30
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 0.1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": 465,
|
||||
"y": 33.25
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.520833,
|
||||
"g": 0.520833,
|
||||
"pos": 1,
|
||||
"r": 0.520833
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 541,
|
||||
"y": -82.75
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.4,
|
||||
"blend_type": 2
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "warp_0",
|
||||
"node_position": {
|
||||
"x": 264,
|
||||
"y": -13.75
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.4,
|
||||
"eps": 0.045,
|
||||
"epsilon": 0
|
||||
},
|
||||
"type": "warp"
|
||||
},
|
||||
{
|
||||
"name": "blend_1",
|
||||
"node_position": {
|
||||
"x": 442,
|
||||
"y": 175.25
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 706,
|
||||
"y": 95.25
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.35,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 2
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "colorize_4",
|
||||
"node_position": {
|
||||
"x": 252,
|
||||
"y": 178.25
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"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": "colorize",
|
||||
"node_position": {
|
||||
"x": 717.815796,
|
||||
"y": 200.5625
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
297
addons/material_maker/examples/emmental.ptex
Normal file
@ -0,0 +1,297 @@
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "voronoi",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "voronoi",
|
||||
"from_port": 0,
|
||||
"to": "colorize_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "colorize_4",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_4",
|
||||
"from_port": 0,
|
||||
"to": "normal_map",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 6
|
||||
},
|
||||
{
|
||||
"from": "uniform",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 7
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "49",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 223,
|
||||
"y": -206
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 0.45,
|
||||
"emission_energy": 0,
|
||||
"metallic": 0.3,
|
||||
"normal_scale": 1,
|
||||
"roughness": 0.75,
|
||||
"size": 11,
|
||||
"subsurf_scatter_strength": 0
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "voronoi",
|
||||
"node_position": {
|
||||
"x": -599.5,
|
||||
"y": -175
|
||||
},
|
||||
"parameters": {
|
||||
"intensity": 1,
|
||||
"randomness": 0.49,
|
||||
"scale_x": 6,
|
||||
"scale_y": 6
|
||||
},
|
||||
"type": "voronoi"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"node_position": {
|
||||
"x": -301.5,
|
||||
"y": -177
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 3,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.884266,
|
||||
"g": 0.884266,
|
||||
"pos": 0.333916,
|
||||
"r": 0.884266
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 1,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": -295.5,
|
||||
"y": -261
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.518182,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "uniform",
|
||||
"node_position": {
|
||||
"x": -55.5,
|
||||
"y": -255
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0.458824,
|
||||
"g": 0.964706,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "normal_map",
|
||||
"node_position": {
|
||||
"x": -15.5,
|
||||
"y": -180
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 0.945,
|
||||
"param2": 1,
|
||||
"size": 4
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": -180.5,
|
||||
"y": 42
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.454546,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.536364,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.818182,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.881819,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_4",
|
||||
"node_position": {
|
||||
"x": -253.769257,
|
||||
"y": -52.75
|
||||
},
|
||||
"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": "pattern",
|
||||
"node_position": {
|
||||
"x": 57.955933,
|
||||
"y": -332.75
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 4,
|
||||
"x_scale": 16,
|
||||
"x_wave": 2,
|
||||
"y_scale": 16,
|
||||
"y_wave": 2
|
||||
},
|
||||
"type": "pattern"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,227 @@
|
||||
{"connections":[{"from":"perlin_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"blend_0","to_port":1},{"from":"bricks_0","from_port":0,"to":"blend_0","to_port":0},{"from":"blend_0","from_port":0,"to":"Material","to_port":0},{"from":"bricks_0","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"colorize_1","from_port":0,"to":"Material","to_port":2},{"from":"blend_0","from_port":0,"to":"colorize_1","to_port":0},{"from":"uniform_0","from_port":0,"to":"Material","to_port":1}],"nodes":[{"name":"Material","node_position":{"x":773,"y":290},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"perlin_0","node_position":{"x":7,"y":263},"parameters":{"iterations":7,"persistence":0.85,"scale_x":8,"scale_y":8},"type":"perlin"},{"name":"bricks_0","node_position":{"x":242,"y":382},"parameters":{"bevel":0.01,"columns":4,"mortar":0.01,"pattern":0,"repeat":1,"row_offset":0,"rows":4},"type":"bricks"},{"name":"normal_map_0","node_position":{"x":516,"y":466},"parameters":{"amount":0.2,"size":2},"type":"normal_map"},{"name":"colorize_1","node_position":{"x":510,"y":386},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":1,"pos":0,"r":1},{"a":1,"b":0.484375,"g":0.484375,"pos":1,"r":0.484375}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_0","node_position":{"x":232,"y":286},"parameters":{"gradient":{"points":[{"a":1,"b":0.588542,"g":0.742839,"pos":0,"r":1},{"a":1,"b":1,"g":1,"pos":0.654545,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"blend_0","node_position":{"x":419,"y":186},"parameters":{"amount":1,"blend_type":2},"type":"blend"},{"name":"uniform_0","node_position":{"x":563,"y":314},"parameters":{"color":{"a":1,"b":0.128906,"g":0.128906,"r":0.128906,"type":"Color"}},"type":"uniform"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "bricks_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "bricks_0",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "uniform_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 1
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "293",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 773,
|
||||
"y": 290
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": 7,
|
||||
"y": 263
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 7,
|
||||
"persistence": 0.85,
|
||||
"scale_x": 8,
|
||||
"scale_y": 8
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "bricks_0",
|
||||
"node_position": {
|
||||
"x": 242,
|
||||
"y": 382
|
||||
},
|
||||
"parameters": {
|
||||
"bevel": 0.01,
|
||||
"columns": 4,
|
||||
"mortar": 0.01,
|
||||
"pattern": 0,
|
||||
"repeat": 1,
|
||||
"row_offset": 0,
|
||||
"rows": 4
|
||||
},
|
||||
"type": "bricks"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 516,
|
||||
"y": 466
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.2,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 2
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": 510,
|
||||
"y": 386
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.484375,
|
||||
"g": 0.484375,
|
||||
"pos": 1,
|
||||
"r": 0.484375
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 232,
|
||||
"y": 286
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.588542,
|
||||
"g": 0.742839,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.654545,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 419,
|
||||
"y": 186
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 2
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "uniform_0",
|
||||
"node_position": {
|
||||
"x": 563,
|
||||
"y": 314
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0.128906,
|
||||
"g": 0.128906,
|
||||
"r": 0.128906,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,289 @@
|
||||
{"connections":[{"from":"perlin_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"voronoi_0","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":2},{"from":"perlin_0","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"voronoi_0","from_port":2,"to":"blend_0","to_port":1},{"from":"voronoi_0","from_port":0,"to":"colorize_2","to_port":0},{"from":"blend_0","from_port":0,"to":"blend_1","to_port":0},{"from":"blend_1","from_port":0,"to":"Material","to_port":0},{"from":"colorize_2","from_port":0,"to":"blend_1","to_port":2},{"from":"uniform_0","from_port":0,"to":"blend_1","to_port":1},{"from":"colorize_1","from_port":0,"to":"Material","to_port":2}],"nodes":[{"name":"colorize_0","node_position":{"x":335,"y":-261.75},"parameters":{"gradient":{"points":[{"a":1,"b":0.15682,"g":0.734375,"pos":0.445455,"r":0.247062},{"a":1,"b":0.112522,"g":0.317708,"pos":0.863636,"r":0.144582}],"type":"Gradient"}},"type":"colorize"},{"name":"Material","node_position":{"x":996,"y":22},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":0,"metallic":0,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"normal_map_0","node_position":{"x":494,"y":258.25},"parameters":{"amount":0.8,"size":2},"type":"normal_map"},{"name":"colorize_1","node_position":{"x":524,"y":-26.75},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0.245455,"r":0},{"a":1,"b":1,"g":1,"pos":0.436364,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_2","node_position":{"x":413,"y":71.25},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0.118182,"r":0},{"a":1,"b":1,"g":1,"pos":0.172727,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"blend_1","node_position":{"x":826,"y":-119.75},"parameters":{"amount":0.5,"blend_type":0},"type":"blend"},{"name":"uniform_0","node_position":{"x":690,"y":-104},"parameters":{"color":{"a":1,"b":0,"g":0.984375,"r":1,"type":"Color"}},"type":"uniform"},{"name":"perlin_0","node_position":{"x":-25,"y":-27.75},"parameters":{"iterations":9,"persistence":0.8,"scale_x":6,"scale_y":6},"type":"perlin"},{"name":"voronoi_0","node_position":{"x":269,"y":-104.75},"parameters":{"intensity":1,"scale_x":14,"scale_y":14},"type":"voronoi"},{"name":"blend_0","node_position":{"x":643,"y":-244.75},"parameters":{"amount":0.5,"blend_type":0},"type":"blend"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"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": 2
|
||||
},
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 2,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_1",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "uniform_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 2
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "253",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 335,
|
||||
"y": -261.75
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.15682,
|
||||
"g": 0.734375,
|
||||
"pos": 0.445455,
|
||||
"r": 0.247062
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.112522,
|
||||
"g": 0.317708,
|
||||
"pos": 0.863636,
|
||||
"r": 0.144582
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 996,
|
||||
"y": 22
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 0,
|
||||
"metallic": 0,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 635,
|
||||
"y": 142.25
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.8,
|
||||
"param0": 11,
|
||||
"param1": 0.25,
|
||||
"size": 2
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": 524,
|
||||
"y": -26.75
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.245455,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.436364,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": 413,
|
||||
"y": 71.25
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.118182,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.172727,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_1",
|
||||
"node_position": {
|
||||
"x": 826,
|
||||
"y": -119.75
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "uniform_0",
|
||||
"node_position": {
|
||||
"x": 690,
|
||||
"y": -104
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.984375,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": -25,
|
||||
"y": -27.75
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 9,
|
||||
"persistence": 0.8,
|
||||
"scale_x": 6,
|
||||
"scale_y": 6
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "voronoi_0",
|
||||
"node_position": {
|
||||
"x": 269,
|
||||
"y": -104.75
|
||||
},
|
||||
"parameters": {
|
||||
"intensity": 1,
|
||||
"randomness": 1,
|
||||
"scale_x": 14,
|
||||
"scale_y": 14
|
||||
},
|
||||
"type": "voronoi"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 643,
|
||||
"y": -244.75
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
638
addons/material_maker/examples/halloween.ptex
Normal file
@ -0,0 +1,638 @@
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "pattern",
|
||||
"from_port": 0,
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "normal_map",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "colorize_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "graph",
|
||||
"from_port": 0,
|
||||
"to": "transform",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 6
|
||||
},
|
||||
{
|
||||
"from": "colorize_4",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 3
|
||||
},
|
||||
{
|
||||
"from": "transform",
|
||||
"from_port": 0,
|
||||
"to": "colorize_4",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "49",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 593,
|
||||
"y": -325
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 0.3,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"roughness": 1,
|
||||
"size": 11,
|
||||
"subsurf_scatter_strength": 0
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "shape",
|
||||
"from_port": 0,
|
||||
"to": "transform",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "shape",
|
||||
"from_port": 0,
|
||||
"to": "transform_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform_2",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "pattern",
|
||||
"from_port": 0,
|
||||
"to": "transform_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "pattern",
|
||||
"from_port": 0,
|
||||
"to": "transform_3_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend",
|
||||
"from_port": 0,
|
||||
"to": "blend_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform_3",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform_3_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "blend_3",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_3",
|
||||
"from_port": 0,
|
||||
"to": "mirror",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "mirror",
|
||||
"from_port": 0,
|
||||
"to": "gen_outputs",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Face",
|
||||
"name": "graph",
|
||||
"node_position": {
|
||||
"x": 111.13147,
|
||||
"y": 63.364738
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "shape",
|
||||
"node_position": {
|
||||
"x": -411.5,
|
||||
"y": -220
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 0.051546,
|
||||
"radius": 0.106667,
|
||||
"shape": 1,
|
||||
"sides": 3
|
||||
},
|
||||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "transform_2",
|
||||
"node_position": {
|
||||
"x": -413.5,
|
||||
"y": -84
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": false,
|
||||
"rotate": 180,
|
||||
"scale_x": 1,
|
||||
"scale_y": 1,
|
||||
"translate_x": 0,
|
||||
"translate_y": 0
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "transform",
|
||||
"node_position": {
|
||||
"x": -225.5,
|
||||
"y": -294
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": false,
|
||||
"rotate": 0,
|
||||
"scale_x": 1,
|
||||
"scale_y": 1,
|
||||
"translate_x": 0.13,
|
||||
"translate_y": -0.24
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "blend",
|
||||
"node_position": {
|
||||
"x": -105.5,
|
||||
"y": -81
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 9
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "pattern",
|
||||
"node_position": {
|
||||
"x": -424.5,
|
||||
"y": 135
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 0,
|
||||
"x_scale": 4,
|
||||
"x_wave": 1,
|
||||
"y_scale": 1,
|
||||
"y_wave": 1
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "transform_3",
|
||||
"node_position": {
|
||||
"x": -97.5,
|
||||
"y": 99.25
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": false,
|
||||
"rotate": 0,
|
||||
"scale_x": 0.5,
|
||||
"scale_y": 0.2,
|
||||
"translate_x": -0.035,
|
||||
"translate_y": 0.25
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "transform_3_2",
|
||||
"node_position": {
|
||||
"x": -87.5,
|
||||
"y": 303.25
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": false,
|
||||
"rotate": 0,
|
||||
"scale_x": 0.5,
|
||||
"scale_y": 0.2,
|
||||
"translate_x": 0.035,
|
||||
"translate_y": 0.25
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "blend_2",
|
||||
"node_position": {
|
||||
"x": 195.654541,
|
||||
"y": 265.25
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 9
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"node_position": {
|
||||
"x": 198.654541,
|
||||
"y": 154.25
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.209091,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.436364,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_3",
|
||||
"node_position": {
|
||||
"x": 177.654541,
|
||||
"y": 28.25
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 9
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "mirror",
|
||||
"node_position": {
|
||||
"x": 459.654541,
|
||||
"y": 120.25
|
||||
},
|
||||
"parameters": {
|
||||
"direction": 0,
|
||||
"offset": 0
|
||||
},
|
||||
"type": "mirror"
|
||||
},
|
||||
{
|
||||
"name": "gen_inputs",
|
||||
"node_position": {
|
||||
"x": -724.5,
|
||||
"y": 38.772728
|
||||
},
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"ports": [
|
||||
|
||||
],
|
||||
"type": "ios"
|
||||
},
|
||||
{
|
||||
"name": "gen_outputs",
|
||||
"node_position": {
|
||||
"x": 759.654541,
|
||||
"y": 38.772728
|
||||
},
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"ports": [
|
||||
{
|
||||
"name": "port0",
|
||||
"type": "rgba"
|
||||
}
|
||||
],
|
||||
"type": "ios"
|
||||
},
|
||||
{
|
||||
"name": "gen_parameters",
|
||||
"node_position": {
|
||||
"x": -266.716522,
|
||||
"y": -594
|
||||
},
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "remote",
|
||||
"widgets": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
},
|
||||
{
|
||||
"name": "pattern",
|
||||
"node_position": {
|
||||
"x": -45.994606,
|
||||
"y": -298.009094
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 0,
|
||||
"x_scale": 8,
|
||||
"x_wave": 0,
|
||||
"y_scale": 4,
|
||||
"y_wave": 4
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"node_position": {
|
||||
"x": 180.245361,
|
||||
"y": -386.92511
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.481818,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "normal_map",
|
||||
"node_position": {
|
||||
"x": 320.245361,
|
||||
"y": -267.92511
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 10,
|
||||
"param1": 0.185,
|
||||
"param2": 0,
|
||||
"size": 4
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "perlin",
|
||||
"node_position": {
|
||||
"x": -222.799255,
|
||||
"y": -154.92511
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 1,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 4,
|
||||
"scale_y": 2
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": 95.200745,
|
||||
"y": -152.92511
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.4375,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.072917,
|
||||
"g": 0.565429,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": 258.305359,
|
||||
"y": -59.92511
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.130208,
|
||||
"g": 0.130208,
|
||||
"pos": 0,
|
||||
"r": 0.130208
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 1,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "transform",
|
||||
"node_position": {
|
||||
"x": 281.277344,
|
||||
"y": 42.32489
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": false,
|
||||
"rotate": 0,
|
||||
"scale_x": 0.4,
|
||||
"scale_y": 0.4,
|
||||
"translate_x": 0,
|
||||
"translate_y": 0
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "blend",
|
||||
"node_position": {
|
||||
"x": 561.277344,
|
||||
"y": 43.32489
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 9
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize_4",
|
||||
"node_position": {
|
||||
"x": 395.277344,
|
||||
"y": -121.67511
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.272727,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.515625,
|
||||
"g": 0.984863,
|
||||
"pos": 0.572727,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "comment",
|
||||
"node_position": {
|
||||
"x": 40.787872,
|
||||
"y": -50.572266
|
||||
},
|
||||
"parameters": {
|
||||
"size": 4
|
||||
},
|
||||
"size": {
|
||||
"x": 148,
|
||||
"y": 69
|
||||
},
|
||||
"text": "Best viewed on \"Sphere\" mesh",
|
||||
"type": "comment"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
809
addons/material_maker/examples/improved_brick.ptex
Normal file
@ -0,0 +1,809 @@
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "bricks",
|
||||
"from_port": 0,
|
||||
"to": "colorize_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "uniform",
|
||||
"from_port": 0,
|
||||
"to": "blend_4",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "colorize_8",
|
||||
"from_port": 0,
|
||||
"to": "blend_4",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "perlin_3",
|
||||
"from_port": 0,
|
||||
"to": "colorize_8",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend",
|
||||
"from_port": 0,
|
||||
"to": "blend_4",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_6",
|
||||
"from_port": 0,
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin",
|
||||
"from_port": 0,
|
||||
"to": "colorize_4",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize_5",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_6",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin_4",
|
||||
"from_port": 0,
|
||||
"to": "colorize_9",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_4",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "colorize_5",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 6
|
||||
},
|
||||
{
|
||||
"from": "bricks_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize_7",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_4",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_7",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 5
|
||||
},
|
||||
{
|
||||
"from": "bricks",
|
||||
"from_port": 0,
|
||||
"to": "colorize_6",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_2",
|
||||
"from_port": 0,
|
||||
"to": "normal_map",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_3",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "colorize_6",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map",
|
||||
"from_port": 0,
|
||||
"to": "blend_3",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "bricks_2",
|
||||
"from_port": 1,
|
||||
"to": "blend_6",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "bricks_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize_10",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_10",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "colorize_10",
|
||||
"from_port": 0,
|
||||
"to": "blend_7",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "blend_3",
|
||||
"from_port": 0,
|
||||
"to": "blend_7",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_3",
|
||||
"from_port": 0,
|
||||
"to": "blend_7",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_7",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "colorize_9",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "colorize_9",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_3",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "47",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 620,
|
||||
"y": 40
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 0.05,
|
||||
"emission_energy": 1,
|
||||
"metallic": 0,
|
||||
"normal_scale": 1,
|
||||
"roughness": 0.85,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "bricks",
|
||||
"node_position": {
|
||||
"x": -820,
|
||||
"y": 100
|
||||
},
|
||||
"parameters": {
|
||||
"bevel": 0,
|
||||
"columns": 6,
|
||||
"mortar": 0.087751,
|
||||
"pattern": 1,
|
||||
"repeat": 1,
|
||||
"row_offset": 0.5,
|
||||
"rows": 20
|
||||
},
|
||||
"type": "bricks"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"node_position": {
|
||||
"x": -240,
|
||||
"y": -60
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.273875,
|
||||
"g": 0.292765,
|
||||
"pos": 0.476686,
|
||||
"r": 0.529121
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.185466,
|
||||
"g": 0.193957,
|
||||
"pos": 0.477339,
|
||||
"r": 0.276042
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.185466,
|
||||
"g": 0.193957,
|
||||
"pos": 0.733221,
|
||||
"r": 0.276042
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.566243,
|
||||
"g": 0.625829,
|
||||
"pos": 0.734721,
|
||||
"r": 0.739583
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend",
|
||||
"node_position": {
|
||||
"x": 20,
|
||||
"y": -20
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": -260,
|
||||
"y": 200
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.822917,
|
||||
"g": 0.822917,
|
||||
"pos": 0,
|
||||
"r": 0.822917
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.239583,
|
||||
"g": 0.239583,
|
||||
"pos": 1,
|
||||
"r": 0.239583
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "perlin",
|
||||
"node_position": {
|
||||
"x": -820,
|
||||
"y": 340
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 8,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 16,
|
||||
"scale_y": 16
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "colorize_4",
|
||||
"node_position": {
|
||||
"x": -520,
|
||||
"y": 360
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 0.898039,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.163636,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 0,
|
||||
"b": 0.984314,
|
||||
"g": 0.984314,
|
||||
"pos": 0.463636,
|
||||
"r": 0.984314
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "perlin_2",
|
||||
"node_position": {
|
||||
"x": -820,
|
||||
"y": 500
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 8,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 128,
|
||||
"scale_y": 128
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "colorize_5",
|
||||
"node_position": {
|
||||
"x": -520,
|
||||
"y": 480
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 0.588235,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.272727,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 0,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.407774,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "perlin_3",
|
||||
"node_position": {
|
||||
"x": -820,
|
||||
"y": 700
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 8,
|
||||
"persistence": 0.8,
|
||||
"scale_x": 16,
|
||||
"scale_y": 16
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "blend_4",
|
||||
"node_position": {
|
||||
"x": -160,
|
||||
"y": 660
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "uniform",
|
||||
"node_position": {
|
||||
"x": -444.088257,
|
||||
"y": 600.058838
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0.047059,
|
||||
"g": 0.078431,
|
||||
"r": 0.12549,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "colorize_8",
|
||||
"node_position": {
|
||||
"x": -500,
|
||||
"y": 700
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.302083,
|
||||
"g": 0.302083,
|
||||
"pos": 0,
|
||||
"r": 0.302083
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.710145,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_7",
|
||||
"node_position": {
|
||||
"x": -240,
|
||||
"y": -200
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.559601,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.286458,
|
||||
"g": 0.286458,
|
||||
"pos": 0.781818,
|
||||
"r": 0.286458
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "comment",
|
||||
"node_position": {
|
||||
"x": -1405.656738,
|
||||
"y": -1153.276611
|
||||
},
|
||||
"parameters": {
|
||||
"size": 4
|
||||
},
|
||||
"size": {
|
||||
"x": 264.319916,
|
||||
"y": 165.399994
|
||||
},
|
||||
"text": "Realistic Bricks by Rafe Hall\n\nProcedural brick material that supports brick color, wear, ambient occlusion, grime, and depth.\n\nTODO: Edge wear, plaster and better layering.",
|
||||
"type": "comment"
|
||||
},
|
||||
{
|
||||
"name": "perlin_4",
|
||||
"node_position": {
|
||||
"x": -1080,
|
||||
"y": 0
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 8,
|
||||
"persistence": 1,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "blend_6",
|
||||
"node_position": {
|
||||
"x": -540,
|
||||
"y": -40
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": -520,
|
||||
"y": 200
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.715167,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 0,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.715269,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_9",
|
||||
"node_position": {
|
||||
"x": -820,
|
||||
"y": 0
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.354167,
|
||||
"g": 0.354167,
|
||||
"pos": 0.209091,
|
||||
"r": 0.354167
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.536458,
|
||||
"g": 0.536458,
|
||||
"pos": 0.5,
|
||||
"r": 0.536458
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.166667,
|
||||
"g": 0.166667,
|
||||
"pos": 0.936364,
|
||||
"r": 0.166667
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_2",
|
||||
"node_position": {
|
||||
"x": -260,
|
||||
"y": 400
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "bricks_2",
|
||||
"node_position": {
|
||||
"x": -820,
|
||||
"y": -240
|
||||
},
|
||||
"parameters": {
|
||||
"bevel": 0.087751,
|
||||
"columns": 6,
|
||||
"mortar": 0,
|
||||
"pattern": 1,
|
||||
"repeat": 1,
|
||||
"row_offset": 0.5,
|
||||
"rows": 20
|
||||
},
|
||||
"type": "bricks"
|
||||
},
|
||||
{
|
||||
"name": "normal_map",
|
||||
"node_position": {
|
||||
"x": 20,
|
||||
"y": 400
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 1,
|
||||
"size": 4
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "colorize_6",
|
||||
"node_position": {
|
||||
"x": -260,
|
||||
"y": 280
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_3",
|
||||
"node_position": {
|
||||
"x": 280,
|
||||
"y": 260
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_2",
|
||||
"node_position": {
|
||||
"x": -20,
|
||||
"y": 260
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 1,
|
||||
"size": 4
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "colorize_10",
|
||||
"node_position": {
|
||||
"x": -520,
|
||||
"y": -140
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.710909,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.72,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_3",
|
||||
"node_position": {
|
||||
"x": 60,
|
||||
"y": -240
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 0.42,
|
||||
"size": 4
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "blend_7",
|
||||
"node_position": {
|
||||
"x": 309,
|
||||
"y": -128
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "comment_2",
|
||||
"node_position": {
|
||||
"x": -202.672852,
|
||||
"y": 93.677933
|
||||
},
|
||||
"parameters": {
|
||||
"size": 4
|
||||
},
|
||||
"size": {
|
||||
"x": 371,
|
||||
"y": 49
|
||||
},
|
||||
"text": "Improved bricks, by Rafe Hall (aka MrDiamondGold)",
|
||||
"type": "comment"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,348 @@
|
||||
{"connections":[{"from":"perlin_0","from_port":0,"to":"blend_0","to_port":0},{"from":"blend_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"Material","to_port":0},{"from":"perlin_0","from_port":0,"to":"warp_0","to_port":1},{"from":"voronoi_0","from_port":0,"to":"warp_0","to_port":0},{"from":"warp_0","from_port":0,"to":"blend_0","to_port":1},{"from":"warp_0","from_port":0,"to":"colorize_1","to_port":0},{"from":"warp_0","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"Material","to_port":2},{"from":"warp_0","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"colorize_1","from_port":0,"to":"Material","to_port":3},{"from":"colorize_2","from_port":0,"to":"Material","to_port":1},{"from":"colorize_3","from_port":0,"to":"Material","to_port":5},{"from":"warp_0","from_port":0,"to":"colorize_3","to_port":0}],"nodes":[{"name":"Material","node_position":{"x":956,"y":271},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":2,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"colorize_0","node_position":{"x":666,"y":27},"parameters":{"gradient":{"points":[{"a":1,"b":0.032597,"g":0.032597,"pos":0.045455,"r":0.032597},{"a":1,"b":0.111979,"g":0.111979,"pos":0.3,"r":0.111979},{"a":1,"b":0.029781,"g":0.029781,"pos":0.518182,"r":0.029781},{"a":1,"b":0.069093,"g":0.069093,"pos":0.818182,"r":0.069093},{"a":1,"b":0,"g":0,"pos":1,"r":0}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_2","node_position":{"x":653,"y":140.5},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":1,"pos":0.263636,"r":1},{"a":1,"b":0,"g":0,"pos":0.8,"r":0}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_1","node_position":{"x":646,"y":223},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0.765625,"pos":0,"r":1},{"a":1,"b":0,"g":0,"pos":0.154545,"r":1},{"a":1,"b":0,"g":0,"pos":0.245455,"r":0}],"type":"Gradient"}},"type":"colorize"},{"name":"normal_map_0","node_position":{"x":658,"y":309.5},"parameters":{"amount":0.9,"size":2},"type":"normal_map"},{"name":"colorize_3","node_position":{"x":658,"y":404.25},"parameters":{"gradient":{"points":[{"a":1,"b":0.345455,"g":0.345455,"pos":0,"r":0.345455},{"a":1,"b":0,"g":0,"pos":1,"r":0}],"type":"Gradient"}},"type":"colorize"},{"name":"blend_0","node_position":{"x":475,"y":-30},"parameters":{"amount":0.45,"blend_type":1},"type":"blend"},{"name":"warp_0","node_position":{"x":338,"y":196},"parameters":{"amount":0.3},"type":"warp"},{"name":"voronoi_0","node_position":{"x":130,"y":299},"parameters":{"intensity":0.55,"scale_x":6,"scale_y":6},"type":"voronoi"},{"name":"perlin_0","node_position":{"x":190,"y":-14},"parameters":{"iterations":8,"persistence":0.75,"scale_x":4,"scale_y":4},"type":"perlin"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "warp_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 0,
|
||||
"to": "warp_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "warp_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "warp_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "warp_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "warp_0",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 3
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 5
|
||||
},
|
||||
{
|
||||
"from": "warp_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 6
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "408",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 956,
|
||||
"y": 271
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 0.45,
|
||||
"emission_energy": 2,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 666,
|
||||
"y": 27
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.479167,
|
||||
"g": 0.479167,
|
||||
"pos": 0.045455,
|
||||
"r": 0.479167
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.875,
|
||||
"g": 0.875,
|
||||
"pos": 0.3,
|
||||
"r": 0.875
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.442708,
|
||||
"g": 0.442708,
|
||||
"pos": 0.518182,
|
||||
"r": 0.442708
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.069093,
|
||||
"g": 0.069093,
|
||||
"pos": 0.818182,
|
||||
"r": 0.069093
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.40625,
|
||||
"g": 0.40625,
|
||||
"pos": 1,
|
||||
"r": 0.40625
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": 653,
|
||||
"y": 140.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.272727,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.563636,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": 646,
|
||||
"y": 223
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.765625,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.154545,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.245455,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 658,
|
||||
"y": 309.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.9,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 2
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": 658,
|
||||
"y": 404.25
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.345455,
|
||||
"g": 0.345455,
|
||||
"pos": 0,
|
||||
"r": 0.345455
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 1,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 475,
|
||||
"y": -30
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.83125,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "warp_0",
|
||||
"node_position": {
|
||||
"x": 338,
|
||||
"y": 196
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.3,
|
||||
"eps": 0.045,
|
||||
"epsilon": 0
|
||||
},
|
||||
"type": "warp"
|
||||
},
|
||||
{
|
||||
"name": "voronoi_0",
|
||||
"node_position": {
|
||||
"x": 130,
|
||||
"y": 299
|
||||
},
|
||||
"parameters": {
|
||||
"intensity": 0.55,
|
||||
"randomness": 1,
|
||||
"scale_x": 6,
|
||||
"scale_y": 6
|
||||
},
|
||||
"type": "voronoi"
|
||||
},
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": 190,
|
||||
"y": -14
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 8,
|
||||
"persistence": 0.75,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
2133
addons/material_maker/examples/mandala.ptex
Normal file
@ -1 +1,173 @@
|
||||
{"connections":[{"from":"custom_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"Material","to_port":3}],"nodes":[{"name":"Material","node_position":{"x":200,"y":0},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"model_data":{"global":"float mandelbrot(vec2 uv) {\n float di = 1.0;\n vec2 z = vec2(0.0);\n float m2 = 0.0;\n vec2 dz = vec2(0.0);\n for( int i=0; i<200; i++ )\n {\n if (m2>1024.0 ) {\n\t\t\tdi=0.0;\n\t\t\tbreak;\n\t\t}\n\n\t\t// Z' -> 2·Z·Z' + 1\n dz = 2.0*vec2(z.x*dz.x-z.y*dz.y, z.x*dz.y + z.y*dz.x) + vec2(1.0,0.0);\n\t\t\t\n // Z -> Z² + c\t\t\t\n z = vec2( z.x*z.x - z.y*z.y, 2.0*z.x*z.y ) + uv;\n\t\t\t\n m2 = dot(z,z);\n }\n\n // distance\t\n\t// d(c) = |Z|·log|Z|/|Z'|\n\tfloat d = 0.5*sqrt(dot(z,z)/dot(dz,dz))*log(dot(z,z));\n if( di>0.5 ) d=0.0;\n\treturn d;\n}","instance":"float $(name)_xyz(vec2 uv) {\n\treturn mandelbrot(uv);\n}","name":"Mandelbrot","outputs":[{"f":"clamp($(name)_xyz(vec2($(x), $(y))+$(scale)*(2.0*$(uv)-1.0))*$(contrast), 0.0, 1.0)"}],"parameters":[{"label":"Scale","max":3,"min":0,"name":"scale","step":0.0001,"type":"float","widget":"spinbox"},{"label":"X","max":2,"min":-2,"name":"x","step":0.0001,"type":"float","widget":"spinbox"},{"label":"Y","max":2,"min":-2,"name":"y","step":0.0001,"type":"float","widget":"spinbox"},{"label":"Contrast","max":10000,"min":1,"name":"contrast","step":0.0001,"type":"float","widget":"spinbox"}]},"name":"custom_0","node_position":{"x":-211,"y":208},"parameters":{"contrast":10,"scale":1,"x":0,"y":0},"type":"custom"},{"name":"colorize_0","node_position":{"x":-99.75,"y":-7.25},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0,"r":1},{"a":1,"b":0,"g":0.96875,"pos":0.2,"r":1},{"a":1,"b":0.0625,"g":1,"pos":0.4,"r":0},{"a":1,"b":1,"g":1,"pos":0.618182,"r":0},{"a":1,"b":0.965909,"g":0,"pos":0.818182,"r":0},{"a":1,"b":1,"g":0,"pos":1,"r":0.9375}],"type":"Gradient"}},"type":"colorize"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "custom_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 3
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "362",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 200,
|
||||
"y": 0
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"r": 0,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "custom_0",
|
||||
"node_position": {
|
||||
"x": -211,
|
||||
"y": 208
|
||||
},
|
||||
"parameters": {
|
||||
"contrast": 10,
|
||||
"scale": 1,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"shader_model": {
|
||||
"global": "float mandelbrot(vec2 uv) {\n float di = 1.0;\n vec2 z = vec2(0.0);\n float m2 = 0.0;\n vec2 dz = vec2(0.0);\n for( int i=0; i<200; i++ )\n {\n if (m2>1024.0 ) {\n\t\t\tdi=0.0;\n\t\t\tbreak;\n\t\t}\n\n\t\t// Z' -> 2·Z·Z' + 1\n dz = 2.0*vec2(z.x*dz.x-z.y*dz.y, z.x*dz.y + z.y*dz.x) + vec2(1.0,0.0);\n\t\t\t\n // Z -> Z² + c\t\t\t\n z = vec2( z.x*z.x - z.y*z.y, 2.0*z.x*z.y ) + uv;\n\t\t\t\n m2 = dot(z,z);\n }\n\n // distance\t\n\t// d(c) = |Z|·log|Z|/|Z'|\n\tfloat d = 0.5*sqrt(dot(z,z)/dot(dz,dz))*log(dot(z,z));\n if( di>0.5 ) d=0.0;\n\treturn d;\n}",
|
||||
"instance": "float $(name)_xyz(vec2 uv) {\n\treturn mandelbrot(uv);\n}",
|
||||
"name": "Mandelbrot",
|
||||
"outputs": [
|
||||
{
|
||||
"f": "clamp($(name)_xyz(vec2($(x), $(y))+$(scale)*(2.0*$(uv)-1.0))*$(contrast), 0.0, 1.0)",
|
||||
"type": "f"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"label": "Scale",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"name": "scale",
|
||||
"step": 0.0001,
|
||||
"type": "float",
|
||||
"widget": "spinbox"
|
||||
},
|
||||
{
|
||||
"label": "X",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"name": "x",
|
||||
"step": 0.0001,
|
||||
"type": "float",
|
||||
"widget": "spinbox"
|
||||
},
|
||||
{
|
||||
"label": "Y",
|
||||
"max": 2,
|
||||
"min": -2,
|
||||
"name": "y",
|
||||
"step": 0.0001,
|
||||
"type": "float",
|
||||
"widget": "spinbox"
|
||||
},
|
||||
{
|
||||
"label": "Contrast",
|
||||
"max": 10000,
|
||||
"min": 1,
|
||||
"name": "contrast",
|
||||
"step": 0.0001,
|
||||
"type": "float",
|
||||
"widget": "spinbox"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "shader"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": -99.75,
|
||||
"y": -7.25
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.96875,
|
||||
"pos": 0.2,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.0625,
|
||||
"g": 1,
|
||||
"pos": 0.4,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.618182,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.965909,
|
||||
"g": 0,
|
||||
"pos": 0.818182,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 0,
|
||||
"pos": 1,
|
||||
"r": 0.9375
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,504 @@
|
||||
{"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":[{"name":"pattern_1","node_position":{"x":15,"y":492},"parameters":{"mix":0,"x_scale":8,"x_wave":0,"y_scale":0,"y_wave":4},"type":"pattern"},{"name":"colorize_1","node_position":{"x":349,"y":386},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":1,"pos":0.035714,"r":1},{"a":1,"b":0,"g":0,"pos":0.142857,"r":0},{"a":1,"b":1,"g":1,"pos":0.258929,"r":1},{"a":1,"b":0,"g":0,"pos":0.535714,"r":0},{"a":1,"b":1,"g":1,"pos":0.723214,"r":1},{"a":1,"b":0,"g":0,"pos":0.848214,"r":0},{"a":1,"b":1,"g":1,"pos":0.982143,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"warp_1","node_position":{"x":257,"y":418},"parameters":{"amount":1},"type":"warp"},{"name":"uniform_0","node_position":{"x":484,"y":126},"parameters":{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"}},"type":"uniform"},{"name":"blend_1","node_position":{"x":297,"y":130},"parameters":{"amount":0.9,"blend_type":0},"type":"blend"},{"name":"Material","node_position":{"x":676,"y":101},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"voronoi_0","node_position":{"x":8,"y":178},"parameters":{"intensity":1,"scale_x":8,"scale_y":4},"type":"voronoi"},{"name":"colorize_0","node_position":{"x":349,"y":309},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":1,"pos":0.017857,"r":1},{"a":1,"b":0,"g":0,"pos":0.125,"r":0},{"a":1,"b":1,"g":1,"pos":0.241071,"r":1},{"a":1,"b":1,"g":1,"pos":0.455357,"r":1},{"a":1,"b":0,"g":0,"pos":0.616071,"r":0},{"a":1,"b":1,"g":1,"pos":0.723214,"r":1},{"a":1,"b":1,"g":1,"pos":0.857143,"r":1},{"a":1,"b":0,"g":0,"pos":0.946429,"r":0},{"a":1,"b":1,"g":1,"pos":0.982143,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"perlin_1","node_position":{"x":-264,"y":25},"parameters":{"iterations":9,"persistence":1,"scale_x":16,"scale_y":16},"type":"perlin"},{"name":"colorize_4","node_position":{"x":24,"y":81},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0.190909,"r":0},{"a":1,"b":1,"g":1,"pos":0.463636,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"perlin_0","node_position":{"x":15,"y":328},"parameters":{"iterations":4,"persistence":0.5,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"warp_0","node_position":{"x":246,"y":306},"parameters":{"amount":0.8},"type":"warp"},{"name":"colorize_3","node_position":{"x":474,"y":193},"parameters":{"gradient":{"points":[{"a":1,"b":0.744792,"g":0.744792,"pos":0,"r":0.744792},{"a":1,"b":0.4375,"g":0.4375,"pos":1,"r":0.4375}],"type":"Gradient"}},"type":"colorize"},{"name":"blend_0","node_position":{"x":544,"y":339},"parameters":{"amount":0.65,"blend_type":0},"type":"blend"},{"name":"colorize_2","node_position":{"x":765,"y":404},"parameters":{"gradient":{"points":[{"a":1,"b":0.791667,"g":0.908854,"pos":0,"r":1},{"a":1,"b":0.84375,"g":0.931641,"pos":0.236364,"r":1},{"a":1,"b":1,"g":1,"pos":1,"r":1}],"type":"Gradient"}},"type":"colorize"}]}
|
||||
{
|
||||
"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
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "297",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "pattern_1",
|
||||
"node_position": {
|
||||
"x": 15,
|
||||
"y": 492
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 0,
|
||||
"x_scale": 8,
|
||||
"x_wave": 0,
|
||||
"y_scale": 0,
|
||||
"y_wave": 4
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": 349,
|
||||
"y": 386
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.035714,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.142857,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.258929,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.535714,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.723214,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.848214,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.982143,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "warp_1",
|
||||
"node_position": {
|
||||
"x": 257,
|
||||
"y": 418
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"eps": 0.045,
|
||||
"epsilon": 0
|
||||
},
|
||||
"type": "warp"
|
||||
},
|
||||
{
|
||||
"name": "uniform_0",
|
||||
"node_position": {
|
||||
"x": 484,
|
||||
"y": 126
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"r": 0,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "blend_1",
|
||||
"node_position": {
|
||||
"x": 249,
|
||||
"y": 45
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.9,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 676,
|
||||
"y": 101
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "voronoi_0",
|
||||
"node_position": {
|
||||
"x": 8,
|
||||
"y": 178
|
||||
},
|
||||
"parameters": {
|
||||
"intensity": 1,
|
||||
"randomness": 1,
|
||||
"scale_x": 8,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "voronoi"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 349,
|
||||
"y": 309
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.017857,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.125,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.241071,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.455357,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.616071,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.723214,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.857143,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.946429,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.982143,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "perlin_1",
|
||||
"node_position": {
|
||||
"x": -264,
|
||||
"y": 25
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 6,
|
||||
"persistence": 1,
|
||||
"scale_x": 8,
|
||||
"scale_y": 8
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "colorize_4",
|
||||
"node_position": {
|
||||
"x": 24,
|
||||
"y": 81
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.190909,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.463636,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": 15,
|
||||
"y": 328
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 4,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "warp_0",
|
||||
"node_position": {
|
||||
"x": 246,
|
||||
"y": 306
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.8,
|
||||
"eps": 0.045,
|
||||
"epsilon": 0
|
||||
},
|
||||
"type": "warp"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": 272,
|
||||
"y": 171
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.484375,
|
||||
"g": 0.484375,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.744792,
|
||||
"g": 0.744792,
|
||||
"pos": 0.390909,
|
||||
"r": 0.744792
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.4375,
|
||||
"g": 0.4375,
|
||||
"pos": 1,
|
||||
"r": 0.4375
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 544,
|
||||
"y": 339
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.65,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": 765,
|
||||
"y": 404
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.791667,
|
||||
"g": 0.908854,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.84375,
|
||||
"g": 0.931641,
|
||||
"pos": 0.236364,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,184 @@
|
||||
{"connections":[{"from":"pattern_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"transform_0","to_port":0},{"from":"transform_0","from_port":0,"to":"transform_1","to_port":0},{"from":"transform_1","from_port":0,"to":"transform_2","to_port":0},{"from":"transform_1","from_port":0,"to":"blend_0","to_port":1},{"from":"transform_2","from_port":0,"to":"blend_0","to_port":0},{"from":"pattern_1","from_port":0,"to":"blend_0","to_port":2},{"from":"blend_0","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4}],"nodes":[{"name":"transform_1","node_position":{"x":241,"y":384},"parameters":{"repeat":true,"rotate":0,"scale_x":0.25,"scale_y":0.125,"translate_x":0,"translate_y":0.5},"type":"transform"},{"name":"pattern_1","node_position":{"x":218,"y":574},"parameters":{"mix":4,"x_scale":4,"x_wave":2,"y_scale":4,"y_wave":2},"type":"pattern"},{"name":"transform_0","node_position":{"x":27,"y":577},"parameters":{"repeat":false,"rotate":0,"scale_x":1,"scale_y":1.35,"translate_x":0,"translate_y":0},"type":"transform"},{"name":"colorize_0","node_position":{"x":43,"y":510},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":1,"pos":0.309091,"r":1},{"a":1,"b":0,"g":0,"pos":0.645455,"r":0}],"type":"Gradient"}},"type":"colorize"},{"name":"pattern_0","node_position":{"x":8,"y":410},"parameters":{"mix":0,"x_scale":10,"x_wave":1,"y_scale":1,"y_wave":1},"type":"pattern"},{"name":"transform_2","node_position":{"x":436,"y":499},"parameters":{"repeat":true,"rotate":90,"scale_x":1,"scale_y":1,"translate_x":0,"translate_y":0},"type":"transform"},{"name":"Material","node_position":{"x":955,"y":197},"parameters":{"albedo_color":{"a":1,"b":0.953125,"g":0.834013,"r":0.822815,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":0.75},"type":"material"},{"name":"normal_map_0","node_position":{"x":730,"y":341},"parameters":{"amount":0.5,"size":2},"type":"normal_map"},{"name":"blend_0","node_position":{"x":456,"y":390},"parameters":{"amount":0.5,"blend_type":0},"type":"blend"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "pattern_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "pattern_1",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "transform_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "327",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "pattern_1",
|
||||
"node_position": {
|
||||
"x": 78,
|
||||
"y": 382
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 4,
|
||||
"x_scale": 4,
|
||||
"x_wave": 2,
|
||||
"y_scale": 4,
|
||||
"y_wave": 2
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 148,
|
||||
"y": 258
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.181818,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.436364,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "pattern_0",
|
||||
"node_position": {
|
||||
"x": -127,
|
||||
"y": 256
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 0,
|
||||
"x_scale": 40,
|
||||
"x_wave": 1,
|
||||
"y_scale": 8,
|
||||
"y_wave": 1
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "transform_2",
|
||||
"node_position": {
|
||||
"x": 372,
|
||||
"y": 37
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": true,
|
||||
"rotate": 90,
|
||||
"scale_x": 1,
|
||||
"scale_y": 1,
|
||||
"translate_x": 0,
|
||||
"translate_y": 0
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 930,
|
||||
"y": 199
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 0.953125,
|
||||
"g": 0.834013,
|
||||
"r": 0.822815,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 0.75,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 668,
|
||||
"y": 268
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 2
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 381,
|
||||
"y": 252
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,260 @@
|
||||
{"connections":[{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"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},{"from":"pattern_0","from_port":0,"to":"colorize_0","to_port":0}],"nodes":[{"name":"colorize_1","node_position":{"x":119,"y":186},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0.236364,"r":0},{"a":1,"b":1,"g":1,"pos":0.254545,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"Material","node_position":{"x":669,"y":81},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"normal_map_0","node_position":{"x":522,"y":205},"parameters":{"amount":0.5,"size":2},"type":"normal_map"},{"name":"uniform_0","node_position":{"x":507,"y":21},"parameters":{"color":{"a":1,"b":0.855469,"g":0.736813,"r":0.51796,"type":"Color"}},"type":"uniform"},{"name":"uniform_1","node_position":{"x":510,"y":73},"parameters":{"color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"}},"type":"uniform"},{"name":"uniform_2","node_position":{"x":513,"y":126},"parameters":{"color":{"a":1,"b":0.632813,"g":0.632813,"r":0.632813,"type":"Color"}},"type":"uniform"},{"name":"pattern_1","node_position":{"x":-258,"y":189},"parameters":{"mix":3,"x_scale":1,"x_wave":1,"y_scale":1,"y_wave":1},"type":"pattern"},{"name":"pattern_0","node_position":{"x":-259,"y":314},"parameters":{"mix":0,"x_scale":16,"x_wave":0,"y_scale":16,"y_wave":0},"type":"pattern"},{"name":"blend_0","node_position":{"x":331,"y":210},"parameters":{"amount":1,"blend_type":9},"type":"blend"},{"name":"colorize_0","node_position":{"x":124,"y":298},"parameters":{"gradient":{"points":[{"a":1,"b":0.546875,"g":0.546875,"pos":0.845455,"r":0.546875},{"a":1,"b":0,"g":0,"pos":1,"r":0}],"type":"Gradient"}},"type":"colorize"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"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
|
||||
},
|
||||
{
|
||||
"from": "pattern_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "342",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": -16,
|
||||
"y": 97
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.236364,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.254545,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 508,
|
||||
"y": 116
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 257,
|
||||
"y": 286
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 2
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "uniform_0",
|
||||
"node_position": {
|
||||
"x": 330,
|
||||
"y": 33
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0.855469,
|
||||
"g": 0.736813,
|
||||
"r": 0.51796,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "uniform_1",
|
||||
"node_position": {
|
||||
"x": 333,
|
||||
"y": 85
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "uniform_2",
|
||||
"node_position": {
|
||||
"x": 336,
|
||||
"y": 138
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0.632813,
|
||||
"g": 0.632813,
|
||||
"r": 0.632813,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "pattern_1",
|
||||
"node_position": {
|
||||
"x": -46,
|
||||
"y": -2
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 3,
|
||||
"x_scale": 1,
|
||||
"x_wave": 1,
|
||||
"y_scale": 1,
|
||||
"y_wave": 1
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "pattern_0",
|
||||
"node_position": {
|
||||
"x": -32,
|
||||
"y": 191
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 0,
|
||||
"x_scale": 16,
|
||||
"x_wave": 0,
|
||||
"y_scale": 16,
|
||||
"y_wave": 0
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 254,
|
||||
"y": 196
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 9
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": -15,
|
||||
"y": 289
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.546875,
|
||||
"g": 0.546875,
|
||||
"pos": 0.845455,
|
||||
"r": 0.546875
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 1,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,245 @@
|
||||
{"connections":[{"from":"blend_0","from_port":0,"to":"Material","to_port":0},{"from":"voronoi_0","from_port":2,"to":"blend_0","to_port":1},{"from":"voronoi_0","from_port":1,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"blend_0","to_port":0},{"from":"voronoi_0","from_port":1,"to":"colorize_1","to_port":0},{"from":"colorize_1","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"uniform_0","from_port":0,"to":"Material","to_port":1},{"from":"voronoi_0","from_port":1,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"Material","to_port":2}],"nodes":[{"name":"voronoi_0","node_position":{"x":-543.5,"y":-11.5},"parameters":{"intensity":1,"scale_x":32,"scale_y":32},"type":"voronoi"},{"name":"normal_map_0","node_position":{"x":-165.5,"y":133.5},"parameters":{"amount":0.5,"size":5},"type":"normal_map"},{"name":"Material","node_position":{"x":30,"y":-44},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"colorize_1","node_position":{"x":-349.5,"y":138.5},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":1,"pos":0.045455,"r":1},{"a":1,"b":0,"g":0,"pos":0.109091,"r":0}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_0","node_position":{"x":-317.5,"y":-169.5},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":1,"pos":0.063636,"r":1},{"a":1,"b":0,"g":0,"pos":0.072727,"r":0}],"type":"Gradient"}},"type":"colorize"},{"name":"uniform_0","node_position":{"x":-127.5,"y":-3.5},"parameters":{"color":{"a":1,"b":0.109375,"g":0.109375,"r":0.109375,"type":"Color"}},"type":"uniform"},{"name":"colorize_2","node_position":{"x":-306.5,"y":39.5},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":1,"pos":0,"r":1},{"a":1,"b":0.109375,"g":0.109375,"pos":0.236364,"r":0.109375}],"type":"Gradient"}},"type":"colorize"},{"name":"blend_0","node_position":{"x":-294.5,"y":-94.5},"parameters":{"amount":1,"blend_type":3},"type":"blend"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 2,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 1,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 1,
|
||||
"to": "colorize_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "uniform_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 1,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 2
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "448",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "voronoi_0",
|
||||
"node_position": {
|
||||
"x": -543.5,
|
||||
"y": -11.5
|
||||
},
|
||||
"parameters": {
|
||||
"intensity": 1,
|
||||
"randomness": 1,
|
||||
"scale_x": 32,
|
||||
"scale_y": 32
|
||||
},
|
||||
"type": "voronoi"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": -260.5,
|
||||
"y": 128.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 5
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 30,
|
||||
"y": -44
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": -490.5,
|
||||
"y": 135.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.054546,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.127273,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": -317.5,
|
||||
"y": -169.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.063636,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.072727,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "uniform_0",
|
||||
"node_position": {
|
||||
"x": -127.5,
|
||||
"y": -3.5
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0.109375,
|
||||
"g": 0.109375,
|
||||
"r": 0.109375,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": -306.5,
|
||||
"y": 39.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.109375,
|
||||
"g": 0.109375,
|
||||
"pos": 0.236364,
|
||||
"r": 0.109375
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": -294.5,
|
||||
"y": -94.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 3
|
||||
},
|
||||
"type": "blend"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,342 @@
|
||||
{"connections":[{"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":0},{"from":"colorize_1","from_port":0,"to":"blend_0","to_port":1},{"from":"blend_0","from_port":0,"to":"Material","to_port":0},{"from":"shape_0","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"transform_0","to_port":0},{"from":"perlin_1","from_port":0,"to":"transform_0","to_port":1},{"from":"colorize_3","from_port":0,"to":"blend_1","to_port":0},{"from":"transform_0","from_port":0,"to":"blend_1","to_port":1},{"from":"perlin_1","from_port":0,"to":"colorize_3","to_port":0}],"nodes":[{"name":"Material","node_position":{"x":479,"y":-5},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"pattern_1","node_position":{"x":-295.25,"y":-24.25},"parameters":{"mix":3,"x_scale":8,"x_wave":1,"y_scale":8,"y_wave":1},"type":"pattern"},{"name":"pattern_0","node_position":{"x":-303,"y":-157},"parameters":{"mix":3,"x_scale":4,"x_wave":4,"y_scale":32,"y_wave":1},"type":"pattern"},{"name":"colorize_1","node_position":{"x":-13.25,"y":-31.25},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":0.752604,"pos":0.036364,"r":0.583333},{"a":1,"b":1,"g":1,"pos":0.054545,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_0","node_position":{"x":-34,"y":-153},"parameters":{"gradient":{"points":[{"a":1,"b":1,"g":0.752604,"pos":0.054545,"r":0.583333},{"a":1,"b":1,"g":1,"pos":0.081818,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"blend_0","node_position":{"x":231,"y":5.5},"parameters":{"amount":1,"blend_type":10},"type":"blend"},{"name":"perlin_0","node_position":{"x":-27.999969,"y":111},"parameters":{"iterations":3,"persistence":0.5,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"shape_0","node_position":{"x":-300.999969,"y":281},"parameters":{"edge":0.465753,"radius":0.452055,"shape":1,"sides":4},"type":"shape"},{"name":"colorize_2","node_position":{"x":-137.999969,"y":291},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0.3,"r":0},{"a":1,"b":1,"g":1,"pos":0.509091,"r":1},{"a":1,"b":0,"g":0,"pos":0.754545,"r":0}],"type":"Gradient"}},"type":"colorize"},{"name":"perlin_1","node_position":{"x":-267.999969,"y":487},"parameters":{"iterations":6,"persistence":0.5,"scale_x":16,"scale_y":16},"type":"perlin"},{"name":"blend_1","node_position":{"x":312.000031,"y":380.5},"parameters":{"amount":1,"blend_type":0},"type":"blend"},{"name":"colorize_3","node_position":{"x":48.000031,"y":499.5},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0,"r":0},{"a":1,"b":1,"g":1,"pos":1,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"transform_0","node_position":{"x":66.000031,"y":250.5},"parameters":{"repeat":true,"rotate":0,"scale_x":1,"scale_y":1,"translate_x":0.01,"translate_y":0},"type":"transform"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"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": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "shape_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "transform_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin_1",
|
||||
"from_port": 0,
|
||||
"to": "transform_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "perlin_1",
|
||||
"from_port": 0,
|
||||
"to": "colorize_3",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "466",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 479,
|
||||
"y": -5
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "pattern_1",
|
||||
"node_position": {
|
||||
"x": -295.25,
|
||||
"y": -24.25
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 3,
|
||||
"x_scale": 8,
|
||||
"x_wave": 1,
|
||||
"y_scale": 8,
|
||||
"y_wave": 1
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "pattern_0",
|
||||
"node_position": {
|
||||
"x": -303,
|
||||
"y": -157
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 3,
|
||||
"x_scale": 4,
|
||||
"x_wave": 4,
|
||||
"y_scale": 32,
|
||||
"y_wave": 1
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": -13.25,
|
||||
"y": -31.25
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 0.752604,
|
||||
"pos": 0.036364,
|
||||
"r": 0.583333
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.054545,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": -34,
|
||||
"y": -153
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 0.752604,
|
||||
"pos": 0.054545,
|
||||
"r": 0.583333
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.081818,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 231,
|
||||
"y": 5.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 10
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": -27.999969,
|
||||
"y": 111
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 3,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "shape_0",
|
||||
"node_position": {
|
||||
"x": -300.999969,
|
||||
"y": 281
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 0.465753,
|
||||
"radius": 0.452055,
|
||||
"shape": 1,
|
||||
"sides": 4
|
||||
},
|
||||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": -137.999969,
|
||||
"y": 291
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.3,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.509091,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.754545,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "perlin_1",
|
||||
"node_position": {
|
||||
"x": -267.999969,
|
||||
"y": 487
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 6,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 16,
|
||||
"scale_y": 16
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "blend_1",
|
||||
"node_position": {
|
||||
"x": 312.000031,
|
||||
"y": 380.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": 48.000031,
|
||||
"y": 499.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "transform_0",
|
||||
"node_position": {
|
||||
"x": 66.000031,
|
||||
"y": 250.5
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": true,
|
||||
"rotate": 0,
|
||||
"scale_x": 1,
|
||||
"scale_y": 1,
|
||||
"translate_x": 0.01,
|
||||
"translate_y": 0
|
||||
},
|
||||
"type": "transform"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
536
addons/material_maker/examples/pentagram.ptex
Normal file
@ -0,0 +1,536 @@
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "shape_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "graph",
|
||||
"from_port": 0,
|
||||
"to": "blend_2_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_2_2",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_2_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 3
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "39",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 193,
|
||||
"y": -49
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"r": 0,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "shape_2",
|
||||
"node_position": {
|
||||
"x": -533.992065,
|
||||
"y": -0.5
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 1,
|
||||
"radius": 0.25,
|
||||
"shape": 2,
|
||||
"sides": 5
|
||||
},
|
||||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2_2",
|
||||
"node_position": {
|
||||
"x": -363.992096,
|
||||
"y": -7
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.027273,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.118182,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.143066,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend_2_2",
|
||||
"node_position": {
|
||||
"x": -38.492065,
|
||||
"y": 139
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 9
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": 106.007935,
|
||||
"y": -288.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "_2",
|
||||
"from_port": 0,
|
||||
"to": "transform",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform",
|
||||
"from_port": 0,
|
||||
"to": "_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "shape",
|
||||
"from_port": 0,
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "_3",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "shape",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_2",
|
||||
"from_port": 0,
|
||||
"to": "gen_outputs",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Runes circle",
|
||||
"name": "graph",
|
||||
"node_position": {
|
||||
"x": -271.03067,
|
||||
"y": -132
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "_2",
|
||||
"node_position": {
|
||||
"x": -400.5,
|
||||
"y": -278.5
|
||||
},
|
||||
"parameters": {
|
||||
"columns": 64,
|
||||
"rows": 8,
|
||||
"thickness": 0.1
|
||||
},
|
||||
"shader_model": {
|
||||
"global": "// Based on Otavio Good's https://www.shadertoy.com/view/MsXSRn\n\nfloat ThickLine(vec2 uv, vec2 posA, vec2 posB, float radiusInv)\n{\n\tvec2 dir = posA - posB;\n\tfloat dirLen = length(dir);\n\tvec2 dirN = normalize(dir);\n\tfloat dotTemp = clamp(dot(uv - posB, dirN), 0.0, dirLen);\n\tvec2 proj = dotTemp * dirN + posB;\n\tfloat d1 = length(uv - proj);\n\tfloat finalGray = clamp(1.0 - d1 * radiusInv, 0.0, 1.0);\n\treturn finalGray;\n}\n\n// makes a rune in the 0..1 uv space. Seed is which rune to draw.\n// passes back gray in x and derivates for lighting in yz\nfloat Rune(vec2 uv, float thickness) {\n\tfloat finalLine = 0.0;\n\tvec2 seed = floor(uv)-0.41;\n\tuv = fract(uv);\n\tfor (int i = 0; i < 4; i++)\t// number of strokes\n\t{\n\t\tvec2 posA = rand2(floor(seed+0.5));\n\t\tvec2 posB = rand2(floor(seed+1.5));\n\t\tseed += 2.0;\n\t\t// expand the range and mod it to get a nicely distributed random number - hopefully. :)\n\t\tposA = fract(posA * 128.0);\n\t\tposB = fract(posB * 128.0);\n\t\t// each rune touches the edge of its box on all 4 sides\n\t\tif (i == 0) posA.y = 0.0;\n\t\tif (i == 1) posA.x = 0.999;\n\t\tif (i == 2) posA.x = 0.0;\n\t\tif (i == 3) posA.y = 0.999;\n\t\t// snap the random line endpoints to a grid 2x3\n\t\tvec2 snaps = vec2(2.0, 3.0);\n\t\tposA = (floor(posA * snaps) + 0.5) / snaps;\t// + 0.5 to center it in a grid cell\n\t\tposB = (floor(posB * snaps) + 0.5) / snaps;\n\t\t//if (distance(posA, posB) < 0.0001) continue;\t// eliminate dots.\n\t\t// Dots (degenerate lines) are not cross-GPU safe without adding 0.001 - divide by 0 error.\n\t\tfinalLine = max(finalLine, ThickLine(uv, posA, posB + 0.001, 1.0/max(0.01, thickness)));\n\t}\n\treturn finalLine;\n}\n\n\n",
|
||||
"inputs": [
|
||||
|
||||
],
|
||||
"instance": "",
|
||||
"name": "Runes",
|
||||
"outputs": [
|
||||
{
|
||||
"f": "Rune(vec2($columns, $rows)*$uv, $thickness)",
|
||||
"type": "f"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"default": 0,
|
||||
"label": "",
|
||||
"max": 32,
|
||||
"min": 2,
|
||||
"name": "columns",
|
||||
"step": 1,
|
||||
"type": "float",
|
||||
"widget": "spinbox"
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"label": "",
|
||||
"max": 32,
|
||||
"min": 2,
|
||||
"name": "rows",
|
||||
"step": 1,
|
||||
"type": "float",
|
||||
"widget": "spinbox"
|
||||
},
|
||||
{
|
||||
"default": 0.1,
|
||||
"label": "",
|
||||
"max": 0.3,
|
||||
"min": 0,
|
||||
"name": "thickness",
|
||||
"step": 0.01,
|
||||
"type": "float"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "shader"
|
||||
},
|
||||
{
|
||||
"name": "transform",
|
||||
"node_position": {
|
||||
"x": -437.5,
|
||||
"y": -153.5
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": true,
|
||||
"rotate": 0,
|
||||
"scale_x": 8,
|
||||
"scale_y": 1,
|
||||
"translate_x": 0,
|
||||
"translate_y": -0.04
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "shape",
|
||||
"node_position": {
|
||||
"x": -156.068481,
|
||||
"y": -262.5
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 0.299221,
|
||||
"radius": 1,
|
||||
"shape": 0,
|
||||
"sides": 3
|
||||
},
|
||||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"node_position": {
|
||||
"x": -174.853485,
|
||||
"y": -165.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.1,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.154545,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.545455,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.618182,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend",
|
||||
"node_position": {
|
||||
"x": -195.853485,
|
||||
"y": -107.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 2
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": -167.853485,
|
||||
"y": -26.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.018182,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.081819,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.115793,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.570339,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.633975,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.663637,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "_3",
|
||||
"node_position": {
|
||||
"x": -390.5,
|
||||
"y": 41.5
|
||||
},
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"shader_model": {
|
||||
"global": "",
|
||||
"inputs": [
|
||||
{
|
||||
"default": "0.0",
|
||||
"label": "",
|
||||
"name": "in",
|
||||
"type": "rgba"
|
||||
}
|
||||
],
|
||||
"instance": "",
|
||||
"name": "DiscMap",
|
||||
"outputs": [
|
||||
{
|
||||
"rgba": "$in(vec2(atan($uv.y-0.5, $uv.x-0.5), 2.0*length($uv-vec2(0.5))))",
|
||||
"type": "rgba"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
]
|
||||
},
|
||||
"type": "shader"
|
||||
},
|
||||
{
|
||||
"name": "blend_2",
|
||||
"node_position": {
|
||||
"x": -197.116241,
|
||||
"y": 32.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 9
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "gen_outputs",
|
||||
"node_position": {
|
||||
"x": 143.931519,
|
||||
"y": -115
|
||||
},
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"ports": [
|
||||
{
|
||||
"name": "port0",
|
||||
"type": "rgba"
|
||||
}
|
||||
],
|
||||
"type": "ios"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
},
|
||||
{
|
||||
"name": "shape",
|
||||
"node_position": {
|
||||
"x": -525.749817,
|
||||
"y": 117.666656
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 0.2,
|
||||
"radius": 0.75,
|
||||
"shape": 0,
|
||||
"sides": 2
|
||||
},
|
||||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"node_position": {
|
||||
"x": -536.749817,
|
||||
"y": 233.55304
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
328
addons/material_maker/examples/planet.ptex
Normal file
@ -0,0 +1,328 @@
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 6
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "normal_map",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "pattern",
|
||||
"from_port": 0,
|
||||
"to": "colorize_4",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_4",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "39",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 653,
|
||||
"y": 157
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 0.6,
|
||||
"emission_energy": 1,
|
||||
"metallic": 0.05,
|
||||
"normal_scale": 1,
|
||||
"roughness": 0.75,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "perlin",
|
||||
"node_position": {
|
||||
"x": -334.5,
|
||||
"y": -300.5
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 6,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 8,
|
||||
"scale_y": 8
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"node_position": {
|
||||
"x": -315.5,
|
||||
"y": -87.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 0.1875,
|
||||
"pos": 0.081818,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.447917,
|
||||
"g": 0.827474,
|
||||
"pos": 0.109091,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.489583,
|
||||
"pos": 0.227273,
|
||||
"r": 0.107096
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.19043,
|
||||
"pos": 0.554545,
|
||||
"r": 0.338542
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.172852,
|
||||
"pos": 0.927273,
|
||||
"r": 0.307292
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": -314.5,
|
||||
"y": -156.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.5,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.836364,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": -316.5,
|
||||
"y": -21.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"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": -20.5,
|
||||
"y": 273.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 4
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "pattern",
|
||||
"node_position": {
|
||||
"x": -343.5,
|
||||
"y": -582.25
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 0,
|
||||
"x_scale": 4,
|
||||
"x_wave": 4,
|
||||
"y_scale": 1,
|
||||
"y_wave": 0
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "colorize_4",
|
||||
"node_position": {
|
||||
"x": -300.5,
|
||||
"y": -473.25
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.75,
|
||||
"g": 0.75,
|
||||
"pos": 0.045455,
|
||||
"r": 0.75
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.363636,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "blend",
|
||||
"node_position": {
|
||||
"x": -300.5,
|
||||
"y": -399.25
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.819444,
|
||||
"blend_type": 3
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "comment",
|
||||
"node_position": {
|
||||
"x": -544.5,
|
||||
"y": -395.194458
|
||||
},
|
||||
"parameters": {
|
||||
"size": 4
|
||||
},
|
||||
"size": {
|
||||
"x": 190,
|
||||
"y": 67
|
||||
},
|
||||
"text": "Best viewed on Sphere mesh",
|
||||
"type": "comment"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,232 @@
|
||||
{"connections":[{"from":"shape_2","from_port":0,"to":"blend_1","to_port":0},{"from":"shape_1","from_port":0,"to":"blend_1","to_port":1},{"from":"blend_0","from_port":0,"to":"blend_2","to_port":0},{"from":"shape_3","from_port":0,"to":"blend_2","to_port":1},{"from":"blend_2","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"Material","to_port":0},{"from":"transform_0","from_port":0,"to":"blend_0","to_port":1},{"from":"blend_1","from_port":0,"to":"blend_0","to_port":0},{"from":"shape_0","from_port":0,"to":"transform_0","to_port":0}],"nodes":[{"name":"shape_3","node_position":{"x":-35,"y":36},"parameters":{"edge":0.05,"radius":0.18,"shape":0,"sides":3},"type":"shape"},{"name":"shape_0","node_position":{"x":-373,"y":13},"parameters":{"edge":0.02,"radius":0.5,"shape":4,"sides":3},"type":"shape"},{"name":"shape_1","node_position":{"x":-359,"y":-99},"parameters":{"edge":0.02,"radius":0.87,"shape":0,"sides":3},"type":"shape"},{"name":"shape_2","node_position":{"x":-358,"y":-200},"parameters":{"edge":0.02,"radius":0.34,"shape":0,"sides":3},"type":"shape"},{"name":"blend_1","node_position":{"x":-236,"y":-159},"parameters":{"amount":1,"blend_type":11},"type":"blend"},{"name":"Material","node_position":{"x":528,"y":-57},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"blend_0","node_position":{"x":-40,"y":-82},"parameters":{"amount":1,"blend_type":2},"type":"blend"},{"name":"transform_0","node_position":{"x":-245.657654,"y":-16.611115},"parameters":{"repeat":true,"rotate":30,"scale_x":1,"scale_y":1,"translate_x":0,"translate_y":0},"type":"transform"},{"name":"blend_2","node_position":{"x":149,"y":-34},"parameters":{"amount":1,"blend_type":3},"type":"blend"},{"name":"colorize_0","node_position":{"x":354.081177,"y":-39.5},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0.820313,"pos":0,"r":0.9375},{"a":1,"b":0,"g":0,"pos":1,"r":0}],"type":"Gradient"}},"type":"colorize"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "shape_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "shape_1",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "shape_3",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_1",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "shape_0",
|
||||
"from_port": 0,
|
||||
"to": "transform_0",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "535",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "shape_3",
|
||||
"node_position": {
|
||||
"x": -35,
|
||||
"y": 36
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 0.05,
|
||||
"radius": 0.18,
|
||||
"shape": 0,
|
||||
"sides": 3
|
||||
},
|
||||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "shape_0",
|
||||
"node_position": {
|
||||
"x": -407,
|
||||
"y": 19
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 0.02,
|
||||
"radius": 0.5,
|
||||
"shape": 4,
|
||||
"sides": 3
|
||||
},
|
||||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "shape_1",
|
||||
"node_position": {
|
||||
"x": -412,
|
||||
"y": -117
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 0.02,
|
||||
"radius": 0.87,
|
||||
"shape": 0,
|
||||
"sides": 3
|
||||
},
|
||||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "shape_2",
|
||||
"node_position": {
|
||||
"x": -411,
|
||||
"y": -218
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 0.02,
|
||||
"radius": 0.34,
|
||||
"shape": 0,
|
||||
"sides": 3
|
||||
},
|
||||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "blend_1",
|
||||
"node_position": {
|
||||
"x": -236,
|
||||
"y": -159
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 11
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 528,
|
||||
"y": -57
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": -40,
|
||||
"y": -82
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 2
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "transform_0",
|
||||
"node_position": {
|
||||
"x": -245.657654,
|
||||
"y": -16.611115
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": true,
|
||||
"rotate": 30,
|
||||
"scale_x": 1,
|
||||
"scale_y": 1,
|
||||
"translate_x": 0,
|
||||
"translate_y": 0
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "blend_2",
|
||||
"node_position": {
|
||||
"x": 145,
|
||||
"y": 36
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 3
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 292.081177,
|
||||
"y": -103.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.820313,
|
||||
"pos": 0,
|
||||
"r": 0.9375
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 1,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,315 @@
|
||||
{"connections":[{"from":"voronoi_0","from_port":0,"to":"blend_0","to_port":0},{"from":"voronoi_0","from_port":1,"to":"blend_0","to_port":1},{"from":"perlin_0","from_port":0,"to":"blend_0","to_port":2},{"from":"blend_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"Material","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"perlin_0","from_port":0,"to":"colorize_1","to_port":0},{"from":"colorize_1","from_port":0,"to":"Material","to_port":1},{"from":"perlin_0","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_2","from_port":0,"to":"Material","to_port":2},{"from":"perlin_1","from_port":0,"to":"warp_0","to_port":1},{"from":"voronoi_1","from_port":1,"to":"warp_0","to_port":0},{"from":"warp_0","from_port":0,"to":"normal_map_0","to_port":0}],"nodes":[{"name":"normal_map_0","node_position":{"x":531,"y":432},"parameters":{"amount":0.5,"size":2},"type":"normal_map"},{"name":"colorize_1","node_position":{"x":533,"y":343},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0,"r":0},{"a":1,"b":0.260417,"g":0.260417,"pos":1,"r":0.260417}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_0","node_position":{"x":530,"y":171},"parameters":{"gradient":{"points":[{"a":1,"b":0.391927,"g":0.523519,"pos":0,"r":0.583333},{"a":1,"b":0.240885,"g":0.276693,"pos":0.345455,"r":0.3125},{"a":1,"b":0.391927,"g":0.523519,"pos":0.645455,"r":0.583333},{"a":1,"b":0.240885,"g":0.276693,"pos":0.945455,"r":0.3125}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_2","node_position":{"x":526,"y":258},"parameters":{"gradient":{"points":[{"a":1,"b":0.364583,"g":0.364583,"pos":0,"r":0.364583},{"a":1,"b":1,"g":1,"pos":1,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"perlin_0","node_position":{"x":105,"y":305},"parameters":{"iterations":6,"persistence":0.85,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"perlin_1","node_position":{"x":102,"y":166},"parameters":{"iterations":3,"persistence":0.65,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"voronoi_1","node_position":{"x":115,"y":63},"parameters":{"intensity":0.85,"scale_x":4,"scale_y":4},"type":"voronoi"},{"name":"Material","node_position":{"x":768,"y":239},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"warp_0","node_position":{"x":317,"y":139},"parameters":{"amount":0.3},"type":"warp"},{"name":"voronoi_0","node_position":{"x":117,"y":448},"parameters":{"intensity":1,"scale_x":4,"scale_y":4},"type":"voronoi"},{"name":"blend_0","node_position":{"x":327,"y":411},"parameters":{"amount":0.5,"blend_type":0},"type":"blend"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 1,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "perlin_1",
|
||||
"from_port": 0,
|
||||
"to": "warp_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "voronoi_1",
|
||||
"from_port": 1,
|
||||
"to": "warp_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "warp_0",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "553",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 583,
|
||||
"y": 463
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 2
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": 533,
|
||||
"y": 343
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.260417,
|
||||
"g": 0.260417,
|
||||
"pos": 1,
|
||||
"r": 0.260417
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 530,
|
||||
"y": 171
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.391927,
|
||||
"g": 0.523519,
|
||||
"pos": 0,
|
||||
"r": 0.583333
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.240885,
|
||||
"g": 0.276693,
|
||||
"pos": 0.345455,
|
||||
"r": 0.3125
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.391927,
|
||||
"g": 0.523519,
|
||||
"pos": 0.645455,
|
||||
"r": 0.583333
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.240885,
|
||||
"g": 0.276693,
|
||||
"pos": 0.945455,
|
||||
"r": 0.3125
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": 526,
|
||||
"y": 258
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.364583,
|
||||
"g": 0.364583,
|
||||
"pos": 0,
|
||||
"r": 0.364583
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": 105,
|
||||
"y": 305
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 6,
|
||||
"persistence": 0.85,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "perlin_1",
|
||||
"node_position": {
|
||||
"x": 102,
|
||||
"y": 166
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 3,
|
||||
"persistence": 0.65,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "voronoi_1",
|
||||
"node_position": {
|
||||
"x": 115,
|
||||
"y": 63
|
||||
},
|
||||
"parameters": {
|
||||
"intensity": 0.85,
|
||||
"randomness": 1,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "voronoi"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 768,
|
||||
"y": 239
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "warp_0",
|
||||
"node_position": {
|
||||
"x": 317,
|
||||
"y": 139
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.3,
|
||||
"eps": 0.045,
|
||||
"epsilon": 0
|
||||
},
|
||||
"type": "warp"
|
||||
},
|
||||
{
|
||||
"name": "voronoi_0",
|
||||
"node_position": {
|
||||
"x": 117,
|
||||
"y": 448
|
||||
},
|
||||
"parameters": {
|
||||
"intensity": 1,
|
||||
"randomness": 1,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "voronoi"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 327,
|
||||
"y": 411
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,360 @@
|
||||
{"connections":[{"from":"perlin_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"perlin_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"colorize_2","from_port":0,"to":"blend_0","to_port":0},{"from":"colorize_1","from_port":0,"to":"blend_0","to_port":1},{"from":"perlin_2","from_port":0,"to":"colorize_3","to_port":0},{"from":"colorize_3","from_port":0,"to":"blend_0","to_port":2},{"from":"colorize_0","from_port":0,"to":"blend_1","to_port":1},{"from":"blend_0","from_port":0,"to":"Material","to_port":0},{"from":"perlin_1","from_port":0,"to":"colorize_2","to_port":0},{"from":"colorize_3","from_port":0,"to":"Material","to_port":1},{"from":"blend_1","from_port":0,"to":"Material","to_port":2},{"from":"colorize_4","from_port":0,"to":"blend_1","to_port":0},{"from":"colorize_3","from_port":0,"to":"colorize_4","to_port":0},{"from":"colorize_3","from_port":0,"to":"combine_0","to_port":0},{"from":"blend_1","from_port":0,"to":"combine_0","to_port":1},{"from":"combine_0","from_port":0,"to":"export_0","to_port":0}],"nodes":[{"name":"perlin_0","node_position":{"x":86,"y":301},"parameters":{"iterations":8,"persistence":0.7,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"perlin_1","node_position":{"x":86,"y":147},"parameters":{"iterations":8,"persistence":0.8,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"perlin_2","node_position":{"x":89,"y":-6},"parameters":{"iterations":8,"persistence":0.9,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"colorize_2","node_position":{"x":365,"y":-41},"parameters":{"gradient":{"points":[{"a":1,"b":0.335938,"g":0.335938,"pos":0,"r":0.335938},{"a":1,"b":0.695313,"g":0.695313,"pos":1,"r":0.695313}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_0","node_position":{"x":363,"y":337},"parameters":{"gradient":{"points":[{"a":1,"b":0.354545,"g":0.354545,"pos":0,"r":0.354545},{"a":1,"b":0.745455,"g":0.745455,"pos":1,"r":0.745455}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_3","node_position":{"x":371,"y":47},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0.445455,"r":0},{"a":1,"b":1,"g":1,"pos":0.445455,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_1","node_position":{"x":371,"y":214},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0.091146,"pos":0,"r":0.208333},{"a":1,"b":0,"g":0.1875,"pos":1,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_4","node_position":{"x":480,"y":141},"parameters":{"gradient":{"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":"Material","node_position":{"x":837,"y":123},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"blend_1","node_position":{"x":566,"y":253},"parameters":{"amount":0.5,"blend_type":4},"type":"blend"},{"name":"blend_0","node_position":{"x":562,"y":-23},"parameters":{"amount":0.5,"blend_type":0},"type":"blend"},{"name":"combine_0","node_position":{"x":849,"y":-6},"parameters":{},"type":"combine"},{"name":"export_0","node_position":{"x":1022,"y":14},"parameters":{"resolution":1},"suffix":"mr","type":"export"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin_1",
|
||||
"from_port": 0,
|
||||
"to": "colorize_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "perlin_2",
|
||||
"from_port": 0,
|
||||
"to": "colorize_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin_1",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_1",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "colorize_4",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "colorize_4",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_3",
|
||||
"from_port": 0,
|
||||
"to": "combine_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_1",
|
||||
"from_port": 0,
|
||||
"to": "combine_0",
|
||||
"to_port": 1
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "431",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": 86,
|
||||
"y": 301
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 8,
|
||||
"persistence": 0.7,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "perlin_1",
|
||||
"node_position": {
|
||||
"x": 86,
|
||||
"y": 147
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 8,
|
||||
"persistence": 0.8,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "perlin_2",
|
||||
"node_position": {
|
||||
"x": 89,
|
||||
"y": -6
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 8,
|
||||
"persistence": 0.9,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": 365,
|
||||
"y": -41
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.335938,
|
||||
"g": 0.335938,
|
||||
"pos": 0,
|
||||
"r": 0.335938
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.695313,
|
||||
"g": 0.695313,
|
||||
"pos": 1,
|
||||
"r": 0.695313
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 363,
|
||||
"y": 337
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.354545,
|
||||
"g": 0.354545,
|
||||
"pos": 0,
|
||||
"r": 0.354545
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.745455,
|
||||
"g": 0.745455,
|
||||
"pos": 1,
|
||||
"r": 0.745455
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": 371,
|
||||
"y": 47
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.445455,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.445455,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": 371,
|
||||
"y": 214
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.091146,
|
||||
"pos": 0,
|
||||
"r": 0.208333
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.1875,
|
||||
"pos": 1,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_4",
|
||||
"node_position": {
|
||||
"x": 480,
|
||||
"y": 141
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"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": "Material",
|
||||
"node_position": {
|
||||
"x": 837,
|
||||
"y": 123
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "blend_1",
|
||||
"node_position": {
|
||||
"x": 566,
|
||||
"y": 253
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"blend_type": 4
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 562,
|
||||
"y": -23
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.800781,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "combine_0",
|
||||
"node_position": {
|
||||
"x": 849,
|
||||
"y": -6
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"name": 0
|
||||
},
|
||||
"type": "combine"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
356
addons/material_maker/examples/tiles.ptex
Normal file
@ -0,0 +1,356 @@
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "shape",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "pattern",
|
||||
"from_port": 0,
|
||||
"to": "blend",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend",
|
||||
"from_port": 0,
|
||||
"to": "transform",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "transform",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "bricks",
|
||||
"from_port": 1,
|
||||
"to": "transform_2_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform_2_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "bricks",
|
||||
"from_port": 1,
|
||||
"to": "blend_3",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "transform_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_4",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "transform",
|
||||
"from_port": 0,
|
||||
"to": "blend_4",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "transform",
|
||||
"from_port": 0,
|
||||
"to": "transform_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_4",
|
||||
"from_port": 0,
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
"from_port": 0,
|
||||
"to": "blend_3",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "blend_2",
|
||||
"from_port": 0,
|
||||
"to": "normal_map",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "blend_3",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "39",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 510,
|
||||
"y": -55
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 0.45,
|
||||
"metallic": 1,
|
||||
"normal_scale": 2.15,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "shape",
|
||||
"node_position": {
|
||||
"x": -624.5,
|
||||
"y": -157.5
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 0.0625,
|
||||
"radius": 1,
|
||||
"shape": 0,
|
||||
"sides": 6
|
||||
},
|
||||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "transform",
|
||||
"node_position": {
|
||||
"x": -445.5,
|
||||
"y": -87.5
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": true,
|
||||
"rotate": 0,
|
||||
"scale_x": 0.125,
|
||||
"scale_y": 0.125,
|
||||
"translate_x": 0,
|
||||
"translate_y": 0
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "pattern",
|
||||
"node_position": {
|
||||
"x": -726.5,
|
||||
"y": -55.5
|
||||
},
|
||||
"parameters": {
|
||||
"mix": 0,
|
||||
"x_scale": 2,
|
||||
"x_wave": 4,
|
||||
"y_scale": 1,
|
||||
"y_wave": 3
|
||||
},
|
||||
"type": "pattern"
|
||||
},
|
||||
{
|
||||
"name": "blend",
|
||||
"node_position": {
|
||||
"x": -444.240479,
|
||||
"y": -198.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 2
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "transform_2",
|
||||
"node_position": {
|
||||
"x": -222.240479,
|
||||
"y": -85.5
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": true,
|
||||
"rotate": 0,
|
||||
"scale_x": 1,
|
||||
"scale_y": 1,
|
||||
"translate_x": 0.06,
|
||||
"translate_y": 0.06
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "blend_2",
|
||||
"node_position": {
|
||||
"x": -167.240479,
|
||||
"y": -198.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 9
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "bricks",
|
||||
"node_position": {
|
||||
"x": -506.407684,
|
||||
"y": 150.5
|
||||
},
|
||||
"parameters": {
|
||||
"bevel": 0,
|
||||
"columns": 8,
|
||||
"mortar": 0.1,
|
||||
"pattern": 0,
|
||||
"repeat": 1,
|
||||
"row_offset": 0,
|
||||
"rows": 8
|
||||
},
|
||||
"type": "bricks"
|
||||
},
|
||||
{
|
||||
"name": "blend_3",
|
||||
"node_position": {
|
||||
"x": 2.592316,
|
||||
"y": 168.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "transform_2_2",
|
||||
"node_position": {
|
||||
"x": -262.407715,
|
||||
"y": 140
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": true,
|
||||
"rotate": 0,
|
||||
"scale_x": 1,
|
||||
"scale_y": 1,
|
||||
"translate_x": 0.56,
|
||||
"translate_y": 0.56
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "blend_4",
|
||||
"node_position": {
|
||||
"x": 5.592316,
|
||||
"y": 65.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 11
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"node_position": {
|
||||
"x": -14.407684,
|
||||
"y": 262.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.072727,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "normal_map",
|
||||
"node_position": {
|
||||
"x": 83.448486,
|
||||
"y": -87.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.5,
|
||||
"param0": 11,
|
||||
"param1": 0.69,
|
||||
"size": 4
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": 217.448486,
|
||||
"y": 41.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.375,
|
||||
"pos": 0,
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.300293,
|
||||
"pos": 1,
|
||||
"r": 0.640625
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,350 @@
|
||||
{"connections":[{"from":"perlin_0","from_port":0,"to":"warp_0","to_port":0},{"from":"perlin_1","from_port":0,"to":"warp_0","to_port":1},{"from":"perlin_2","from_port":0,"to":"blend_0","to_port":0},{"from":"blend_0","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"blend_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"Material","to_port":2},{"from":"blend_0","from_port":0,"to":"Material","to_port":1},{"from":"voronoi_0","from_port":0,"to":"colorize_1","to_port":0},{"from":"warp_0","from_port":0,"to":"warp_1","to_port":0},{"from":"colorize_1","from_port":0,"to":"warp_1","to_port":1},{"from":"warp_1","from_port":0,"to":"blend_0","to_port":1},{"from":"combine_0","from_port":0,"to":"export_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"combine_0","to_port":1},{"from":"blend_0","from_port":0,"to":"colorize_2","to_port":0},{"from":"blend_0","from_port":0,"to":"combine_0","to_port":0},{"from":"colorize_2","from_port":0,"to":"Material","to_port":0}],"nodes":[{"name":"perlin_2","node_position":{"x":-312,"y":2.5},"parameters":{"iterations":6,"persistence":1,"scale_x":32,"scale_y":4},"type":"perlin"},{"name":"perlin_1","node_position":{"x":-400,"y":359.5},"parameters":{"iterations":3,"persistence":0.5,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"perlin_0","node_position":{"x":-393,"y":203.5},"parameters":{"iterations":3,"persistence":0.5,"scale_x":32,"scale_y":4},"type":"perlin"},{"name":"warp_0","node_position":{"x":-180,"y":317.5},"parameters":{"amount":0.3},"type":"warp"},{"name":"colorize_1","node_position":{"x":-194,"y":466.5},"parameters":{"gradient":{"points":[{"a":1,"b":0.432292,"g":0.432292,"pos":0,"r":0.432292},{"a":1,"b":0,"g":0,"pos":0.345455,"r":0}],"type":"Gradient"}},"type":"colorize"},{"name":"warp_1","node_position":{"x":-31,"y":336.5},"parameters":{"amount":0.1},"type":"warp"},{"name":"voronoi_0","node_position":{"x":-381,"y":505.5},"parameters":{"intensity":1,"scale_x":5,"scale_y":4},"type":"voronoi"},{"name":"blend_0","node_position":{"x":83,"y":245.5},"parameters":{"amount":1,"blend_type":2},"type":"blend"},{"name":"combine_0","node_position":{"x":515.35144,"y":-15.818176},"parameters":{},"type":"combine"},{"name":"export_0","node_position":{"x":656.35144,"y":-20.818176},"parameters":{"resolution":1},"suffix":"mr","type":"export"},{"name":"Material","node_position":{"x":544,"y":79},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"colorize_2","node_position":{"x":305.35144,"y":76.181824},"parameters":{"gradient":{"points":[{"a":1,"b":0.071126,"g":0.34877,"pos":0,"r":0.59375},{"a":1,"b":0.013021,"g":0.144043,"pos":1,"r":0.3125}],"type":"Gradient"}},"type":"colorize"},{"name":"normal_map_0","node_position":{"x":319,"y":265.5},"parameters":{"amount":0.1,"size":5},"type":"normal_map"},{"name":"colorize_0","node_position":{"x":313,"y":176.5},"parameters":{"gradient":{"points":[{"a":1,"b":0.53125,"g":0.53125,"pos":0,"r":0.53125},{"a":1,"b":0.708333,"g":0.708333,"pos":1,"r":0.708333}],"type":"Gradient"}},"type":"colorize"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "warp_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "perlin_1",
|
||||
"from_port": 0,
|
||||
"to": "warp_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "perlin_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "voronoi_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "warp_0",
|
||||
"from_port": 0,
|
||||
"to": "warp_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_1",
|
||||
"from_port": 0,
|
||||
"to": "warp_1",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "warp_1",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "combine_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "combine_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "475",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "perlin_2",
|
||||
"node_position": {
|
||||
"x": -312,
|
||||
"y": 2.5
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 6,
|
||||
"persistence": 1,
|
||||
"scale_x": 32,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "perlin_1",
|
||||
"node_position": {
|
||||
"x": -424,
|
||||
"y": 343.5
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 3,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": -424,
|
||||
"y": 212.5
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 3,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 32,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "warp_0",
|
||||
"node_position": {
|
||||
"x": -180,
|
||||
"y": 317.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.1,
|
||||
"eps": 0.05,
|
||||
"epsilon": 0
|
||||
},
|
||||
"type": "warp"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": -194,
|
||||
"y": 466.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.432292,
|
||||
"g": 0.432292,
|
||||
"pos": 0,
|
||||
"r": 0.432292
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.345455,
|
||||
"r": 0
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "warp_1",
|
||||
"node_position": {
|
||||
"x": -31,
|
||||
"y": 349.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.1,
|
||||
"eps": 0.045,
|
||||
"epsilon": 0
|
||||
},
|
||||
"type": "warp"
|
||||
},
|
||||
{
|
||||
"name": "voronoi_0",
|
||||
"node_position": {
|
||||
"x": -437,
|
||||
"y": 484.5
|
||||
},
|
||||
"parameters": {
|
||||
"intensity": 1,
|
||||
"randomness": 1,
|
||||
"scale_x": 5,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "voronoi"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 83,
|
||||
"y": 245.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 2
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "combine_0",
|
||||
"node_position": {
|
||||
"x": 515.35144,
|
||||
"y": -15.818176
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"name": 0
|
||||
},
|
||||
"type": "combine"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 544,
|
||||
"y": 79
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": 305.35144,
|
||||
"y": 76.181824
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.071126,
|
||||
"g": 0.34877,
|
||||
"pos": 0,
|
||||
"r": 0.59375
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.013021,
|
||||
"g": 0.144043,
|
||||
"pos": 1,
|
||||
"r": 0.3125
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 319,
|
||||
"y": 265.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.1,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 5
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 313,
|
||||
"y": 176.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.53125,
|
||||
"g": 0.53125,
|
||||
"pos": 0,
|
||||
"r": 0.53125
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.708333,
|
||||
"g": 0.708333,
|
||||
"pos": 1,
|
||||
"r": 0.708333
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,489 @@
|
||||
{"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_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},{"from":"perlin_1","from_port":0,"to":"colorize_1","to_port":0},{"from":"combine_0","from_port":0,"to":"export_0","to_port":0},{"from":"uniform_1","from_port":0,"to":"combine_0","to_port":0},{"from":"blend_2","from_port":0,"to":"combine_0","to_port":1},{"from":"colorize_2","from_port":0,"to":"blend_1","to_port":0}],"nodes":[{"name":"Material","node_position":{"x":938,"y":96},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"colorize_3","node_position":{"x":487.633789,"y":65},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0.518182,"r":0},{"a":1,"b":1,"g":1,"pos":0.709091,"r":1}],"type":"Gradient"}},"type":"colorize"},{"name":"bricks_0","node_position":{"x":-1,"y":30.5},"parameters":{"bevel":0.007813,"columns":5,"mortar":0.007813,"pattern":0,"repeat":1,"row_offset":0.5,"rows":1},"type":"bricks"},{"name":"colorize_0","node_position":{"x":472,"y":-41.5},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0.336914,"pos":0,"r":0.598958},{"a":1,"b":0,"g":0.454102,"pos":0.118182,"r":0.807292},{"a":1,"b":0,"g":0.37793,"pos":0.245455,"r":0.671875},{"a":1,"b":0,"g":0.427734,"pos":0.345455,"r":0.760417},{"a":1,"b":0.017795,"g":0.488254,"pos":0.527273,"r":0.854167},{"a":1,"b":0,"g":0.37793,"pos":0.645455,"r":0.671875},{"a":1,"b":0,"g":0.439453,"pos":0.845455,"r":0.78125},{"a":1,"b":0,"g":0.357422,"pos":1,"r":0.635417}],"type":"Gradient"}},"type":"colorize"},{"name":"perlin_1","node_position":{"x":110.633789,"y":-143.5},"parameters":{"iterations":7,"persistence":0.55,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"blend_2","node_position":{"x":690.633789,"y":201.5},"parameters":{"amount":0.4,"blend_type":0},"type":"blend"},{"name":"perlin_2","node_position":{"x":232.633789,"y":40},"parameters":{"iterations":6,"persistence":0.65,"scale_x":4,"scale_y":4},"type":"perlin"},{"name":"normal_map_0","node_position":{"x":724.633789,"y":345.5},"parameters":{"amount":0.15,"size":4},"type":"normal_map"},{"name":"blend_1","node_position":{"x":707.633789,"y":-68},"parameters":{"amount":0.5,"blend_type":0},"type":"blend"},{"name":"blend_0","node_position":{"x":271,"y":306.5},"parameters":{"amount":1,"blend_type":2},"type":"blend"},{"name":"colorize_5","node_position":{"x":503,"y":336.5},"parameters":{"gradient":{"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":"uniform_1","node_position":{"x":753,"y":116},"parameters":{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"}},"type":"uniform"},{"name":"uniform_0","node_position":{"x":540,"y":234},"parameters":{"color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"}},"type":"uniform"},{"name":"colorize_2","node_position":{"x":454.633789,"y":-189.5},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0,"r":0.515625},{"a":1,"b":0,"g":0,"pos":0.145455,"r":0.25},{"a":1,"b":0,"g":0,"pos":0.445455,"r":0.515625},{"a":1,"b":0.013184,"g":0.013184,"pos":0.745455,"r":0.28125},{"a":1,"b":0,"g":0,"pos":1,"r":0.322917}],"type":"Gradient"}},"type":"colorize"},{"name":"colorize_1","node_position":{"x":461.329102,"y":-116.699997},"parameters":{"gradient":{"points":[{"a":1,"b":0.034912,"g":0.129532,"pos":0,"r":0.203125},{"a":1,"b":0.038791,"g":0.074319,"pos":1,"r":0.114583}],"type":"Gradient"}},"type":"colorize"},{"name":"export_0","node_position":{"x":1090.329102,"y":-76.5},"parameters":{"resolution":1},"suffix":"mr","type":"export"},{"name":"combine_0","node_position":{"x":942.329102,"y":-55.5},"parameters":{},"type":"combine"},{"name":"perlin_0","node_position":{"x":12,"y":243.5},"parameters":{"iterations":6,"persistence":0.7,"scale_x":20,"scale_y":3},"type":"perlin"}]}
|
||||
{
|
||||
"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_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": "uniform_1",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "uniform_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_2",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "perlin_1",
|
||||
"from_port": 0,
|
||||
"to": "colorize_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "uniform_1",
|
||||
"from_port": 0,
|
||||
"to": "combine_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_2",
|
||||
"from_port": 0,
|
||||
"to": "combine_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
"to": "blend_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "505",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 938,
|
||||
"y": 96
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "colorize_3",
|
||||
"node_position": {
|
||||
"x": 487.633789,
|
||||
"y": 65
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.5,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.672727,
|
||||
"r": 1
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "bricks_0",
|
||||
"node_position": {
|
||||
"x": -21,
|
||||
"y": 70.5
|
||||
},
|
||||
"parameters": {
|
||||
"bevel": 0.007813,
|
||||
"columns": 5,
|
||||
"mortar": 0.025469,
|
||||
"pattern": 0,
|
||||
"repeat": 1,
|
||||
"row_offset": 0.5,
|
||||
"rows": 1
|
||||
},
|
||||
"type": "bricks"
|
||||
},
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 472,
|
||||
"y": -41.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.336914,
|
||||
"pos": 0,
|
||||
"r": 0.598958
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.454102,
|
||||
"pos": 0.118182,
|
||||
"r": 0.807292
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.37793,
|
||||
"pos": 0.245455,
|
||||
"r": 0.671875
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.427734,
|
||||
"pos": 0.345455,
|
||||
"r": 0.760417
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.017795,
|
||||
"g": 0.488254,
|
||||
"pos": 0.527273,
|
||||
"r": 0.854167
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.37793,
|
||||
"pos": 0.645455,
|
||||
"r": 0.671875
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.439453,
|
||||
"pos": 0.845455,
|
||||
"r": 0.78125
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0.357422,
|
||||
"pos": 1,
|
||||
"r": 0.635417
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "perlin_1",
|
||||
"node_position": {
|
||||
"x": 110.633789,
|
||||
"y": -143.5
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 7,
|
||||
"persistence": 0.55,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "blend_2",
|
||||
"node_position": {
|
||||
"x": 690.633789,
|
||||
"y": 201.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.4,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "perlin_2",
|
||||
"node_position": {
|
||||
"x": 232.633789,
|
||||
"y": 40
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 6,
|
||||
"persistence": 0.65,
|
||||
"scale_x": 4,
|
||||
"scale_y": 4
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 724.633789,
|
||||
"y": 345.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.15,
|
||||
"param0": 11,
|
||||
"param1": 0.99,
|
||||
"size": 4
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "blend_1",
|
||||
"node_position": {
|
||||
"x": 707.633789,
|
||||
"y": -68
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 222,
|
||||
"y": 265.5
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 1,
|
||||
"blend_type": 2
|
||||
},
|
||||
"type": "blend"
|
||||
},
|
||||
{
|
||||
"name": "uniform_1",
|
||||
"node_position": {
|
||||
"x": 753,
|
||||
"y": 116
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"r": 0,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "uniform_0",
|
||||
"node_position": {
|
||||
"x": 540,
|
||||
"y": 234
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "colorize_2",
|
||||
"node_position": {
|
||||
"x": 454.633789,
|
||||
"y": -189.5
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0.515625
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.145455,
|
||||
"r": 0.25
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0.445455,
|
||||
"r": 0.515625
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.013184,
|
||||
"g": 0.013184,
|
||||
"pos": 0.745455,
|
||||
"r": 0.28125
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 1,
|
||||
"r": 0.322917
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "colorize_1",
|
||||
"node_position": {
|
||||
"x": 461.329102,
|
||||
"y": -116.699997
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.034912,
|
||||
"g": 0.129532,
|
||||
"pos": 0,
|
||||
"r": 0.203125
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.038791,
|
||||
"g": 0.074319,
|
||||
"pos": 1,
|
||||
"r": 0.114583
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "combine_0",
|
||||
"node_position": {
|
||||
"x": 942.329102,
|
||||
"y": -55.5
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"name": 0
|
||||
},
|
||||
"type": "combine"
|
||||
},
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": -20,
|
||||
"y": 279.5
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 6,
|
||||
"persistence": 0.7,
|
||||
"scale_x": 20,
|
||||
"scale_y": 3
|
||||
},
|
||||
"type": "perlin"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
@ -1 +1,273 @@
|
||||
{"connections":[{"from":"bricks_0","from_port":0,"to":"colorize_0","to_port":0},{"from":"colorize_0","from_port":0,"to":"blend_0","to_port":0},{"from":"blend_0","from_port":0,"to":"Material","to_port":0},{"from":"blend_0","from_port":0,"to":"colorize_1","to_port":0},{"from":"colorize_1","from_port":0,"to":"normal_map_0","to_port":0},{"from":"normal_map_0","from_port":0,"to":"Material","to_port":4},{"from":"blend_0","from_port":0,"to":"Material","to_port":2},{"from":"uniform_0","from_port":0,"to":"Material","to_port":1},{"from":"uniform_0","from_port":0,"to":"combine_0","to_port":0},{"from":"blend_0","from_port":0,"to":"combine_0","to_port":1},{"from":"combine_0","from_port":0,"to":"export_0","to_port":0},{"from":"transform_1","from_port":0,"to":"blend_0","to_port":1},{"from":"perlin_0","from_port":0,"to":"transform_1","to_port":0},{"from":"bricks_0","from_port":1,"to":"decompose_0","to_port":0},{"from":"decompose_0","from_port":0,"to":"transform_1","to_port":1},{"from":"decompose_0","from_port":1,"to":"transform_1","to_port":2}],"nodes":[{"name":"colorize_0","node_position":{"x":524,"y":-100.75},"parameters":{"gradient":{"points":[{"a":1,"b":0,"g":0,"pos":0,"r":0},{"a":1,"b":0.213623,"g":0.391325,"pos":0.145455,"r":0.651042}],"type":"Gradient"}},"type":"colorize"},{"name":"normal_map_0","node_position":{"x":740,"y":135.25},"parameters":{"amount":0.3,"size":4},"type":"normal_map"},{"name":"colorize_1","node_position":{"x":710,"y":208.25},"parameters":{"gradient":{"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":"uniform_0","node_position":{"x":718,"y":73},"parameters":{"color":{"a":1,"b":0,"g":0,"r":0,"type":"Color"}},"type":"uniform"},{"name":"Material","node_position":{"x":930,"y":38},"parameters":{"albedo_color":{"a":1,"b":1,"g":1,"r":1,"type":"Color"},"ao_light_affect":1,"depth_scale":1,"emission_energy":1,"metallic":1,"normal_scale":1,"resolution":1,"roughness":1},"type":"material"},{"name":"combine_0","node_position":{"x":866,"y":-78},"parameters":{},"type":"combine"},{"name":"export_0","node_position":{"x":1053,"y":-62},"parameters":{"resolution":1},"suffix":"mr","type":"export"},{"name":"perlin_0","node_position":{"x":69,"y":81.25},"parameters":{"iterations":6,"persistence":0.75,"scale_x":4,"scale_y":20},"type":"perlin"},{"name":"decompose_0","node_position":{"x":97,"y":236},"parameters":{},"type":"decompose"},{"name":"bricks_0","node_position":{"x":79,"y":-124.75},"parameters":{"bevel":0,"columns":1,"mortar":0.02,"pattern":0,"repeat":1,"row_offset":0.5,"rows":10},"type":"bricks"},{"name":"transform_1","node_position":{"x":290,"y":120},"parameters":{"repeat":true,"rotate":0,"scale_x":1,"scale_y":1,"translate_x":1,"translate_y":1},"type":"transform"},{"name":"blend_0","node_position":{"x":535,"y":2.25},"parameters":{"amount":0.5,"blend_type":0},"type":"blend"}]}
|
||||
{
|
||||
"connections": [
|
||||
{
|
||||
"from": "bricks_0",
|
||||
"from_port": 0,
|
||||
"to": "colorize_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize_0",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "uniform_0",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "uniform_0",
|
||||
"from_port": 0,
|
||||
"to": "combine_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "combine_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "transform_1",
|
||||
"from_port": 0,
|
||||
"to": "blend_0",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "perlin_0",
|
||||
"from_port": 0,
|
||||
"to": "transform_1",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "bricks_0",
|
||||
"from_port": 1,
|
||||
"to": "decompose_0",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "decompose_0",
|
||||
"from_port": 0,
|
||||
"to": "transform_1",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "decompose_0",
|
||||
"from_port": 1,
|
||||
"to": "transform_1",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "blend_0",
|
||||
"from_port": 0,
|
||||
"to": "normal_map_0",
|
||||
"to_port": 0
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
"name": "490",
|
||||
"node_position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"name": "colorize_0",
|
||||
"node_position": {
|
||||
"x": 524,
|
||||
"y": -100.75
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.213623,
|
||||
"g": 0.391325,
|
||||
"pos": 0.145455,
|
||||
"r": 0.651042
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "normal_map_0",
|
||||
"node_position": {
|
||||
"x": 740,
|
||||
"y": 135.25
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.3,
|
||||
"param0": 11,
|
||||
"param1": 0.2,
|
||||
"size": 4
|
||||
},
|
||||
"type": "normal_map"
|
||||
},
|
||||
{
|
||||
"name": "uniform_0",
|
||||
"node_position": {
|
||||
"x": 781,
|
||||
"y": 58
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"r": 0,
|
||||
"type": "Color"
|
||||
}
|
||||
},
|
||||
"type": "uniform"
|
||||
},
|
||||
{
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": 992,
|
||||
"y": 42
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"ao_light_affect": 1,
|
||||
"depth_scale": 1,
|
||||
"emission_energy": 1,
|
||||
"metallic": 1,
|
||||
"normal_scale": 1,
|
||||
"resolution": 1,
|
||||
"roughness": 1,
|
||||
"size": 11
|
||||
},
|
||||
"type": "material"
|
||||
},
|
||||
{
|
||||
"name": "combine_0",
|
||||
"node_position": {
|
||||
"x": 866,
|
||||
"y": -78
|
||||
},
|
||||
"parameters": {
|
||||
"color": {
|
||||
"a": 1,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1,
|
||||
"type": "Color"
|
||||
},
|
||||
"name": 0
|
||||
},
|
||||
"type": "combine"
|
||||
},
|
||||
{
|
||||
"name": "perlin_0",
|
||||
"node_position": {
|
||||
"x": 69,
|
||||
"y": 81.25
|
||||
},
|
||||
"parameters": {
|
||||
"iterations": 6,
|
||||
"persistence": 0.75,
|
||||
"scale_x": 4,
|
||||
"scale_y": 20
|
||||
},
|
||||
"type": "perlin"
|
||||
},
|
||||
{
|
||||
"name": "decompose_0",
|
||||
"node_position": {
|
||||
"x": 97,
|
||||
"y": 236
|
||||
},
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "decompose"
|
||||
},
|
||||
{
|
||||
"name": "bricks_0",
|
||||
"node_position": {
|
||||
"x": 79,
|
||||
"y": -124.75
|
||||
},
|
||||
"parameters": {
|
||||
"bevel": 0,
|
||||
"columns": 1,
|
||||
"mortar": 0.02,
|
||||
"pattern": 0,
|
||||
"repeat": 1,
|
||||
"row_offset": 0.5,
|
||||
"rows": 10
|
||||
},
|
||||
"type": "bricks"
|
||||
},
|
||||
{
|
||||
"name": "transform_1",
|
||||
"node_position": {
|
||||
"x": 290,
|
||||
"y": 120
|
||||
},
|
||||
"parameters": {
|
||||
"repeat": true,
|
||||
"rotate": 0,
|
||||
"scale_x": 1,
|
||||
"scale_y": 1,
|
||||
"translate_x": 1,
|
||||
"translate_y": 1
|
||||
},
|
||||
"type": "transform"
|
||||
},
|
||||
{
|
||||
"name": "blend_0",
|
||||
"node_position": {
|
||||
"x": 492,
|
||||
"y": -13.75
|
||||
},
|
||||
"parameters": {
|
||||
"amount": 0.554688,
|
||||
"blend_type": 0
|
||||
},
|
||||
"type": "blend"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"type": "graph"
|
||||
}
|
BIN
addons/material_maker/fonts/hack.ttf
Normal file
@ -1,76 +1,81 @@
|
||||
tool
|
||||
extends GraphEdit
|
||||
class_name MMGraphEdit
|
||||
|
||||
var editor_interface = null
|
||||
var node_factory = null
|
||||
var renderer = null
|
||||
|
||||
var save_path = null
|
||||
var save_path = null setget set_save_path
|
||||
var need_save = false
|
||||
|
||||
var top_generator = null
|
||||
var generator = null
|
||||
|
||||
onready var timer : Timer = $Timer
|
||||
|
||||
onready var subgraph_ui : HBoxContainer = $GraphUI/SubGraphUI
|
||||
onready var button_transmits_seed : Button = $GraphUI/SubGraphUI/ButtonTransmitsSeed
|
||||
|
||||
signal save_path_changed
|
||||
signal graph_changed
|
||||
|
||||
func _ready():
|
||||
func _ready() -> void:
|
||||
OS.low_processor_usage_mode = true
|
||||
center_view()
|
||||
|
||||
func _gui_input(event):
|
||||
func _gui_input(event) -> void:
|
||||
if event is InputEventKey and event.pressed:
|
||||
var scancode_with_modifiers = event.get_scancode_with_modifiers()
|
||||
if scancode_with_modifiers == KEY_C:
|
||||
center_view()
|
||||
elif scancode_with_modifiers == KEY_DELETE:
|
||||
if scancode_with_modifiers == KEY_DELETE || scancode_with_modifiers == KEY_BACKSPACE:
|
||||
remove_selection()
|
||||
|
||||
# Misc. useful functions
|
||||
|
||||
func get_source(node, port):
|
||||
for c in get_connection_list():
|
||||
if c.to == node && c.to_port == port:
|
||||
if c.to == node and c.to_port == port:
|
||||
return { node=c.from, slot=c.from_port }
|
||||
|
||||
func offset_from_global_position(global_position):
|
||||
func offset_from_global_position(global_position) -> Vector2:
|
||||
return (scroll_offset + global_position - rect_global_position) / zoom
|
||||
|
||||
func add_node(node):
|
||||
func add_node(node) -> void:
|
||||
add_child(node)
|
||||
node.connect("close_request", self, "remove_node", [ node ])
|
||||
|
||||
func connect_node(from, from_slot, to, to_slot):
|
||||
var source_list = [ from ]
|
||||
# Check if the new connection creates a cycle in the graph
|
||||
while !source_list.empty():
|
||||
var source = source_list.pop_front()
|
||||
if source == to:
|
||||
#print("cannot connect %s to %s (%s)" % [from, to, source])
|
||||
return false
|
||||
if generator.connect_children(get_node(from).generator, from_slot, get_node(to).generator, to_slot):
|
||||
var disconnect = get_source(to, to_slot)
|
||||
if disconnect != null:
|
||||
.disconnect_node(disconnect.node, disconnect.slot, to, to_slot)
|
||||
.connect_node(from, from_slot, to, to_slot)
|
||||
send_changed_signal()
|
||||
|
||||
func disconnect_node(from, from_slot, to, to_slot) -> void:
|
||||
if generator.disconnect_children(get_node(from).generator, from_slot, get_node(to).generator, to_slot):
|
||||
.disconnect_node(from, from_slot, to, to_slot)
|
||||
send_changed_signal()
|
||||
|
||||
func on_connections_changed(removed_connections : Array, added_connections : Array) -> void:
|
||||
for c in removed_connections:
|
||||
.disconnect_node("node_"+c.from, c.from_port, "node_"+c.to, c.to_port)
|
||||
for c in added_connections:
|
||||
.connect_node("node_"+c.from, c.from_port, "node_"+c.to, c.to_port)
|
||||
|
||||
func remove_node(node) -> void:
|
||||
if generator.remove_generator(node.generator):
|
||||
var node_name = node.name
|
||||
for c in get_connection_list():
|
||||
if c.to == source and source_list.find(c.from) == -1:
|
||||
source_list.append(c.from)
|
||||
var disconnect = get_source(to, to_slot)
|
||||
if disconnect != null:
|
||||
.disconnect_node(disconnect.node, disconnect.slot, to, to_slot)
|
||||
.connect_node(from, from_slot, to, to_slot)
|
||||
send_changed_signal()
|
||||
return true
|
||||
|
||||
func disconnect_node(from, from_slot, to, to_slot):
|
||||
.disconnect_node(from, from_slot, to, to_slot)
|
||||
send_changed_signal();
|
||||
|
||||
func remove_node(node):
|
||||
var node_name = node.name
|
||||
for c in get_connection_list():
|
||||
if c.from == node_name or c.to == node_name:
|
||||
disconnect_node(c.from, c.from_port, c.to, c.to_port)
|
||||
send_changed_signal()
|
||||
node.queue_free()
|
||||
if c.from == node_name or c.to == node_name:
|
||||
disconnect_node(c.from, c.from_port, c.to, c.to_port)
|
||||
node.queue_free()
|
||||
send_changed_signal()
|
||||
|
||||
# Global operations on graph
|
||||
|
||||
func update_tab_title():
|
||||
func update_tab_title() -> void:
|
||||
if !get_parent().has_method("set_tab_title"):
|
||||
print("no set_tab_title method")
|
||||
return
|
||||
var title = "[unnamed]"
|
||||
if save_path != null:
|
||||
@ -80,182 +85,27 @@ func update_tab_title():
|
||||
if get_parent().has_method("set_tab_title"):
|
||||
get_parent().set_tab_title(get_index(), title)
|
||||
|
||||
func set_need_save(ns):
|
||||
func set_need_save(ns) -> void:
|
||||
if ns != need_save:
|
||||
need_save = ns
|
||||
update_tab_title()
|
||||
|
||||
func set_save_path(path):
|
||||
func set_save_path(path) -> void:
|
||||
if path != save_path:
|
||||
save_path = path
|
||||
update_tab_title()
|
||||
emit_signal("save_path_changed", self, path)
|
||||
|
||||
func clear_material():
|
||||
func clear_view() -> void:
|
||||
clear_connections()
|
||||
for c in get_children():
|
||||
if c is GraphNode:
|
||||
remove_child(c)
|
||||
c.free()
|
||||
send_changed_signal()
|
||||
|
||||
func new_material():
|
||||
clear_material()
|
||||
create_nodes({name="Material", type="material"})
|
||||
set_save_path(null)
|
||||
center_view()
|
||||
|
||||
func get_free_name(type):
|
||||
var i = 0
|
||||
while true:
|
||||
var node_name = type+"_"+str(i)
|
||||
if !has_node(node_name):
|
||||
return node_name
|
||||
i += 1
|
||||
|
||||
func create_nodes(data, position = null):
|
||||
if data == null:
|
||||
return
|
||||
if data.has("type"):
|
||||
var node = node_factory.create_node(data.type)
|
||||
if node != null:
|
||||
if data.has("name") && !has_node(data.name):
|
||||
node.name = data.name
|
||||
else:
|
||||
node.name = get_free_name(data.type)
|
||||
add_node(node)
|
||||
node.deserialize(data)
|
||||
if position != null:
|
||||
node.offset += position
|
||||
send_changed_signal()
|
||||
return node
|
||||
else:
|
||||
if typeof(data.nodes) == TYPE_ARRAY and typeof(data.connections) == TYPE_ARRAY:
|
||||
var names = {}
|
||||
for c in data.nodes:
|
||||
var node = create_nodes(c, position)
|
||||
if node != null:
|
||||
names[c.name] = node.name
|
||||
node.selected = true
|
||||
for c in data.connections:
|
||||
connect_node(names[c.from], c.from_port, "Material" if c.to == "Material" else names[c.to], c.to_port)
|
||||
return null
|
||||
|
||||
func load_file():
|
||||
var dialog = FileDialog.new()
|
||||
add_child(dialog)
|
||||
dialog.rect_min_size = Vector2(500, 500)
|
||||
dialog.access = FileDialog.ACCESS_FILESYSTEM
|
||||
dialog.mode = FileDialog.MODE_OPEN_FILE
|
||||
dialog.add_filter("*.ptex;Procedural textures file")
|
||||
dialog.connect("file_selected", self, "do_load_file")
|
||||
dialog.popup_centered()
|
||||
|
||||
func do_load_file(filename):
|
||||
var file = File.new()
|
||||
if file.open(filename, File.READ) != OK:
|
||||
return
|
||||
var data = parse_json(file.get_as_text())
|
||||
file.close()
|
||||
clear_material()
|
||||
for n in data.nodes:
|
||||
var node = create_nodes(n)
|
||||
for c in data.connections:
|
||||
connect_node(c.from, c.from_port, c.to, c.to_port)
|
||||
set_save_path(filename)
|
||||
set_need_save(false)
|
||||
center_view()
|
||||
|
||||
func save_file():
|
||||
if save_path != null:
|
||||
do_save_file(save_path)
|
||||
else:
|
||||
save_file_as()
|
||||
|
||||
func save_file_as():
|
||||
var dialog = FileDialog.new()
|
||||
add_child(dialog)
|
||||
dialog.rect_min_size = Vector2(500, 500)
|
||||
dialog.access = FileDialog.ACCESS_FILESYSTEM
|
||||
dialog.mode = FileDialog.MODE_SAVE_FILE
|
||||
dialog.add_filter("*.ptex;Procedural textures file")
|
||||
dialog.connect("file_selected", self, "do_save_file")
|
||||
dialog.popup_centered()
|
||||
|
||||
func do_save_file(filename):
|
||||
var data = { nodes = [] }
|
||||
for c in get_children():
|
||||
if c is GraphNode:
|
||||
data.nodes.append(c.serialize())
|
||||
data.connections = get_connection_list()
|
||||
var file = File.new()
|
||||
if file.open(filename, File.WRITE) == OK:
|
||||
file.store_string(to_json(data))
|
||||
file.close()
|
||||
set_save_path(filename)
|
||||
set_need_save(false)
|
||||
|
||||
func export_textures(size = null):
|
||||
if save_path != null:
|
||||
var prefix = save_path.left(save_path.rfind("."))
|
||||
for c in get_children():
|
||||
if c is GraphNode && c.has_method("export_textures"):
|
||||
c.export_textures(prefix, size)
|
||||
|
||||
# Cut / copy / paste
|
||||
|
||||
func remove_selection():
|
||||
for c in get_children():
|
||||
if c is GraphNode and c.selected && c.name != "Material":
|
||||
remove_node(c)
|
||||
|
||||
func serialize_selection():
|
||||
var data = { nodes = [], connections = [] }
|
||||
var nodes = []
|
||||
for c in get_children():
|
||||
if c is GraphNode and c.selected && c.name != "Material":
|
||||
nodes.append(c)
|
||||
if nodes.empty():
|
||||
return null
|
||||
var center = Vector2(0, 0)
|
||||
for n in nodes:
|
||||
center += n.offset+0.5*n.rect_size
|
||||
center /= nodes.size()
|
||||
for n in nodes:
|
||||
var s = n.serialize()
|
||||
var p = n.offset-center
|
||||
s.node_position = { x=p.x, y=p.y }
|
||||
data.nodes.append(s)
|
||||
for c in get_connection_list():
|
||||
var from = get_node(c.from)
|
||||
var to = get_node(c.to)
|
||||
if from != null and from.selected and to != null and to.selected:
|
||||
data.connections.append(c)
|
||||
return data
|
||||
|
||||
func can_copy():
|
||||
for c in get_children():
|
||||
if c is GraphNode and c.selected && c.name != "Material":
|
||||
return true
|
||||
return false
|
||||
|
||||
func cut():
|
||||
copy()
|
||||
remove_selection()
|
||||
|
||||
func copy():
|
||||
OS.clipboard = to_json(serialize_selection())
|
||||
|
||||
func paste(pos = Vector2(0, 0)):
|
||||
for c in get_children():
|
||||
if c is GraphNode:
|
||||
c.selected = false
|
||||
var data = parse_json(OS.clipboard)
|
||||
create_nodes(data, scroll_offset+0.5*rect_size)
|
||||
|
||||
# Center view
|
||||
|
||||
func center_view():
|
||||
func center_view() -> void:
|
||||
var center = Vector2(0, 0)
|
||||
var node_count = 0
|
||||
for c in get_children():
|
||||
@ -266,23 +116,224 @@ func center_view():
|
||||
center /= node_count
|
||||
scroll_offset = center - 0.5*rect_size
|
||||
|
||||
func update_view(g) -> void:
|
||||
if generator != null:
|
||||
generator.disconnect("connections_changed", self, "on_connections_changed")
|
||||
clear_view()
|
||||
generator = g
|
||||
if generator != null:
|
||||
generator.connect("connections_changed", self, "on_connections_changed")
|
||||
update_graph(generator.get_children(), generator.connections)
|
||||
subgraph_ui.visible = generator != top_generator
|
||||
subgraph_ui.get_node("Label").text = generator.label
|
||||
center_view()
|
||||
if generator.get_parent() is MMGenGraph:
|
||||
button_transmits_seed.visible = true
|
||||
button_transmits_seed.pressed = generator.transmits_seed
|
||||
else:
|
||||
button_transmits_seed.visible = false
|
||||
|
||||
|
||||
func clear_material() -> void:
|
||||
if top_generator != null:
|
||||
remove_child(top_generator)
|
||||
top_generator.free()
|
||||
top_generator = null
|
||||
generator = null
|
||||
send_changed_signal()
|
||||
|
||||
func update_graph(generators, connections) -> Array:
|
||||
var rv = []
|
||||
for g in generators:
|
||||
var node = node_factory.create_node(g.get_type())
|
||||
if node != null:
|
||||
node.name = "node_"+g.name
|
||||
add_node(node)
|
||||
node.generator = g
|
||||
node.offset = g.position
|
||||
rv.push_back(node)
|
||||
for c in connections:
|
||||
.connect_node("node_"+c.from, c.from_port, "node_"+c.to, c.to_port)
|
||||
return rv
|
||||
|
||||
func new_material() -> void:
|
||||
clear_material()
|
||||
var loader = MMGenLoader.new()
|
||||
top_generator = loader.create_gen({nodes=[{name="Material", type="material","parameters":{"size":11}}], connections=[]})
|
||||
if top_generator != null:
|
||||
add_child(top_generator)
|
||||
update_view(top_generator)
|
||||
set_save_path(null)
|
||||
set_need_save(false)
|
||||
center_view()
|
||||
|
||||
func get_free_name(type):
|
||||
var i = 0
|
||||
while true:
|
||||
var node_name = type+"_"+str(i)
|
||||
if !has_node(node_name):
|
||||
return node_name
|
||||
i += 1
|
||||
|
||||
func create_nodes(data, position : Vector2 = Vector2(0, 0)):
|
||||
if data == null:
|
||||
return
|
||||
if data.has("type"):
|
||||
data = { nodes=[data], connections=[] }
|
||||
if typeof(data.nodes) == TYPE_ARRAY and typeof(data.connections) == TYPE_ARRAY:
|
||||
var new_stuff = MMGenLoader.add_to_gen_graph(generator, data.nodes, data.connections)
|
||||
for g in new_stuff.generators:
|
||||
g.position += position
|
||||
return update_graph(new_stuff.generators, new_stuff.connections)
|
||||
return []
|
||||
|
||||
func create_gen_from_type(gen_name) -> void:
|
||||
create_nodes({ type=gen_name, parameters={} }, scroll_offset+0.5*rect_size)
|
||||
|
||||
func load_file(filename) -> void:
|
||||
clear_material()
|
||||
top_generator = MMGenLoader.load_gen(filename)
|
||||
if top_generator != null:
|
||||
add_child(top_generator)
|
||||
update_view(top_generator)
|
||||
set_save_path(filename)
|
||||
set_need_save(false)
|
||||
center_view()
|
||||
|
||||
func save_file(filename) -> void:
|
||||
var data = top_generator.serialize()
|
||||
var file = File.new()
|
||||
if file.open(filename, File.WRITE) == OK:
|
||||
file.store_string(JSON.print(data, "\t", true))
|
||||
file.close()
|
||||
set_save_path(filename)
|
||||
set_need_save(false)
|
||||
|
||||
func export_textures() -> void:
|
||||
if save_path != null:
|
||||
var prefix = save_path.left(save_path.rfind("."))
|
||||
for c in get_children():
|
||||
if c is GraphNode:
|
||||
if c.generator.has_method("render_textures"):
|
||||
c.generator.render_textures()
|
||||
if c.generator.has_method("export_textures"):
|
||||
c.generator.export_textures(prefix, editor_interface)
|
||||
|
||||
# Cut / copy / paste
|
||||
|
||||
func get_selected_nodes() -> Array:
|
||||
var selected_nodes = []
|
||||
for n in get_children():
|
||||
if n is GraphNode and n.selected:
|
||||
selected_nodes.append(n)
|
||||
return selected_nodes
|
||||
|
||||
func remove_selection() -> void:
|
||||
for c in get_children():
|
||||
if c is GraphNode and c.selected and c.name != "Material":
|
||||
remove_node(c)
|
||||
|
||||
# Maybe move this to gen_graph...
|
||||
func serialize_selection() -> Dictionary:
|
||||
var data = { nodes = [], connections = [] }
|
||||
var nodes = []
|
||||
for c in get_children():
|
||||
if c is GraphNode and c.selected and c.name != "Material":
|
||||
nodes.append(c)
|
||||
if nodes.empty():
|
||||
return {}
|
||||
var center = Vector2(0, 0)
|
||||
for n in nodes:
|
||||
center += n.offset+0.5*n.rect_size
|
||||
center /= nodes.size()
|
||||
for n in nodes:
|
||||
var s = n.generator.serialize()
|
||||
var p = n.offset-center
|
||||
s.node_position = { x=p.x, y=p.y }
|
||||
data.nodes.append(s)
|
||||
for c in get_connection_list():
|
||||
var from = get_node(c.from)
|
||||
var to = get_node(c.to)
|
||||
if from != null and from.selected and to != null and to.selected:
|
||||
var connection = c.duplicate(true)
|
||||
connection.from = from.generator.name
|
||||
connection.to = to.generator.name
|
||||
data.connections.append(connection)
|
||||
return data
|
||||
|
||||
func can_copy() -> bool:
|
||||
for c in get_children():
|
||||
if c is GraphNode and c.selected and c.name != "Material":
|
||||
return true
|
||||
return false
|
||||
|
||||
func cut() -> void:
|
||||
copy()
|
||||
remove_selection()
|
||||
|
||||
func copy() -> void:
|
||||
OS.clipboard = to_json(serialize_selection())
|
||||
|
||||
func paste(pos = Vector2(0, 0)) -> void:
|
||||
for c in get_children():
|
||||
if c is GraphNode:
|
||||
c.selected = false
|
||||
var data = parse_json(OS.clipboard)
|
||||
var new_nodes = create_nodes(data, scroll_offset+0.5*rect_size)
|
||||
if new_nodes != null:
|
||||
for c in new_nodes:
|
||||
c.selected = true
|
||||
|
||||
# Delay after graph update
|
||||
|
||||
func send_changed_signal():
|
||||
func send_changed_signal() -> void:
|
||||
set_need_save(true)
|
||||
$Timer.start()
|
||||
timer.stop()
|
||||
timer.start(0.2)
|
||||
|
||||
func do_send_changed_signal():
|
||||
func do_send_changed_signal() -> void:
|
||||
emit_signal("graph_changed")
|
||||
|
||||
# Drag and drop
|
||||
|
||||
func can_drop_data(position, data):
|
||||
func can_drop_data(position, data) -> bool:
|
||||
return typeof(data) == TYPE_DICTIONARY and (data.has('type') or (data.has('nodes') and data.has('connections')))
|
||||
|
||||
func drop_data(position, data):
|
||||
func drop_data(position, data) -> void:
|
||||
# The following mitigates the SpinBox problem (captures mouse while dragging)
|
||||
if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
create_nodes(data, offset_from_global_position(get_global_transform().xform(position)))
|
||||
return true
|
||||
|
||||
func on_ButtonUp_pressed() -> void:
|
||||
if generator != top_generator && generator.get_parent() is MMGenGraph:
|
||||
call_deferred("update_view", generator.get_parent())
|
||||
|
||||
func _on_Label_text_changed(new_text) -> void:
|
||||
generator.label = new_text
|
||||
|
||||
# Create subgraph
|
||||
|
||||
func create_subgraph() -> void:
|
||||
var generators = []
|
||||
for n in get_selected_nodes():
|
||||
generators.push_back(n.generator)
|
||||
generator.create_subgraph(generators)
|
||||
update_view(generator)
|
||||
|
||||
func _on_ButtonShowTree_pressed() -> void:
|
||||
var graph_tree : Popup = preload("res://addons/material_maker/widgets/graph_tree/graph_tree.tscn").instance()
|
||||
graph_tree.init("Top", top_generator)
|
||||
add_child(graph_tree)
|
||||
graph_tree.connect("item_double_clicked", self, "edit_subgraph")
|
||||
graph_tree.popup_centered()
|
||||
|
||||
func edit_subgraph(g : MMGenGraph) -> void:
|
||||
if !g.is_editable():
|
||||
g.toggle_editable()
|
||||
update_view(g)
|
||||
|
||||
|
||||
func _on_ButtonTransmitsSeed_toggled(button_pressed):
|
||||
if button_pressed != generator.transmits_seed:
|
||||
generator.transmits_seed = button_pressed
|
||||
|
@ -1,54 +1,85 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://addons/material_maker/graph_edit.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/material_maker/nodes/material/material.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://addons/material_maker/icons/icons.svg" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="Theme" id=1]
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 0.6, 0.6, 0.6, 0 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
flags = 4
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 64, 32, 16, 16 )
|
||||
|
||||
[node name="GraphEdit" type="GraphEdit" index="0"]
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
flags = 4
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 15.4016, 47.1451, 16.7512, 17.8319 )
|
||||
|
||||
self_modulate = Color( 1, 1, 1, 0 )
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
flags = 4
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 0, 48, 16, 16 )
|
||||
|
||||
[node name="GraphEdit" type="GraphEdit"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = true
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
custom_styles/bg = SubResource( 1 )
|
||||
right_disconnects = true
|
||||
scroll_offset = Vector2( -458.75, -292.25 )
|
||||
snap_distance = 20
|
||||
use_snap = false
|
||||
zoom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Material", "Mouse", "Visibility" ]
|
||||
|
||||
[node name="Material" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
margin_left = 658.75
|
||||
margin_top = 292.25
|
||||
margin_right = 888.75
|
||||
margin_bottom = 512.25
|
||||
theme = SubResource( 1 )
|
||||
offset = Vector2( 200, 0 )
|
||||
_sections_unfolded = [ "Anchor", "Margin", "Mouse", "Theme", "slot", "slot/0", "slot/1", "slot/2", "slot/3", "slot/4", "slot/5" ]
|
||||
|
||||
[node name="Timer" type="Timer" parent="." index="1"]
|
||||
|
||||
process_mode = 1
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
wait_time = 0.2
|
||||
one_shot = true
|
||||
autostart = false
|
||||
|
||||
[node name="GraphUI" type="HBoxContainer" parent="."]
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
margin_left = -592.0
|
||||
margin_right = -16.0
|
||||
margin_bottom = 24.0
|
||||
alignment = 2
|
||||
|
||||
[node name="SubGraphUI" type="HBoxContainer" parent="GraphUI"]
|
||||
margin_left = 330.0
|
||||
margin_right = 544.0
|
||||
margin_bottom = 24.0
|
||||
size_flags_horizontal = 9
|
||||
|
||||
[node name="Label" type="LineEdit" parent="GraphUI/SubGraphUI"]
|
||||
margin_right = 150.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 150, 0 )
|
||||
size_flags_horizontal = 9
|
||||
|
||||
[node name="ButtonTransmitsSeed" type="Button" parent="GraphUI/SubGraphUI"]
|
||||
margin_left = 154.0
|
||||
margin_right = 182.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Affect children seeds"
|
||||
size_flags_horizontal = 9
|
||||
toggle_mode = true
|
||||
icon = SubResource( 2 )
|
||||
|
||||
[node name="ButtonUp" type="Button" parent="GraphUI/SubGraphUI"]
|
||||
margin_left = 186.0
|
||||
margin_right = 214.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Back to parent"
|
||||
size_flags_horizontal = 9
|
||||
icon = SubResource( 3 )
|
||||
|
||||
[node name="ButtonShowTree" type="Button" parent="GraphUI"]
|
||||
margin_left = 548.0
|
||||
margin_right = 576.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Show hierarchy"
|
||||
icon = SubResource( 4 )
|
||||
[connection signal="connection_request" from="." to="." method="connect_node"]
|
||||
|
||||
[connection signal="disconnection_request" from="." to="." method="disconnect_node"]
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="do_send_changed_signal"]
|
||||
|
||||
|
||||
[connection signal="text_changed" from="GraphUI/SubGraphUI/Label" to="." method="_on_Label_text_changed"]
|
||||
[connection signal="toggled" from="GraphUI/SubGraphUI/ButtonTransmitsSeed" to="." method="_on_ButtonTransmitsSeed_toggled"]
|
||||
[connection signal="pressed" from="GraphUI/SubGraphUI/ButtonUp" to="." method="on_ButtonUp_pressed"]
|
||||
[connection signal="pressed" from="GraphUI/ButtonShowTree" to="." method="_on_ButtonShowTree_pressed"]
|
||||
|
Before Width: | Height: | Size: 203 B |
Before Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 441 B |
Before Width: | Height: | Size: 482 B |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.6 KiB |
34
addons/material_maker/icons/icon.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-102e1e6732886eb945051a060861d203.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/material_maker/icons/icon.png"
|
||||
dest_files=[ "res://.import/icon.png-102e1e6732886eb945051a060861d203.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
@ -10,12 +10,12 @@
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
width="128"
|
||||
height="64"
|
||||
viewBox="0 0 128 64"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="icons.svg">
|
||||
<defs
|
||||
id="defs2">
|
||||
@ -48,20 +48,28 @@
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.1274425"
|
||||
inkscape:cx="116.41955"
|
||||
inkscape:cy="914.64295"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="28.608854"
|
||||
inkscape:cx="86.841515"
|
||||
inkscape:cy="21.061007"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1">
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:pagecheckerboard="true"
|
||||
units="px"
|
||||
scale-x="2.1"
|
||||
inkscape:snap-to-guides="false"
|
||||
inkscape:snap-grids="false"
|
||||
inkscape:snap-global="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid815" />
|
||||
id="grid815"
|
||||
spacingx="16"
|
||||
spacingy="16" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
@ -78,18 +86,11 @@
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
id="rect4533"
|
||||
width="238.125"
|
||||
height="174.625"
|
||||
x="-10.583333"
|
||||
y="-3.3020833"
|
||||
ry="0.82414269" />
|
||||
id="layer1"
|
||||
transform="translate(0,-280.06665)">
|
||||
<g
|
||||
id="g4582"
|
||||
transform="matrix(1.2003144,0.26398218,-0.26389538,1.2007092,-4.1100858,-17.15364)"
|
||||
transform="matrix(0.61648821,0.13623838,-0.13553815,0.6196732,31.995696,300.23749)"
|
||||
inkscape:export-filename="link.png"
|
||||
inkscape:export-xdpi="15.926786"
|
||||
inkscape:export-ydpi="15.926786">
|
||||
@ -109,7 +110,7 @@
|
||||
inkscape:export-xdpi="16.531826"
|
||||
inkscape:export-filename="remove.png"
|
||||
id="g4564"
|
||||
transform="matrix(0.82426401,0.81188676,-0.82426401,0.81188676,84.358228,-6.2929802)"
|
||||
transform="matrix(0.43370177,0.42718925,-0.43370177,0.42718925,43.791013,273.09803)"
|
||||
style="fill:#ff0909;fill-opacity:1">
|
||||
<rect
|
||||
style="opacity:1;fill:#ff0909;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
@ -133,7 +134,7 @@
|
||||
inkscape:export-filename="config.png"
|
||||
inkscape:export-xdpi="16.559999"
|
||||
inkscape:export-ydpi="16.559999"
|
||||
transform="matrix(1.0254261,0,0,1.0022479,-9.1237225,-33.22013)">
|
||||
transform="matrix(0.52573689,0,0,0.513409,30.847756,292.09585)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4598"
|
||||
@ -142,7 +143,7 @@
|
||||
</g>
|
||||
<g
|
||||
id="g855"
|
||||
transform="matrix(0.48976049,-0.48711566,0.48711566,0.48976049,-26.645494,39.257287)"
|
||||
transform="matrix(0.25769655,-0.25630492,0.25630492,0.25769655,4.0104312,296.39647)"
|
||||
inkscape:export-filename="edit.png"
|
||||
inkscape:export-xdpi="14.942099"
|
||||
inkscape:export-ydpi="14.942099">
|
||||
@ -185,17 +186,20 @@
|
||||
id="g879"
|
||||
inkscape:export-filename="save.png"
|
||||
inkscape:export-xdpi="14"
|
||||
inkscape:export-ydpi="14">
|
||||
inkscape:export-ydpi="14"
|
||||
transform="matrix(0.52616852,0,0,0.52616852,14.395212,275.18126)">
|
||||
<path
|
||||
id="rect859"
|
||||
transform="scale(0.26458333)"
|
||||
d="M 130 152.51953 L 130 262.51953 L 240 262.51953 L 240 163.23047 L 229.28906 152.51953 L 130 152.51953 z "
|
||||
style="opacity:1;fill:#14008d;fill-opacity:1;stroke:none;stroke-width:3.77952766;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
d="m 130,152.51953 v 110 h 110 v -99.28906 l -10.71094,-10.71094 z"
|
||||
style="opacity:1;fill:#14008d;fill-opacity:1;stroke:none;stroke-width:3.77952766;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="rect861"
|
||||
transform="scale(0.26458333)"
|
||||
d="M 155 152.51953 L 155 192.51953 L 215 192.51953 L 215 152.51953 L 155 152.51953 z M 195 162.51953 L 205 162.51953 L 205 182.51953 L 195 182.51953 L 195 162.51953 z "
|
||||
style="opacity:1;fill:#afafaf;fill-opacity:1;stroke:none;stroke-width:4.04048538;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
d="m 155,152.51953 v 40 h 60 v -40 z m 40,10 h 10 v 20 h -10 z"
|
||||
style="opacity:1;fill:#afafaf;fill-opacity:1;stroke:none;stroke-width:4.04048538;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
ry="2.6458347"
|
||||
y="53.583332"
|
||||
@ -207,34 +211,23 @@
|
||||
</g>
|
||||
<g
|
||||
style="fill:#18ff09;fill-opacity:1"
|
||||
transform="matrix(0.00708854,0.93703452,-0.93703452,-0.00708854,131.56263,7.7603075)"
|
||||
transform="matrix(0.00372977,0.49303806,-0.49303806,-0.00372977,83.199877,280.80247)"
|
||||
id="g849"
|
||||
inkscape:export-filename="plus.png"
|
||||
inkscape:export-xdpi="16.531826"
|
||||
inkscape:export-ydpi="16.531826">
|
||||
<rect
|
||||
ry="0"
|
||||
y="8.604167"
|
||||
x="10.583333"
|
||||
height="26.458334"
|
||||
width="5.2916665"
|
||||
<path
|
||||
style="opacity:1;fill:#18ff09;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
d="m 1.7704433,57.914123 10.5809277,8.16e-4 8.46e-4,10.584889 5.292445,4.22e-4 -8.47e-4,-10.58489 10.58489,8.46e-4 -4.24e-4,-5.292444 -10.580925,-8.16e-4 -8.47e-4,-10.58489 -5.292414,0.0035 8.14e-4,10.580928 -10.5848882,-8.47e-4 z"
|
||||
id="rect844"
|
||||
style="opacity:1;fill:#18ff09;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
<rect
|
||||
ry="0"
|
||||
y="19.1875"
|
||||
x="0"
|
||||
height="5.2916665"
|
||||
width="26.458332"
|
||||
id="rect847"
|
||||
style="opacity:1;fill:#18ff09;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:export-ydpi="16.531826"
|
||||
inkscape:export-xdpi="16.531826"
|
||||
inkscape:export-filename="minus.png"
|
||||
id="g856"
|
||||
transform="matrix(0.00708854,0.93703452,-0.93703452,-0.00708854,162.38808,7.2064523)"
|
||||
transform="matrix(0.00372977,0.49303806,-0.49303806,-0.00372977,18.535206,297.77843)"
|
||||
style="fill:#ff0909;fill-opacity:1">
|
||||
<rect
|
||||
style="opacity:1;fill:#ff0909;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
@ -249,17 +242,20 @@
|
||||
id="g868"
|
||||
inkscape:export-filename="load.png"
|
||||
inkscape:export-xdpi="13.499794"
|
||||
inkscape:export-ydpi="13.499794">
|
||||
inkscape:export-ydpi="13.499794"
|
||||
transform="matrix(0.51223521,0,0,0.51223521,5.2214853,275.80647)">
|
||||
<path
|
||||
id="rect849"
|
||||
transform="scale(0.26458333)"
|
||||
d="M 330 152.51953 L 330 262.51953 L 420 262.51953 L 420 169.94531 L 402.57227 152.51953 L 330 152.51953 z "
|
||||
style="opacity:1;fill:#ffed46;fill-opacity:1;stroke:#c7b115;stroke-width:3.77952761;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke;stroke-linejoin:round" />
|
||||
d="m 330,152.51953 v 110 h 90 v -92.57422 l -17.42773,-17.42578 z"
|
||||
style="opacity:1;fill:#ffed46;fill-opacity:1;stroke:#c7b115;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path855"
|
||||
transform="scale(0.26458333)"
|
||||
d="M 403 152.94727 L 403 169.51953 L 419.57422 169.51953 L 403 152.94727 z "
|
||||
style="opacity:1;fill:#ffed46;fill-opacity:1;stroke:#c7b115;stroke-width:3.77952761;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke;stroke-linejoin:round" />
|
||||
d="m 403,152.94727 v 16.57226 h 16.57422 z"
|
||||
style="opacity:1;fill:#ffed46;fill-opacity:1;stroke:#c7b115;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
transform="rotate(-90)"
|
||||
ry="2.5431327e-006"
|
||||
@ -270,5 +266,189 @@
|
||||
id="rect863"
|
||||
style="opacity:0;fill:#ffed46;fill-opacity:1;stroke:#c7b115;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
</g>
|
||||
<path
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.96038949;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
d="m 14.281124,319.9133 c -3.380125,5.56722 -9.3711249,5.74887 -12.9027613,0 2.6589695,-5.76337 10.0526323,-5.46131 12.9027613,0 z"
|
||||
id="path5159"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<ellipse
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
id="path5162"
|
||||
cx="7.8297439"
|
||||
cy="319.77344"
|
||||
rx="1.0486264"
|
||||
ry="0.87385535" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5166"
|
||||
d="m 30.429971,319.84339 c -3.380125,5.56722 -9.371125,5.74887 -12.902762,0"
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.96038949;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
<path
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
d="m 33.869141,312.36502 v 1.50195 h -1.501953 v 1.5957 h 1.501953 v 1.50196 h 1.595703 v -1.50196 h 1.501953 v -1.5957 h -1.501953 v -1.50195 z"
|
||||
id="rect860"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path865"
|
||||
d="m 49.948079,312.36502 v 1.50195 h -1.501953 v 1.5957 h 1.501953 v 1.50196 h 1.595703 v -1.50196 h 1.501953 v -1.5957 h -1.501953 v -1.50195 z"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
<g
|
||||
id="g4582-9"
|
||||
transform="matrix(0.61648821,0.13623838,-0.13553815,0.6196732,0.09092866,268.4386)"
|
||||
inkscape:export-filename="link.png"
|
||||
inkscape:export-xdpi="15.926786"
|
||||
inkscape:export-ydpi="15.926786">
|
||||
<path
|
||||
id="path4540-9"
|
||||
d="m 52.110175,11.249997 c -2.182497,-2.09336 -5.682294,-2.0795701 -7.847077,0.03092 l -5.999358,5.848887 c -1.693669,1.651191 -2.053303,4.081962 -1.084529,6.064327 l 2.668997,-2.602056 c 0.06832,-0.475315 0.288771,-0.934614 0.666689,-1.303055 l 5.999358,-5.848887 c 0.927764,-0.904495 2.427677,-0.910404 3.363033,-0.01325 0.935356,0.897155 0.941467,2.347581 0.0137,3.252076 l -5.999358,5.848886 c -0.305037,0.297386 -0.672368,0.495758 -1.060703,0.598709 l -2.79438,2.724294 c 2.027594,0.834538 4.455047,0.445994 6.106241,-1.163787 l 5.999357,-5.848886 C 54.306929,16.727686 54.292669,13.34336 52.110175,11.25 Z"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.5892244;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path4542-4"
|
||||
d="m 47.703334,18.314275 c -2.043073,-0.877257 -4.511855,-0.499459 -6.184325,1.131064 l -5.999358,5.848887 c -2.164785,2.11049 -2.150524,5.494815 0.03197,7.588174 2.182497,2.09336 5.682293,2.079573 7.847078,-0.03092 l 5.999358,-5.848887 c 1.67245,-1.630503 2.042985,-4.020862 1.11922,-5.989301 l -2.724165,2.655841 c -0.08761,0.429031 -0.302522,0.839174 -0.646213,1.174244 l -5.999357,5.848887 c -0.927764,0.904494 -2.427678,0.910405 -3.363034,0.01325 -0.935356,-0.897154 -0.941466,-2.34758 -0.0137,-3.252075 l 5.999358,-5.848887 c 0.343694,-0.335073 0.766059,-0.54623 1.209002,-0.634439 z"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.5892244;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g4645-4"
|
||||
inkscape:export-filename="config.png"
|
||||
inkscape:export-xdpi="16.559999"
|
||||
inkscape:export-ydpi="16.559999"
|
||||
transform="matrix(0.52573689,0,0,0.513409,-1.7560956,259.17843)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4598-6"
|
||||
d="m 23.783078,44.110649 -4.508983,4.648736 -3.980261,-5.27284 a 12.770835,12.770835 0 0 0 -2.631282,1.045173 l 0.825522,6.441784 -6.571368,-0.17469 a 12.770835,12.770835 0 0 0 -0.7896172,2.557631 12.770835,12.770835 0 0 0 -0.027504,0.173796 l 5.5120272,3.347264 -4.1861363,4.972095 a 12.770835,12.770835 0 0 0 1.6563998,2.37002 l 5.9760855,-2.194035 1.267643,6.324612 a 12.770835,12.770835 0 0 0 2.907828,0.192046 l 1.997862,-6.001057 5.727797,2.948399 a 12.770835,12.770835 0 0 0 1.98019,-2.135962 l -3.455675,-5.317616 5.926699,-2.662342 a 12.770835,12.770835 0 0 0 -0.414249,-2.850168 l -6.383635,-0.620945 1.631047,-6.361785 a 12.770835,12.770835 0 0 0 -2.46039,-1.430116 z m -4.472442,8.529047 a 3.1927084,3.1927084 0 0 1 2.523332,3.744269 3.1927084,3.1927084 0 0 1 -3.744267,2.523336 3.1927084,3.1927084 0 0 1 -2.523335,-3.744269 3.1927084,3.1927084 0 0 1 3.74427,-2.523336 z"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.80446196;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 2.9383367,329.45579 0.1398168,13.14278"
|
||||
id="path1469"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 3.5097233,333.01844 4.9679886,-0.0742"
|
||||
id="path1471"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 7.4643412,333.1173 0.024716,3.95462 7.1924608,-0.0247 v 0"
|
||||
id="path1473"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 7.4890575,337.83813 -0.024716,3.68273 h 5.8083445"
|
||||
id="path1475"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:0.84322037;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 17.351562,55.695312 4.34961,0.04883 0.123047,6.822265 h 4.27539 l 0.125,-6.822265 4.34961,-0.04883 -6.611328,-6.845703 z"
|
||||
transform="translate(0,280.06665)"
|
||||
id="path1477"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4561"
|
||||
d="m 33.500409,335.78733 4.34961,-0.0488 0.123047,-6.82227 h 4.27539 l 0.125,6.82227 4.34961,0.0488 -6.611328,6.8457 z"
|
||||
style="fill:#ffffff;fill-opacity:0.84322037;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 67.601449,292.54414 5.38295,-1e-5"
|
||||
id="path4570"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 73.823299,283.52594 9.857089,-0.0699"
|
||||
id="path4572"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 85.288282,289.32835 7.55011,-0.0699"
|
||||
id="path4574"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f6f6f6;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 98.850517,292.96359 8.668643,-9.57745 9.36773,9.92699 8.24919,-6.78111"
|
||||
id="path4576"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f6f6f6;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 67.110738,309.04251 c 3.472118,0.55927 4.555698,-9.96194 8.319101,-9.85708 3.763403,0.10486 4.678964,9.98562 9.36773,9.92699 4.552323,-0.0569 5.040651,-6.78111 8.24919,-6.78111"
|
||||
id="path4576-7"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="czsc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#f6f6f6;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 99.268615,309.04251 c 0,0 4.241035,-9.53142 8.668645,-9.57745 4.42761,-0.046 4.9669,9.84949 9.36773,9.92699 3.55898,0.0627 8.24919,-6.78111 8.24919,-6.78111"
|
||||
id="path4576-0"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="czsc" />
|
||||
<g
|
||||
id="g892">
|
||||
<rect
|
||||
y="313.76132"
|
||||
x="65.504196"
|
||||
height="13.002968"
|
||||
width="13.002968"
|
||||
id="rect873"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:18.89763832;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path877"
|
||||
d="m 68.300602,315.40441 a 1.1185348,1.1185348 0 0 0 -1.11914,1.11719 1.1185348,1.1185348 0 0 0 1.11914,1.11914 1.1185348,1.1185348 0 0 0 1.119141,-1.11914 1.1185348,1.1185348 0 0 0 -1.119141,-1.11719 z m 7.480469,0 a 1.1185348,1.1185348 0 0 0 -1.11914,1.11719 1.1185348,1.1185348 0 0 0 1.11914,1.11914 1.1185348,1.1185348 0 0 0 1.119141,-1.11914 1.1185348,1.1185348 0 0 0 -1.119141,-1.11719 z m -7.550781,7.48047 a 1.1185348,1.1185348 0 0 0 -1.119141,1.11914 1.1185348,1.1185348 0 0 0 1.119141,1.11719 1.1185348,1.1185348 0 0 0 1.119141,-1.11719 1.1185348,1.1185348 0 0 0 -1.119141,-1.11914 z m 7.480469,0 a 1.1185348,1.1185348 0 0 0 -1.119141,1.11914 1.1185348,1.1185348 0 0 0 1.119141,1.11719 1.1185348,1.1185348 0 0 0 1.11914,-1.11719 1.1185348,1.1185348 0 0 0 -1.11914,-1.11914 z"
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30.23622131;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30.23622131;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 72.00568,319.14464 c -0.61746,-3.3e-4 -1.118397,0.49973 -1.11914,1.11719 -3.35e-4,0.61822 0.500918,1.11948 1.11914,1.11914 0.618223,3.4e-4 1.119476,-0.50092 1.119141,-1.11914 -7.43e-4,-0.61746 -0.50168,-1.11752 -1.119141,-1.11719 z"
|
||||
id="path887" />
|
||||
</g>
|
||||
<g
|
||||
id="g900"
|
||||
transform="translate(16.00903,-0.03495421)">
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:18.89763832;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect894"
|
||||
width="13.002968"
|
||||
height="13.002968"
|
||||
x="65.504196"
|
||||
y="313.76132" />
|
||||
<path
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30.23622131;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 68.300602,315.40441 a 1.1185348,1.1185348 0 0 0 -1.11914,1.11719 1.1185348,1.1185348 0 0 0 1.11914,1.11914 1.1185348,1.1185348 0 0 0 1.119141,-1.11914 1.1185348,1.1185348 0 0 0 -1.119141,-1.11719 z m 7.480469,0 a 1.1185348,1.1185348 0 0 0 -1.11914,1.11719 1.1185348,1.1185348 0 0 0 1.11914,1.11914 1.1185348,1.1185348 0 0 0 1.119141,-1.11914 1.1185348,1.1185348 0 0 0 -1.119141,-1.11719 z m -7.550781,7.48047 a 1.1185348,1.1185348 0 0 0 -1.119141,1.11914 1.1185348,1.1185348 0 0 0 1.119141,1.11719 1.1185348,1.1185348 0 0 0 1.119141,-1.11719 1.1185348,1.1185348 0 0 0 -1.119141,-1.11914 z m 7.480469,0 a 1.1185348,1.1185348 0 0 0 -1.119141,1.11914 1.1185348,1.1185348 0 0 0 1.119141,1.11719 1.1185348,1.1185348 0 0 0 1.11914,-1.11719 1.1185348,1.1185348 0 0 0 -1.11914,-1.11914 z"
|
||||
id="path896"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
id="path898"
|
||||
d="m 72.00568,319.14464 c -0.61746,-3.3e-4 -1.118397,0.49973 -1.11914,1.11719 -3.35e-4,0.61822 0.500918,1.11948 1.11914,1.11914 0.618223,3.4e-4 1.119476,-0.50092 1.119141,-1.11914 -7.43e-4,-0.61746 -0.50168,-1.11752 -1.119141,-1.11719 z"
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:30.23622131;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
</g>
|
||||
<circle
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#ff0606;stroke-width:2.00201297;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path902"
|
||||
cx="88.014717"
|
||||
cy="320.29779"
|
||||
r="6.1100225" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#ff0606;stroke-width:2.26771665;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect904"
|
||||
width="10.905715"
|
||||
height="0.2446795"
|
||||
x="-73.237968"
|
||||
y="324.99719"
|
||||
transform="rotate(-27.138711)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 27 KiB |
34
addons/material_maker/icons/icons.svg.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icons.svg-d2e3029ae68e242c75d7182ab1a1b6f4.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/material_maker/icons/icons.svg"
|
||||
dest_files=[ "res://.import/icons.svg-d2e3029ae68e242c75d7182ab1a1b6f4.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Before Width: | Height: | Size: 476 B |
8
addons/material_maker/icons/link.tres
Normal file
@ -0,0 +1,8 @@
|
||||
[gd_resource type="AtlasTexture" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/material_maker/icons/icons.svg" type="Texture" id=1]
|
||||
|
||||
[resource]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 15 )
|