Using Named Re-Route Declaration Nodes in Materials (Unreal Engine 5)

<p>This is a very quick article about using re-route declaration nodes in Unreal Engine when creating materials that I think will help some folks avoid spaghetti when creating their materials!</p> <p>First off, what is a named re-route declaration node? Well, starting with Unreal Engine 4.27 and continuing in Unreal Engine 5, the named re-route node basically allows you to store material logic in a single node and reuse it as an input in your result node. For you blueprint scripters out there, it&rsquo;s basically like promoting a property to a variable so that you can use it later.</p> <p>Here&rsquo;s how it works!</p> <p>To create a named re-route node, you just need to drag off of the pin that you wish to create one from, and type in &ldquo;named reroute&rdquo;.</p> <p>In this case, I&rsquo;m using a Material Function that creates an SDF (soft distance field) Box, and I want to store the SDF in a re-route node and use it somewhere else in my code.</p> <p>All I have to do is drag off of the output, start typing &ldquo;named reroute&rdquo; and there will be a suggestion from the Utility dropdown for adding a &ldquo;named reroute declaration node&rdquo;.</p> <p><a href="https://medium.com/@christopherguyton87/using-named-re-route-declaration-nodes-in-materials-unreal-engine-5-9140647edb9d"><strong>Click Here</strong></a></p>
Tags: Unreal Engine