Cut Meshes In Half Using Material Graphs
You can create a slice effect by first creating an emissive node graph to create a solid material, then using the mesh world position data and a TransformPosition material node to determine where to cut the mesh.
This material is effective for halving meshes for things like if you want to place a mesh flush against a wall without it bleeding through to the other side, or for creating a maze path for players using a static mesh as a wall piece.
Creating the Emissive Node Graph
You can copy a node that's already using the emissive graph and delete the part of the graph that you don’t need, then add the necessary node configuration to create the effect.
-
Select the material root node and check the Two Sided option in the Details panel.
-
Open the Blend Mode dropdown menu and select Masked1.
-
Add the following nodes to your material by right-clicking in the node graph and searching for the specified name:
- 3 X Constant node
- 2 X Constant 3Vector expression node
- 2 X Clamp node
- Append3Vector node
- WorldPosition node
- Subtract node
- Dot Product node
- Multiply node
- Linear Interpolate node
- TwoSidedSign node
-
Double-click the first Constant3Vector node and add an exterior color to the material.
-
Drag off the white pin from the first Constant3Vector node and plug into the Base Color input on the material root node.
-
Drag off the pin of the first Constant node and plug into the Roughness input on the material root node, then change the value to 0.75.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.