This tutorial uses the local spatial value of a material rather than its absolute world position to determine where to slice.
You will create a slice effect by first setting up an emissive node graph to make a solid material, then using the mesh local space and a material function to determine where the slice will happen on the mesh.
Creating the Emissive Node Graph
-
Select the material root node and check the Two Sided option in the Details panel.
-
Open the Blend Mode dropdown menu and select Masked.
-
Add the following nodes to your copied 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 and change the value to 0.75.
This configuration creates the base color and the material response to light for the object the material is assigned to. The next configuration creates an emissive that makes the inside of the mesh appear solid on the interior.
-
Drag off the TwoSidedSign node and connect to the Clamp node, then drag off the Clamp node and connect to the Alpha input on the Lerp node.
-
Double-click the second Constant3vector node and add a color for the interior of the mesh. Then drag off the white pin of the Constant3Vector node and connect to the A input on the Lerp node.
-
Select the Lerp node and set the B input value to 0.0.
-
Drag off the Lerp node and connect to the A input on the Multiply node.
-
Select the Multiply node and change the B input value to 0.3.
-
Drag off the Multiply node and connect to the Emissive Color input on the material root node.
The emissive node graph is complete.
Location Graph
Next, create the location graph that targets the mesh’s location to remove parts of the mesh from the project.
You can copy a node that already uses the emissive graph, delete the part of the graph that you don’t need, then add the necessary node configuration to create an effect.
By targeting the mesh location data, you can use the material to make portions of the mesh disappear. This effect can also be used to create an animation.
Create a material function node by right-clicking in the Material Editor and typing Functions in the search bar. Select the MaterialFunctionCall option. The Unspecified Function node appears in the Material Editor.
You cannot search for a specific material function in the Material Editor, instead you have to create an unspecified material function node and assign a function to it.

Select the Unspecified Function node, and in the Details panel, assign the Local Position material function from the Material Function dropdwn menu. The LocalPosition material funtion node automatically appears in the Material Editor.
Create a second Unspecified Function node and assign the ObjectLocalBounds function to the node.

-
Create and open a new Material Instance.
-
Select the Main Material Node and change the Blend Mode setting to Masked.
-
Add the following nodes to the Material Editor:
-
Divide node
-
Constant3Vector node
-
ComponentMask node
-
Clamp node
-
2 X Constant node
-
2 X Subtract node
-
-
Select the Constant3Vector node and double-click the node to add a color.
-
Drag off the white output pin on the Constant3Vector node and plug into the Base Color input on the Main Material Node.
-
Select the Constant node and set the value to .75.
-
Drag off the Constant node and plug into the Roughness input on the Main Material Node.
-
Drag off the Instance Local Position pin of the Local Position node and plug into the A input on the Divide node.
-
Drag off the Local Bounds Size pin of the ObjectLocalBounds node and plug into the B input on the Divide node.
-
Drag off the Divide node and plug into the B input of the first Subtract node.
-
Change the A input value of the Subtract node to 1.0.
-
Drag off the first Subtract node and plug into the Mask node.
-
Drag off the Mask node and plug into the A input of the second Subtract node.
-
Select the second Constant node and change its value to 0.1.
-
Drag off the Constant node and plug into the Second Subtract node’s B input.
-
Drag off the second Subtract and plug into the White input on the Clamp node.
-
Change the Clamp node’s Max value to 1.0.
-
Select the material root node, in the Details panel change the Blend Mode value to Masked. The Opacity Mask option becomes available on the main root node.
-
Drag off the Clamp node and plug into the Opacity Mask on the material root node.
This is the configuration you should have when the nodes are connected.

When you change the A input value on the first Subtract node, you change the look of the mesh.

This gets the local position of the object (a gradient in X / Y / Z with everything left / below / behind the center of the object negative, and everything right / above / before the center of the object positive). These values are determined by the world scale of the object.
To normalize the values, for example–put them in the [0, 1] range, we divide those values by their maximum extent (as dictated by the object bounds). The 1 - B input flips the direction of the gradient, so the values at the right / top / front are lower than those of the left / bottom / back.
The ComponentMask node is an alternative to the DotProduct node with the blue channel - it gives the same result. You can then subtract the clip value - one of the constants converted to a parameter, as above (which falls within the 0, 1 range), and clamp off any negative values before wiring it to the opacity slot.