# Decal Modification: Solid Rectangle to Rectangle Border?

**URL:** <https://forums.unrealengine.com/t/decal-modification-solid-rectangle-to-rectangle-border/724578>\
**Category:** Blueprint\
**Tags:** decal, unreal-engine, Decals, Blueprint, question\
**Created:** [December 9, 2022, 7:04am UTC](https://forums.unrealengine.com/t/decal-modification-solid-rectangle-to-rectangle-border/724578 "2022-12-09T07:04:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moose13](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/moose13/32/590066_2.png) [@Moose13](https://forums.unrealengine.com/u/Moose13)\
**Post date:** [December 9, 2022, 7:04am UTC](https://forums.unrealengine.com/t/decal-modification-solid-rectangle-to-rectangle-border/724578/1 "2022-12-09T07:04:17Z")

</div>

I’ve created a selection marquee that uses a decal to show the space the player is selecting. I’m trying to change it from a solid rectangle to simply the border of the rectangle, preferably with a constant border thickness. This is what I have right now.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/1/9b1074fe9d7aab7307bce51df5f75e361a4a89ef.png)

I’ve seen videos where they use a Radial Gradient Exponential, then subtract another with a smaller radius to create a donut-like circle (see below). This is essentially what I’m trying to do but with a rectangle rather than a circle. Any idea how to do this?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/2/7f2de950ba16482b09c55310adae7a49a832fd48.png)

---

<div class="post-metadata">

**Author:** ![JediKnightChan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jediknightchan/32/1156960_2.png) [@JediKnightChan](https://forums.unrealengine.com/u/JediKnightChan)\
**Post date:** [June 19, 2024, 6:07pm UTC](https://forums.unrealengine.com/t/decal-modification-solid-rectangle-to-rectangle-border/724578/2 "2024-06-19T18:07:05Z")

</div>

Simple math allows to calculate dimensions for rectangle which will be extracted from another to form the border.

Option 1: pixel width of the border

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/8/3/883aa68f8a8663199ba84f93ed9bf3d71b7eff93.png)

Option 2: percent border, by normalizing on max of width and scale

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/c/37c960a9f67345858a7164a959f67bf1ac169417.png)
