Advertisement
Jummit

material.mmg with albedo export

Apr 25th, 2020
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 9.21 KB | None | 0 0
  1. {
  2.     "name": "material",
  3.     "node_position": {
  4.         "x": 0,
  5.         "y": 0
  6.     },
  7.     "parameters": {
  8.         "albedo_color": {
  9.             "a": 1,
  10.             "b": 1,
  11.             "g": 1,
  12.             "r": 1,
  13.             "type": "Color"
  14.         },
  15.         "ao": 1,
  16.         "depth_scale": 0.5,
  17.         "emission": 1,
  18.         "metallic": 1,
  19.         "normal": 1,
  20.         "roughness": 1,
  21.         "size": 11,
  22.         "sss": 0
  23.     },
  24.     "export": {
  25.     },
  26.     "shader_model": {
  27.         "code": "",
  28.         "global": "",
  29.         "inputs": [
  30.             {
  31.                 "default": "vec3(1.0)",
  32.                 "label": "",
  33.                 "name": "albedo_tex",
  34.                 "type": "rgb"
  35.             },
  36.             {
  37.                 "default": "1.0",
  38.                 "label": "",
  39.                 "name": "metallic_tex",
  40.                 "type": "f"
  41.             },
  42.             {
  43.                 "default": "1.0",
  44.                 "label": "",
  45.                 "name": "roughness_tex",
  46.                 "type": "f"
  47.             },
  48.             {
  49.                 "default": "vec3(0.0)",
  50.                 "label": "",
  51.                 "name": "emission_tex",
  52.                 "type": "rgb"
  53.             },
  54.             {
  55.                 "default": "vec3(0.5)",
  56.                 "label": "",
  57.                 "name": "normal_tex",
  58.                 "type": "rgb"
  59.             },
  60.             {
  61.                 "default": "1.0",
  62.                 "label": "",
  63.                 "name": "ao_tex",
  64.                 "type": "f"
  65.             },
  66.             {
  67.                 "default": "0.0",
  68.                 "label": "",
  69.                 "name": "depth_tex",
  70.                 "type": "f"
  71.             },
  72.             {
  73.                 "default": "0.0",
  74.                 "label": "",
  75.                 "name": "sss_tex",
  76.                 "type": "f"
  77.             }
  78.         ],
  79.         "instance": "",
  80.         "name": "Material",
  81.         "outputs": [
  82.             {
  83.                 "desc":"0: albedo",
  84.                 "rgb": "$albedo_tex($uv)",
  85.                 "type": "rgb"
  86.             },
  87.             {
  88.                 "desc":"1: ambient occlusion, roughness, metallic",
  89.                 "rgb": "vec3($ao_tex($uv), $roughness_tex($uv), $metallic_tex($uv))",
  90.                 "type": "rgb"
  91.             },
  92.             {
  93.                 "desc":"2: emission",
  94.                 "rgb": "$emission_tex($uv)",
  95.                 "type": "rgb"
  96.             },
  97.             {
  98.                 "desc":"3: normal map for Godot",
  99.                 "rgb": "$normal_tex($uv)*vec3(-1.0, 1.0, 1.0)+vec3(1.0, 0.0, 0.0)",
  100.                 "type": "rgb"
  101.             },
  102.             {
  103.                 "desc":"4: normal map for Godot",
  104.                 "f": "$depth_tex($uv)",
  105.                 "type": "f"
  106.             },
  107.             {
  108.                 "desc":"5: sub surface scattering",
  109.                 "f": "$sss_tex($uv)",
  110.                 "type": "f"
  111.             },
  112.             {
  113.                 "desc":"6: unity metallic/smoothness",
  114.                 "rgba": "vec4(vec3($metallic_tex($uv)), 1.0-$roughness_tex($uv))",
  115.                 "type": "rgba"
  116.             },
  117.             {
  118.                 "desc":"7: unity normal",
  119.                 "rgb": "$normal_tex($uv)*vec3(-1.0, 1.0, -1.0)+vec3(1.0, 0.0, 1.0)",
  120.                 "type": "rgb"
  121.             },
  122.             {
  123.                 "desc":"8: unity height",
  124.                 "f": "1.0-$depth_tex($uv)",
  125.                 "type": "f"
  126.             },
  127.             {
  128.                 "desc":"9: unity occlusion",
  129.                 "f": "$ao_tex($uv)",
  130.                 "type": "f"
  131.             },
  132.             {
  133.                 "desc":"10: unreal normal",
  134.                 "rgb": "$normal_tex($uv)*vec3(-1.0)+vec3(1.0)",
  135.                 "type": "rgb"
  136.             }
  137.         ],
  138.         "exports": {
  139.             "Godot": {
  140.                 "export_extension":"tres",
  141.                 "files": [
  142.                     {
  143.                         "type":"texture",
  144.                         "file_name":"$(path_prefix)_albedo.png",
  145.                         "output":0,
  146.                         "conditions":"$(connected:albedo_tex)"
  147.                     },
  148.                     {
  149.                         "type":"texture",
  150.                         "file_name":"$(path_prefix)_orm.png",
  151.                         "output":1,
  152.                         "conditions":"$(connected:ao_tex) or $(connected:roughness_tex) or $(connected:metallic_tex)"
  153.                     },
  154.                     {
  155.                         "type":"texture",
  156.                         "file_name":"$(path_prefix)_emission.png",
  157.                         "output":2,
  158.                         "conditions":"$(connected:emission_tex)"
  159.                     },
  160.                     {
  161.                         "type":"texture",
  162.                         "file_name":"$(path_prefix)_normal.png",
  163.                         "output":3,
  164.                         "conditions":"$(connected:normal_tex)"
  165.                     },
  166.                     {
  167.                         "type":"texture",
  168.                         "file_name":"$(path_prefix)_depth.png",
  169.                         "output":4,
  170.                         "conditions":"$(connected:depth_tex)"
  171.                     },
  172.                     {
  173.                         "type":"texture",
  174.                         "file_name":"$(path_prefix)_sss.png",
  175.                         "output":5,
  176.                         "conditions":"$(connected:sss_tex)"
  177.                     },
  178.                     {
  179.                         "type":"template",
  180.                         "file_name":"$(path_prefix).tres",
  181.                         "template":"godot.tres.tmpl"
  182.                     }
  183.                 ]
  184.             },
  185.             "Unity": {
  186.                 "export_extension":"mat",
  187.                 "uids":6,
  188.                 "files": [
  189.                     {
  190.                         "type":"texture",
  191.                         "file_name":"$(path_prefix)_albedo.png",
  192.                         "output":0,
  193.                         "conditions":"$(connected:albedo_tex)"
  194.                     },
  195.                     {
  196.                         "type":"template",
  197.                         "file_name":"$(path_prefix)_albedo.png.meta",
  198.                         "template":"unity.png.meta.tmpl",
  199.                         "file_params": {
  200.                             "uid":"$(uid:0)",
  201.                             "srgb":"1",
  202.                             "normal":"0"
  203.                         },
  204.                         "conditions":"$(connected:albedo_tex)"
  205.                     },
  206.                     {
  207.                         "type":"texture",
  208.                         "file_name":"$(path_prefix)_metal_smoothness.png",
  209.                         "output":6,
  210.                         "conditions":"$(connected:roughness_tex) or $(connected:metallic_tex)"
  211.                     },
  212.                     {
  213.                         "type":"template",
  214.                         "file_name":"$(path_prefix)_metal_smoothness.png.meta",
  215.                         "template":"unity.png.meta.tmpl",
  216.                         "file_params": {
  217.                             "uid":"$(uid:1)",
  218.                             "srgb":"1",
  219.                             "normal":"0"
  220.                         },
  221.                         "conditions":"$(connected:roughness_tex) or $(connected:metallic_tex)"
  222.                     },
  223.                     {
  224.                         "type":"texture",
  225.                         "file_name":"$(path_prefix)_normal.png",
  226.                         "output":7,
  227.                         "conditions":"$(connected:normal_tex)"
  228.                     },
  229.                     {
  230.                         "type":"template",
  231.                         "file_name":"$(path_prefix)_normal.png.meta",
  232.                         "template":"unity.png.meta.tmpl",
  233.                         "file_params": {
  234.                             "uid":"$(uid:2)",
  235.                             "srgb":"0",
  236.                             "normal":"1"
  237.                         },
  238.                         "conditions":"$(connected:normal_tex)"
  239.                     },
  240.                     {
  241.                         "type":"texture",
  242.                         "file_name":"$(path_prefix)_height.png",
  243.                         "output":8,
  244.                         "conditions":"$(connected:depth_tex)"
  245.                     },
  246.                     {
  247.                         "type":"template",
  248.                         "file_name":"$(path_prefix)_height.png.meta",
  249.                         "template":"unity.png.meta.tmpl",
  250.                         "file_params": {
  251.                             "uid":"$(uid:3)",
  252.                             "srgb":"1",
  253.                             "normal":"0"
  254.                         },
  255.                         "conditions":"$(connected:depth_tex)"
  256.                     },
  257.                     {
  258.                         "type":"texture",
  259.                         "file_name":"$(path_prefix)_occlusion.png",
  260.                         "output":9,
  261.                         "conditions":"$(connected:ao_tex)"
  262.                     },
  263.                     {
  264.                         "type":"template",
  265.                         "file_name":"$(path_prefix)_occlusion.png.meta",
  266.                         "template":"unity.png.meta.tmpl",
  267.                         "file_params": {
  268.                             "uid":"$(uid:4)",
  269.                             "srgb":"1",
  270.                             "normal":"0"
  271.                         },
  272.                         "conditions":"$(connected:ao_tex)"
  273.                     },
  274.                     {
  275.                         "type":"texture",
  276.                         "file_name":"$(path_prefix)_emission.png",
  277.                         "output":2,
  278.                         "conditions":"$(connected:emission_tex)"
  279.                     },
  280.                     {
  281.                         "type":"template",
  282.                         "file_name":"$(path_prefix)_emission.png.meta",
  283.                         "template":"unity.png.meta.tmpl",
  284.                         "file_params": {
  285.                             "uid":"$(uid:5)",
  286.                             "srgb":"1",
  287.                             "normal":"0"
  288.                         },
  289.                         "conditions":"$(connected:emission_tex)"
  290.                     },
  291.                     {
  292.                         "type":"template",
  293.                         "file_name":"$(path_prefix).mat",
  294.                         "template":"unity.mat.tmpl"
  295.                     }
  296.                 ]
  297.             },
  298.             "Unreal": {
  299.                 "export_extension":"tres",
  300.                 "files": [
  301.                     {
  302.                         "type":"texture",
  303.                         "file_name":"$(path_prefix)_albedo.png",
  304.                         "output":0,
  305.                         "conditions":"$(connected:albedo_tex)"
  306.                     },
  307.                     {
  308.                         "type":"texture",
  309.                         "file_name":"$(path_prefix)_orm.png",
  310.                         "output":1,
  311.                         "conditions":"$(connected:ao_tex) or $(connected:roughness_tex) or $(connected:metallic_tex)"
  312.                     },
  313.                     {
  314.                         "type":"texture",
  315.                         "file_name":"$(path_prefix)_emission.png",
  316.                         "output":2,
  317.                         "conditions":"$(connected:emission_tex)"
  318.                     },
  319.                     {
  320.                         "type":"texture",
  321.                         "file_name":"$(path_prefix)_normal.png",
  322.                         "output":10,
  323.                         "conditions":"$(connected:normal_tex)"
  324.                     },
  325.                     {
  326.                         "type":"texture",
  327.                         "file_name":"$(path_prefix)_height.png",
  328.                         "output":8,
  329.                         "conditions":"$(connected:depth_tex)"
  330.                     }
  331.                 ]
  332.             },
  333.             "albedo": {
  334.                 "export_extension":"png",
  335.                 "files": [
  336.                     {
  337.                         "type":"texture",
  338.                         "file_name":"$(path_prefix).png",
  339.                         "output":0,
  340.                         "conditions":"$(connected:albedo_tex)"
  341.                     }
  342.                 ]
  343.             }
  344.         },
  345.         "parameters": [
  346.             {
  347.                 "default": {
  348.                     "a": 1,
  349.                     "b": 1,
  350.                     "g": 1,
  351.                     "r": 1
  352.                 },
  353.                 "label": "Albedo",
  354.                 "name": "albedo_color",
  355.                 "type": "color"
  356.             },
  357.             {
  358.                 "control": "None",
  359.                 "default": 1,
  360.                 "label": "Metallic",
  361.                 "max": 1,
  362.                 "min": 0,
  363.                 "name": "metallic",
  364.                 "step": 0.01,
  365.                 "type": "float"
  366.             },
  367.             {
  368.                 "control": "None",
  369.                 "default": 1,
  370.                 "label": "Roughness",
  371.                 "max": 1,
  372.                 "min": 0,
  373.                 "name": "roughness",
  374.                 "step": 0.01,
  375.                 "type": "float"
  376.             },
  377.             {
  378.                 "control": "None",
  379.                 "default": 1,
  380.                 "label": "Emission",
  381.                 "max": 1,
  382.                 "min": 0,
  383.                 "name": "emission_energy",
  384.                 "step": 0.01,
  385.                 "type": "float"
  386.             },
  387.             {
  388.                 "control": "None",
  389.                 "default": 1,
  390.                 "label": "Normal",
  391.                 "max": 10,
  392.                 "min": 0,
  393.                 "name": "normal",
  394.                 "step": 0.01,
  395.                 "type": "float"
  396.             },
  397.             {
  398.                 "control": "None",
  399.                 "default": 1,
  400.                 "label": "Ambient occlusion",
  401.                 "max": 1,
  402.                 "min": 0,
  403.                 "name": "ao",
  404.                 "step": 0.01,
  405.                 "type": "float"
  406.             },
  407.             {
  408.                 "control": "None",
  409.                 "default": 0.5,
  410.                 "label": "Depth",
  411.                 "max": 1,
  412.                 "min": 0,
  413.                 "name": "depth_scale",
  414.                 "step": 0.01,
  415.                 "type": "float"
  416.             },
  417.             {
  418.                 "control": "None",
  419.                 "default": 0,
  420.                 "label": "Subsurf. scatter.",
  421.                 "max": 1,
  422.                 "min": 0,
  423.                 "name": "sss",
  424.                 "step": 0.01,
  425.                 "type": "float"
  426.             },
  427.             {
  428.                 "default": 11,
  429.                 "first": 6,
  430.                 "label": "Size",
  431.                 "last": 12,
  432.                 "name": "size",
  433.                 "type": "size"
  434.             }
  435.         ]
  436.     },
  437.     "type": "material_export"
  438. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement