diff --git a/addons/material_maker/nodes/raymarching.mmg b/addons/material_maker/nodes/raymarching.mmg index 20012a65..f9f2724f 100644 --- a/addons/material_maker/nodes/raymarching.mmg +++ b/addons/material_maker/nodes/raymarching.mmg @@ -12,32 +12,42 @@ "global": "", "inputs": [ { - "default": "0.0", + "default": "vec2(100.0, 0.0)", "function": true, "label": "", + "longdesc": "The input object, described as 3D signed distance function with color index", "name": "sdf", + "shortdesc": "Input", "type": "sdf3dc" } ], "instance": "vec2 raymarch_$name(vec2 uv) {\n\tvec3 ro = vec3(uv-vec2(0.5), 1.0);\n\tvec3 rd = vec3(0.0, 0.0, -1.0);\n\tfloat dO = 0.0;\n\tfloat c = 0.0;\n for (int i=0; i < 100; i++) {\n \tvec3 p = ro + rd*dO;\n vec2 dS = $sdf(p);\n dO += dS.x;\n\n if (dO >= 1.0) {\n\t\t\tbreak;\n\t\t} else if (dS.x < 0.0001) {\n\t\t\tc = dS.y;\n\t\t\tbreak;\n\t\t}\n }\n \n return vec2(dO, c);\n}\n\nvec3 normal_$name(vec3 p) {\n\tif (p.z <= 0.0) {\n\t\treturn vec3(0.0, 0.0, 1.0);\n\t}\n\n\tfloat d = $sdf(p).x;\n float e = .001;\n \n vec3 n = d - vec3(\n $sdf(p-vec3(e, 0.0, 0.0)).x,\n $sdf(p-vec3(0.0, e, 0.0)).x,\n $sdf(p-vec3(0.0, 0.0, e)).x);\n \n return vec3(-1.0, -1.0, -1.0)*normalize(n);\n}\n\n", - "name": "Raymarching", + "longdesc": "A node that raymarches a 3D object (described as signed distance function with optional color index) to render a heightmap, a normal map and a color index map.", + "name": "Render", "outputs": [ { "f": "1.0-$(name_uv)_d.x", + "longdesc": "The generated height map", + "shortdesc": "HeightMap", "type": "f" }, { + "longdesc": "The generated normal map", "rgb": "vec3(0.5)+0.5*normal_$name(vec3($uv-vec2(0.5), 1.0-$(name_uv)_d.x))", + "shortdesc": "NormalMap", "type": "rgb" }, { "f": "$(name_uv)_d.y", + "longdesc": "The generated color indes map", + "shortdesc": "ColorMap", "type": "f" } ], "parameters": [ - ] + ], + "shortdesc": "Render" }, "type": "shader" } \ No newline at end of file diff --git a/addons/material_maker/nodes/sdf3d_box.mmg b/addons/material_maker/nodes/sdf3d_box.mmg index dd3bf887..5efa7805 100644 --- a/addons/material_maker/nodes/sdf3d_box.mmg +++ b/addons/material_maker/nodes/sdf3d_box.mmg @@ -5,7 +5,7 @@ "y": 0 }, "parameters": { - "r": 0.05, + "r": 0.01, "sx": 0.3, "sy": 0.25, "sz": 0.25 @@ -17,10 +17,13 @@ ], "instance": "", + "longdesc": "A node that generates a rounded box as a signed distance function", "name": "Box", "outputs": [ { + "longdesc": "Shows the rounded box", "sdf3d": "length(max($(name_uv)_q,0.0))+min(max($(name_uv)_q.x,max($(name_uv)_q.y,$(name_uv)_q.z)),0.0)-$r", + "shortdesc": "Output", "type": "sdf3d" } ], @@ -29,9 +32,11 @@ "control": "Rect1.x", "default": 0.5, "label": "Size X", + "longdesc": "The size of the box along the X axis", "max": 1, "min": 0, "name": "sx", + "shortdesc": "Size.x", "step": 0.01, "type": "float" }, @@ -39,9 +44,11 @@ "control": "Rect1.y", "default": 0.5, "label": "Size Y", + "longdesc": "The size of the box along the Y axis", "max": 1, "min": 0, "name": "sy", + "shortdesc": "Size.y", "step": 0.01, "type": "float" }, @@ -49,9 +56,11 @@ "control": "None", "default": 0.5, "label": "Size Z", + "longdesc": "The size of the box along the Z axis", "max": 1, "min": 0, "name": "sz", + "shortdesc": "Size.z", "step": 0.01, "type": "float" }, @@ -59,13 +68,16 @@ "control": "None", "default": 0.5, "label": "Radius", + "longdesc": "The radius of the rounded box", "max": 1, "min": 0, "name": "r", + "shortdesc": "Radius", "step": 0.01, "type": "float" } - ] + ], + "shortdesc": "Box" }, "type": "shader" } \ No newline at end of file diff --git a/addons/material_maker/nodes/sdf3d_capsule.mmg b/addons/material_maker/nodes/sdf3d_capsule.mmg index 3ed3816a..770c48a3 100644 --- a/addons/material_maker/nodes/sdf3d_capsule.mmg +++ b/addons/material_maker/nodes/sdf3d_capsule.mmg @@ -16,10 +16,13 @@ ], "instance": "", + "longdesc": "A node that generates a capsule as a signed distance functioni", "name": "Capsule", "outputs": [ { + "longdesc": "Shows the capsule", "sdf3d": "length($(name_uv)_p)-$r", + "shortdesc": "Output", "type": "sdf3d" } ], @@ -27,7 +30,9 @@ { "default": 1, "label": "Axis", + "longdesc": "The axis of the capsule", "name": "axis", + "shortdesc": "Axis", "type": "enum", "values": [ { @@ -48,9 +53,11 @@ "control": "Rect1.y", "default": 0.25, "label": "Length", + "longdesc": "The length of the capsule", "max": 1, "min": 0, "name": "l", + "shortdesc": "Length", "step": 0.01, "type": "float" }, @@ -58,13 +65,16 @@ "control": "Rect1.x", "default": 0.2, "label": "Radius", + "longdesc": "The radius of the capsule", "max": 1, "min": 0, "name": "r", + "shortdesc": "Radius", "step": 0.01, "type": "float" } - ] + ], + "shortdesc": "capsule" }, "type": "shader" } \ No newline at end of file diff --git a/addons/material_maker/nodes/sdf3d_color.mmg b/addons/material_maker/nodes/sdf3d_color.mmg index 290c473f..6c54771c 100644 --- a/addons/material_maker/nodes/sdf3d_color.mmg +++ b/addons/material_maker/nodes/sdf3d_color.mmg @@ -5,15 +5,7 @@ "y": 0 }, "parameters": { - "bevel": 0, - "c": 0.5, - "cx": 0, - "cy": 0, - "h": 0.08, - "k": 0.15, - "op": 0, - "r": 0.15, - "w": 0.28 + "c": 0.5 }, "shader_model": { "code": "", @@ -22,15 +14,20 @@ { "default": "0.0", "label": "", + "longdesc": "The input 3D object", "name": "in", + "shortdesc": "Input", "type": "sdf3d" } ], "instance": "", + "longdesc": "A node that assigns a color index to a 3D object", "name": "Color", "outputs": [ { + "longdesc": "The colored 3D object", "sdf3dc": "vec2($in($uv), $c)", + "shortdesc": "Output", "type": "sdf3dc" } ], @@ -39,13 +36,16 @@ "control": "None", "default": 0, "label": "", + "longdesc": "The color index to be assigned", "max": 1, "min": 0, "name": "c", + "shortdesc": "Color", "step": 0.01, "type": "float" } - ] + ], + "shortdesc": "Color" }, "type": "shader" } \ No newline at end of file diff --git a/addons/material_maker/nodes/sdf3d_cylinder.mmg b/addons/material_maker/nodes/sdf3d_cylinder.mmg index d2761440..6f629db0 100644 --- a/addons/material_maker/nodes/sdf3d_cylinder.mmg +++ b/addons/material_maker/nodes/sdf3d_cylinder.mmg @@ -16,10 +16,13 @@ ], "instance": "", + "longdesc": "A node that generates a cylinder as a signed distance function", "name": "Cylinder", "outputs": [ { + "longdesc": "Shows the cylinder", "sdf3d": "min(max($(name_uv)_d.x,$(name_uv)_d.y),0.0) + length(max($(name_uv)_d,0.0))", + "shortdesc": "Output", "type": "sdf3d" } ], @@ -27,7 +30,9 @@ { "default": 1, "label": "Axis", + "longdesc": "The axis of the cylinder", "name": "axis", + "shortdesc": "Axis", "type": "enum", "values": [ { @@ -48,9 +53,11 @@ "control": "Rect1.y", "default": 0.5, "label": "Length", + "longdesc": "The length of the cylinder", "max": 1, "min": 0, "name": "l", + "shortdesc": "Length", "step": 0.01, "type": "float" }, @@ -58,13 +65,16 @@ "control": "Rect1.x", "default": 0.2, "label": "Radius", + "longdesc": "The radius of the cylinder", "max": 1, "min": 0, "name": "r", + "shortdesc": "Radius", "step": 0.01, "type": "float" } - ] + ], + "shortdesc": "Cylinder" }, "type": "shader" } \ No newline at end of file diff --git a/addons/material_maker/nodes/sdf3d_sphere.mmg b/addons/material_maker/nodes/sdf3d_sphere.mmg index c62785e5..bd5ea218 100644 --- a/addons/material_maker/nodes/sdf3d_sphere.mmg +++ b/addons/material_maker/nodes/sdf3d_sphere.mmg @@ -14,10 +14,13 @@ ], "instance": "", + "longdesc": "A node that generates a sphere as a signed distance function", "name": "Sphere", "outputs": [ { + "longdesc": "Shows the sphere", "sdf3d": "length($uv)-$r", + "shortdesc": "Output", "type": "sdf3d" } ], @@ -26,13 +29,16 @@ "control": "Radius1.r", "default": 0.5, "label": "", + "longdesc": "The radius of the sphere", "max": 1, "min": 0, "name": "r", + "shortdesc": "Radius", "step": 0.01, "type": "float" } - ] + ], + "shortdesc": "Sphere" }, "type": "shader" } \ No newline at end of file diff --git a/addons/material_maker/nodes/sdf3d_torus.mmg b/addons/material_maker/nodes/sdf3d_torus.mmg index c1eeabb0..96ca8e04 100644 --- a/addons/material_maker/nodes/sdf3d_torus.mmg +++ b/addons/material_maker/nodes/sdf3d_torus.mmg @@ -16,10 +16,13 @@ ], "instance": "", + "longdesc": "A node that generates a torus as a signed distance function", "name": "Torus", "outputs": [ { + "longdesc": "Shows the torus", "sdf3d": "length($(name_uv)_q)-$r", + "shortdesc": "Output", "type": "sdf3d" } ], @@ -27,7 +30,9 @@ { "default": 0, "label": "Axis", + "longdesc": "The axis of the torus", "name": "axis", + "shortdesc": "Torus", "type": "enum", "values": [ { @@ -48,9 +53,11 @@ "control": "Radius1.r", "default": 0.5, "label": "R", + "longdesc": "The major radius of the torus", "max": 1, "min": 0, "name": "R", + "shortdesc": "Radius1", "step": 0.01, "type": "float" }, @@ -58,13 +65,16 @@ "control": "Radius11.r", "default": 0.1, "label": "r", + "longdesc": "The minor radius of the torus", "max": 0.5, "min": 0, "name": "r", + "shortdesc": "Radius2", "step": 0.01, "type": "float" } - ] + ], + "shortdesc": "Torus" }, "type": "shader" } \ No newline at end of file diff --git a/addons/material_maker/nodes/tex3d_apply_invuvmap.mmg b/addons/material_maker/nodes/tex3d_apply_invuvmap.mmg index f397937d..f9521ce7 100644 --- a/addons/material_maker/nodes/tex3d_apply_invuvmap.mmg +++ b/addons/material_maker/nodes/tex3d_apply_invuvmap.mmg @@ -14,27 +14,35 @@ { "default": "vec3(1.0)", "label": "Texture", + "longdesc": "The input 3D texture", "name": "t", + "shortdesc": "Texture", "type": "tex3d" }, { "default": "vec3(0.0)", "label": "Inv. UV Map", + "longdesc": "The inverse UV map of the object", "name": "map", + "shortdesc": "InvUVMap", "type": "rgb" } ], "instance": "", + "longdesc": "This node applies a 3D texture to an object using its inverse UV map.", "name": "TEX3D Apply", "outputs": [ { + "longdesc": "The generated texture", "rgb": "$t(vec4($map($uv), 0.0))", + "shortdesc": "Output", "type": "rgb" } ], "parameters": [ - ] + ], + "shortdesc": "TEX3D Apply" }, "type": "shader" } \ No newline at end of file