Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Depth output to Normal Map node #544

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 63 additions & 5 deletions addons/material_maker/nodes/normal_map2.mmg
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@
"from_port": 0,
"to": "switch",
"to_port": 0
},
{
"from": "math",
"from_port": 0,
"to": "gen_outputs",
"to_port": 1
},
{
"from": "gen_inputs",
"from_port": 0,
"to": "math_2",
"to_port": 1
},
{
"from": "math_2",
"from_port": 0,
"to": "math",
"to_port": 0
}
],
"label": "Normal Map",
Expand Down Expand Up @@ -96,6 +114,10 @@
{
"node": "edge_detect_1",
"widget": "amount"
},
{
"node": "math",
"widget": "default_in2"
}
],
"longdesc": "The strength of the normal map filter",
Expand Down Expand Up @@ -137,8 +159,8 @@
{
"name": "gen_outputs",
"node_position": {
"x": -458.663818359375,
"y": 73.04736328125
"x": -320,
"y": 120
},
"parameters": {

Expand All @@ -148,8 +170,14 @@
"group_size": 0,
"longdesc": "Shows the generated normal map",
"name": "Normal",
"shortdesc": "Output",
"shortdesc": "Normal",
"type": "rgb"
},
{
"longdesc": "The corresponding depth map ready to be connected to the material",
"name": "Depth",
"shortdesc": "Depth",
"type": "f"
}
],
"seed": -6314,
Expand All @@ -158,8 +186,8 @@
{
"name": "gen_inputs",
"node_position": {
"x": -1147.91015625,
"y": 77.9473648071289
"x": -1200,
"y": 140
},
"parameters": {

Expand Down Expand Up @@ -336,6 +364,36 @@
},
"seed_int": 0,
"type": "ensure_greyscale"
},
{
"name": "math",
"node_position": {
"x": -600,
"y": 380
},
"parameters": {
"clamp": false,
"default_in1": 0,
"default_in2": 1,
"op": 2
},
"seed_int": 0,
"type": "math"
},
{
"name": "math_2",
"node_position": {
"x": -820,
"y": 380
},
"parameters": {
"clamp": false,
"default_in1": 1,
"default_in2": 1,
"op": 1
},
"seed_int": 0,
"type": "math"
}
],
"parameters": {
Expand Down