# How to scale a texture's UV 'from' the center?

**URL:** <https://forums.unrealengine.com/t/how-to-scale-a-textures-uv-from-the-center/340332>\
**Category:** Rendering\
**Tags:** uv, unreal-engine, question\
**Created:** [December 2, 2015, 7:16pm UTC](https://forums.unrealengine.com/t/how-to-scale-a-textures-uv-from-the-center/340332 "2015-12-02T19:16:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![SVR33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svr33/32/906589_2.png) [@SVR33](https://forums.unrealengine.com/u/SVR33)\
**Post date:** [December 2, 2015, 7:16pm UTC](https://forums.unrealengine.com/t/how-to-scale-a-textures-uv-from-the-center/340332/1 "2015-12-02T19:16:31Z")

</div>

So, this is something I’ve run into several times… I’m trying to create a simple ‘zoom’ effect within a dynamic material and want to be able to scale a texture’s UV’s while it maintains its position, centered in the material (as opposed to locking to the top left corner and wrapping or tiling).

Does anyone know a way to do this?

![69079-scale&centeruv.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/6/0/860ef92a2d4f515293531e95abf1d6f6b53cdc48.gif)

---

<div class="post-metadata">

**Author:** ![Lovecraft\_K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lovecraft\_K](https://forums.unrealengine.com/u/Lovecraft_K)\
**Post date:** [December 2, 2015, 8:00pm UTC](https://forums.unrealengine.com/t/how-to-scale-a-textures-uv-from-the-center/340332/2 "2015-12-02T20:00:33Z")

</div>

Hi SVR33 -

We have a Material Function in the Engine called ScaleUVsbyCenter which you can search for in the Material Editor.

Thank You

Eric Ketchum

---

<div class="post-metadata">

**Author:** ![SVR33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svr33/32/906589_2.png) [@SVR33](https://forums.unrealengine.com/u/SVR33)\
**Post date:** [December 2, 2015, 8:02pm UTC](https://forums.unrealengine.com/t/how-to-scale-a-textures-uv-from-the-center/340332/3 "2015-12-02T20:02:56Z")

</div>

Holy smokes… I even looked in there for something named exactly like that! Not sure how I missed it. Thank you so much, Eric!

---

<div class="post-metadata">

**Author:** ![RobertRamsay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RobertRamsay](https://forums.unrealengine.com/u/RobertRamsay)\
**Post date:** [December 7, 2018, 10:12am UTC](https://forums.unrealengine.com/t/how-to-scale-a-textures-uv-from-the-center/340332/4 "2018-12-07T10:12:05Z")

</div>

would be interesting to know the math involved in that, I need it for something else.

---

<div class="post-metadata">

**Author:** ![TristanPiejn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tristanpiejn/32/1067648_2.png) [@TristanPiejn](https://forums.unrealengine.com/u/TristanPiejn)\
**Post date:** [February 28, 2019, 4:44pm UTC](https://forums.unrealengine.com/t/how-to-scale-a-textures-uv-from-the-center/340332/5 "2019-02-28T16:44:42Z")

</div>

How would you scale UVs from a given position? As for example (0.7 , 0)?

---

<div class="post-metadata">

**Author:** ![SVR33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svr33/32/906589_2.png) [@SVR33](https://forums.unrealengine.com/u/SVR33)\
**Post date:** [February 28, 2019, 5:03pm UTC](https://forums.unrealengine.com/t/how-to-scale-a-textures-uv-from-the-center/340332/6 "2019-02-28T17:03:45Z")

</div>

Take a look at the function Eric mentioned. I’m not at my computer at the moment, but I’m fairly certain it takes a vector 2 “position” input (which is 0.5, 0.5 by default)

---

<div class="post-metadata">

**Author:** ![SVR33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svr33/32/906589_2.png) [@SVR33](https://forums.unrealengine.com/u/SVR33)\
**Post date:** [February 28, 2019, 7:32pm UTC](https://forums.unrealengine.com/t/how-to-scale-a-textures-uv-from-the-center/340332/7 "2019-02-28T19:32:16Z")

</div>

Got back to my computer to realize that wasn’t right… try “ScaleUVsAroundPoint” function instead.

---

<div class="post-metadata">

**Author:** ![Osiris2000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Osiris2000](https://forums.unrealengine.com/u/Osiris2000)\
**Post date:** [March 23, 2019, 2:32pm UTC](https://forums.unrealengine.com/t/how-to-scale-a-textures-uv-from-the-center/340332/8 "2019-03-23T14:32:54Z")

</div>

If your center = [0.5;0.5], then  
((UV-[0.5;0.5])\*Scale)+[0.5;0.5]  
Another words, you just move Center Point to [0;0], scale it and return it to its initial position.
