# Scale gradient based on object size

**URL:** <https://forums.unrealengine.com/t/scale-gradient-based-on-object-size/129707>\
**Category:** Asset Creation\
**Tags:** unreal-engine\
**Created:** [August 9, 2019, 6:42am UTC](https://forums.unrealengine.com/t/scale-gradient-based-on-object-size/129707 "2019-08-09T06:42:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarchasm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sarchasm](https://forums.unrealengine.com/u/sarchasm)\
**Post date:** [August 9, 2019, 6:42am UTC](https://forums.unrealengine.com/t/scale-gradient-based-on-object-size/129707/1 "2019-08-09T06:42:55Z")

</div>

I’m working on a material. As the mesh gets bigger I wanted it to 1) add equally scaled bars and 2) reveal a gradient. So at a radius of 128 it would show only 1/4 of the gradient and at 512 the entire gradient. I got the first part down and I thought I could use some of the same sorts of logic on the gradient heightmap, but I can’t for the life of me make any progress. Below youll see two examples of the material, increasing the scale adds more bars but the color gradient stays the same 1:1.

Any pointers?

---

<div class="post-metadata">

**Author:** ![sarchasm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sarchasm](https://forums.unrealengine.com/u/sarchasm)\
**Post date:** [August 9, 2019, 7:07am UTC](https://forums.unrealengine.com/t/scale-gradient-based-on-object-size/129707/2 "2019-08-09T07:07:32Z")

</div>

Super simple in the end, just had to adjust the UV’s after the gradient and not before.
