forked from blender/blender
Export to MatX various Texture nodes #5
No reviewers
Labels
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: DagerD/blender#5
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "matx-add-tex-nodes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose
Add support for various Texture nodes.
Technical steps
Added support for:
Projection
property is not supported for now.NodeParser::create_node
DECLARE_PARSER_OVERRIDE
Note for reviewers
Principled BSDF has warning in console for HdRPR, but validating
doc
on Blender side gives correct input without issues:Checker Texture has warning in console for HdRPR (and MatX viewer also), but I didn't any differences with standard implementation of
checkerboard
in MaterialX.@ -353,0 +359,4 @@
int v = socket.default_value_typed<bNodeSocketValueFloat>()->value;
res.value = MaterialX::Value::createValue<int>(v);
return res;
}
Override
get_input_default
in SH_NODE_TEX_NOISE and move this code there.@ -353,0 +366,4 @@
float v = socket.default_value_typed<bNodeSocketValueFloat>()->value;
res.value = MaterialX::Value::createValue<MaterialX::Vector2>({v, v});
return res;
}
Same here
@ -0,0 +10,4 @@
NodeItem TexCheckerNodeParser::compute()
{
NodeItem texcoord = create_node("texcoord", "vector2", true);
change create_node() signature accessory->noname = true
@ -0,0 +66,4 @@
NodeItem color2 = get_input_value("Color2");
res.set_input("fg", color1.to_color3());
res.set_input("bg", color2.to_color3());
res.set_input("mix", ifequal);
Rewrite this using new math functions
@ -0,0 +14,4 @@
NodeItem scale = get_input_value("Scale");
NodeItem position = texcoord * scale;
NodeItem detail = get_input_value("Detail");
NodeItem lacunarity = get_input_value("Lacunarity");
Use following order:
Made code improvements, tested - works good