logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

UE5 Material Editor Breakdown

Peter Ankermann has released an extensive breakdown of UE5's Material Editor.

Material Editor Settings and Shortcuts

First some mouse settings

All settings and shortcuts I show here are my personal preference, so you may want to change them to fit your needs!

  • go to “Edit” –> “Editor Preferences.”
  • type “pan” in the search field
  • scroll down to “Level Editor – Viewports” and then to controls
  • activate “Invert Middle Mouse Pan” to match Maya’s and Blender’s drag behavior
  • go to the “Content Editor – Graph Editors” then “General Style” section
  • Set “Panning Mouse Button” from “Right” to “Right or Middle” to use the middle mouse to pan in Blueprint and the Material Editor, like in Substance Designer or Blender

Material Editor Shortcuts

  • in the “Editor Preferences” search for “materials” and go to the “Material Editor” section
  • set “Start Previewing Node” to “R”
  • set “Convert to Parameter” to “Ctrl+R”
  • set “Convert to Named Reroute” to “Alt+R”
  • set “Convert to Reroute” to “Shift+R”
  • set “Home” to “Home”
  • set “Select Downstream Nodes” to “Shift+E”
  • set “Select Upstream Nodes” to “Shift+Q”
  • set “Cylinder” to “Ctrl+1” and “Num1”
  • set “Sphere” to “Ctrl+2” and “Num2”
  • set “Plane” to “Ctrl+3” and “Num3”
  • set “Cube” to “Ctrl+4” and “Num4”
  • set “Mesh” to “Ctrl+5” and “Num5”

General Graph Editor Shortcuts

  • in the “Editor Preferences” search for “graph” and go to the “General – Keyboard Shortcuts” then to the “Graph Editor” section
  • set “Collapse Nodes” to “Alt+C”
  • set “Expand Nodes” to “Alt+E”
  • set “Distribute Horizontally” to “Alt+Shift+Q”
  • set “Distribute Vertically” to “Alt+Shift+E”

General Material Editor settings

Adjust Material Editor Viewport settings.

  • open the Viewport Settings in the Material Editor by clicking the button with the icon with the “3 stacked horizontal lines”
  • enable “Realtime”
  • set “Field of View (H)” to “<90” I prefer “60”

Activate useful windows.

  • got to “Window”
  • activate “Find Results”
  • activate “Preview Scene Settings”
  • activate “Parameters”
  • activate “Platform Stats”
  • activate “Stats”
  • go to “Shader Code” and activate “HLSL Code”

Activating Live Update Settings.

  • Click on the “Live Update” icon (TV with circle arrow)
  • activate “Preview Material”
  • activate “Realtime Nodes”
  • activate “All Node Previews”

Material Editor Viewport Shortcuts

Some of my favorite shortcuts of the Material Editor Viewport.

  • Rotate the Background with “K”
  • Rotate the Direction Light with “L”
  • Toggle Ground Plane with “O”
  • Toggle between Background Image and Flat color with “I”
  • Toggle the Post-process with “P”
  • Toggle the Grid with “Ctrl+G” (broken – does not work in UE5)

Spawn Nodes with Custom Shortcuts

By default, it is already possible to spawn numerous nodes with shortcuts in the Material Editor. But I found multiple nodes which I use on a daily basis that didn’t have shortcuts assigned to them. Here I will show you how to assign custom shortcuts to these nodes.

Finding the BaseEditorPerProjectUserSettings.ini file

  • first, close the Unreal Editor!
  • go to your Unreal Engine install folder
  • navigate to the “Engine” and then the “Config” folder
  • open the “BaseEditorPerProjectUserSettings.ini” file
  • search for “MaterialEditorSpawnNodes” or got to line 826 directly
  • scroll down to the last entry of this section
  • paste in the custom shortcut text (see below)
  • save the changes of the *.ini file

Text to past into the *.ini file:

+Node=(Class=MaterialExpressionSaturate Key=S Shift=false Ctrl=false Alt=True)
+Node=Class=MaterialExpressionClamp Key=C Shift=false Ctrl=false Alt=True)
+Node=Class=MaterialExpressionCustom Key=E Shift=false Ctrl=false Alt=True)
+Node=Class=MaterialExpressionDotProduct Key=Period Shift=false Ctrl=false Alt=False)
+Node=Class=MaterialExpressionSubtract Key=Hyphen Shift=false Ctrl=false Alt=False)
+Node=Class=MaterialExpressionCrossProduct Key=X Shift=false Ctrl=false Alt=False)
+Node=Class=MaterialExpressionVertexColor Key=V Shift=false Ctrl=false Alt=True)
+Node=Class=MaterialExpressionVertexNormalWS Key=N Shift=false Ctrl=false Alt=True)
+Node=Class=MaterialExpressionWorldPosition Key=W Shift=false Ctrl=false Alt=False)
+Node=(Class=MaterialExpressionAbs Key=A Shift=false Ctrl=false Alt=True)
+Node=(Class=MaterialExpressionTransform Key=T Shift=false Ctrl=false Alt=True)
+Node=Class=MaterialExpressionTransformPosition Key=T Shift=false Ctrl=True Alt=False)
+Node=Class=MaterialExpressionAppendVector Key=Y Shift=false Ctrl=false Alt=False)

Using the custom shortcuts

Almost done! Just start your Unreal Editor and open the Material Editor! Hold your newly assigned shortcut and click in the Material Graph area. If you did everything alright you then you just spawn a node.

Custom Shortcut List:

  • Saturate = Alt + S
  • Clamp = Alt + C
  • Custom Expression = Alt + E
  • Dot Product = Period key “.”
  • Subtract = Hypen key “-“
  • Cross Product = X
  • Vertex Color = Alt + V
  • Vertex Nomal (World Space) = Alt + N
  • Absolute World Position = W
  • Abs / Absolute = Alt + A
  • Transfrom Vector = Alt + T
  • Transfrom Postion = Ctrl + T
  • Append Vector = Y

Explaining the shortcut code

If you want to add your own shortcuts, first you have to figure out what the name of the node is you want to assign a shortcut to. In most cases, it is just the name of the node but sometimes it differs.
FYI blue Material Function Nodes won’t work with this setup, only the green nodes work!

  • spawn the node you want to assign a key to
  • select this node
  • open the “Detail Panel”
  • the first section name is the name of the node “Material Expression %NodeName%”
  • so for the “Multiply” node, it is “Material Expression Multiply”
  • write this name as “Class=” (without spaces in between the words!)
  • write your shortcut key at “Key=”
  • define modifier keys if you want to

+Node=(Class=MaterialExpression”Node Name” Key=”Shortcut” Shift=false Ctrl=false Alt=False)

Light Vector Without Blueprint

Here I will show you how to get an interactive light vector inside the materials editor without any blueprints.

Custom Node Directional Light Vector Setup

  • create a “Custom” node
  • select the “Custom” node and go to the “Detail Panel”
  • past “return View.DirectionalLightDirection;” into the “Code” field
  • make sure “Output Type” is set to “CMOT Float 3”
  • write in the “Description” field “LightVector” or however you want to call this node
  • remove “Inputs”

And that’s it with this node you can use the “L” shortcut in the Material Editor Viewport to rotate the Light around.

But this also works when you assign the material to an object in you on your map. But keep in mind this only works properly when you only have one directional light at your level.

Custom Node Light Directional Light Color Setup

  • create a “Custom” node
  • select the “Custom” node and go to the “Detail Panel”
  • past “return View.DirectionalLightColor;” into the “Code” field
  • make sure “Output Type” is set to “CMOT Float 3” for just the color
    OR
    set it to “CMOT Float 4” if you want to have the Alpha channel of this DirectionalLight Color as well
  • write in the “Description” field “Light Color” or however you want to call this node
  • remove “Inputs”

Custom Node with Multiple Outputs Setup

  • create a “Custom” node
  • select the “Custom” node and go to the “Detail Panel”
  • past the “Multi-Output Light Vector Code” from below into the “Code” field
  • set the “Output Type” to “CMOT Float 3”
  • write in the “Description” field “Multi Light Vectors” or however you want to call this node
  • remove “Inputs”
  • at “Additional Outputs” create “2” new elements
  • expand “Index 0”
  • write “LC” into the “Output Name” field
  • set “Output Type” to “CMOT Float 4”
  • expand “Index 1”
  • write “SLC” into the “Output Name” field
  • set “Output Type” to “CMOT Float 3”

HLSL code:

// Directional Light Vector Code
return View.DirectionalLightDirection;

// Directional Light Color Code
return View.DirectionalLightColor;

// Multi Output Light Vector Code
float3 LV = View.DirectionalLightDirection;
LC = View.DirectionalLightColor;
SLC = View.SkyLightColor.rgb;
return LV;

You can read the original article by clicking this link. Also, don't forget to join our new Reddit pageour new Telegram channel, our Discord, follow us on Instagram and Twitter, where we are sharing breakdowns, the latest news, awesome artworks, and more.

Join discussion

Comments 1

  • Anonymous user

    Tips &tricks make the job easier. Thanks

    0

    Anonymous user

    ·3 years ago·

You might also like

We need your consent

We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more