Implement BSDF Transparent shader #36

Merged
Bogdan Nagirniak merged 5 commits from BogdanNagirniak/blender:matx-transparent-shader into matx-export-material 2023-09-26 16:16:26 +02:00
Collaborator

Purpose

Implement BSDF Transparent + include and shader's opacity to MatX nodetree.

Technical steps

  1. Added special type NodeItem::Type::SurfaceOpacity to retrieve opacity for <surface> node.
  2. Implemented export of BSDFTransparent node.
  3. Implemented export of opacity component in BSDFPrincipled, Add/Mix shader nodes.

Notes

Storm and RPR hydra delegates aren't working good with opacity, this has to be fixed on delegate/hydra side, therefore those changes won't be visible. Opacity can be checked in MaterialXView or MaterialXGraphEditor of the exported mtlx.

### Purpose Implement BSDF Transparent + include and shader's opacity to MatX nodetree. ### Technical steps 1. Added special type `NodeItem::Type::SurfaceOpacity` to retrieve opacity for \<surface> node. 2. Implemented export of BSDFTransparent node. 3. Implemented export of opacity component in BSDFPrincipled, Add/Mix shader nodes. ### Notes Storm and RPR hydra delegates aren't working good with opacity, this has to be fixed on delegate/hydra side, therefore those changes won't be visible. Opacity can be checked in MaterialXView or MaterialXGraphEditor of the exported mtlx.
Bogdan Nagirniak added 4 commits 2023-09-26 11:35:56 +02:00
Bogdan Nagirniak requested review from Brian Savery (AMD) 2023-09-26 11:41:42 +02:00
Bogdan Nagirniak requested review from Vasyl Pidhirskyi 2023-09-26 11:41:43 +02:00
Georgiy Markelov was assigned by Bogdan Nagirniak 2023-09-26 11:41:51 +02:00
Bogdan Nagirniak self-assigned this 2023-09-26 11:41:51 +02:00
Georgiy Markelov requested changes 2023-09-26 12:30:08 +02:00
Georgiy Markelov left a comment
Owner

n_opacity_luminance is redundant here:

NodeItem n_opacity_luminance = create_node(

`n_opacity_luminance` is redundant here: https://projects.blender.org/DagerD/blender/src/commit/b5e4a4bbad7822e543ab17e080ada2a5fee840cb/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc#L512
@ -103,6 +103,8 @@ std::string NodeItem::type(Type type)
return "surfaceshader";
case Type::Material:
return "material";
case Type::SurfaceOpacity:

Add the same convertion to NodeItem::Type NodeItem::type(const std::string &type_str)

Add the same convertion to `NodeItem::Type NodeItem::type(const std::string &type_str)`
Bogdan Nagirniak added 1 commit 2023-09-26 15:58:06 +02:00
Georgiy Markelov approved these changes 2023-09-26 16:07:02 +02:00
Bogdan Nagirniak merged commit 6e1775d516 into matx-export-material 2023-09-26 16:16:26 +02:00
Sign in to join this conversation.
No Label
No Milestone
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: DagerD/blender#36
No description provided.