# How to transform uv to radial shape

**URL:** <https://forums.unrealengine.com/t/how-to-transform-uv-to-radial-shape/388207>\
**Category:** Rendering\
**Tags:** uvs, unreal-engine, geometry, UE4, question, Blueprint\
**Created:** [March 17, 2017, 2:32pm UTC](https://forums.unrealengine.com/t/how-to-transform-uv-to-radial-shape/388207 "2017-03-17T14:32:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SbingBong](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SbingBong](https://forums.unrealengine.com/u/SbingBong)\
**Post date:** [March 17, 2017, 2:32pm UTC](https://forums.unrealengine.com/t/how-to-transform-uv-to-radial-shape/388207/1 "2017-03-17T14:32:36Z")

</div>

I’m looking for a way to take world position coordinates masked to R & G (x,y) and feed it into the custom uvs property so it makes a texture sample near zero width at the top and wrap into itself at 360 degrees. I’ve been scratching my head for awhile. I’m stuck on the idea that y is probably distance of x,y to origin, and x is multiplied by the distance but everything I try is a mess.

In essence

 ![130512-top.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/8/f08f7a1df8808dee862a905b7cf50c4ee636591d.jpeg)

becomes

![130513-conicalgradient_gradient1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/7/c4794a82e5d62616b90752595fdddb369b3100ae.png)

---

<div class="post-metadata">

**Author:** ![ScottSpadea](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scottspadea/32/1194682_2.png) [@ScottSpadea](https://forums.unrealengine.com/u/ScottSpadea)\
**Post date:** [March 17, 2017, 4:17pm UTC](https://forums.unrealengine.com/t/how-to-transform-uv-to-radial-shape/388207/2 "2017-03-17T16:17:22Z")

</div>

in trigonometry, this problem is known as “converting from Cartesian to polar coordinates”

[![](http://pietermans.com/blog/wp-content/uploads/2014/04/polarCoordsGraph.png) ](http://pietermans.com/blog/wp-content/uploads/2014/04/polarCoordsGraph.png)

> **[Polar Coordinate Material Function](https://forums.unrealengine.com/showthread.php?1663-Polar-Coordinate-Material-Function)**
>
> So I’ve been playing around with this to test material functions. There’s a slight error at the top middle where the texture wraps radially. Looks like the I’m getting values of something like 0.01 to 0.99...

> **[Converting To and From Polar / Spherical Coordinates Made Easy](https://blog.demofox.org/2013/10/12/converting-to-and-from-polar-spherical-coordinates-made-easy/)**
>
> As a game developer there is just too much darn stuff to learn. You could spend your entire life learning things and never know it all. It’s a blessing in that you are seldom bored, but also …

[https://www.mathsisfun.com/polar-cartesian-coordinates.html](https://www.mathsisfun.com/polar-cartesian-coordinates.html)

---

<div class="post-metadata">

**Author:** ![SbingBong](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SbingBong](https://forums.unrealengine.com/u/SbingBong)\
**Post date:** [March 17, 2017, 8:07pm UTC](https://forums.unrealengine.com/t/how-to-transform-uv-to-radial-shape/388207/3 "2017-03-17T20:07:15Z")

</div>

Thanks! That’s awesome, I had a feeling the x^2+y^2 = r^2 circle formula would be in it but I couldn’t derive the whole thing myself. Also another case of not knowing the right search terms.

---

<div class="post-metadata">

**Author:** ![koroshino](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/koroshino/32/1022378_2.png) [@koroshino](https://forums.unrealengine.com/u/koroshino)\
**Post date:** [November 16, 2023, 8:45pm UTC](https://forums.unrealengine.com/t/how-to-transform-uv-to-radial-shape/388207/4 "2023-11-16T20:45:44Z")

</div>

For anyone landing on this question in 2023, there’s a built-in node for this called the VectorToRadialValue. Drop that into your material, grab the radial coordinates and connect that to your texture map and you’re set.

---

<div class="post-metadata">

**Author:** ![SleepyRatSquad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SleepyRatSquad](https://forums.unrealengine.com/u/SleepyRatSquad)\
**Post date:** [February 21, 2024, 8:28pm UTC](https://forums.unrealengine.com/t/how-to-transform-uv-to-radial-shape/388207/5 "2024-02-21T20:28:33Z")

</div>

2024 update - the built in node VectorToRadialValue works, but it gives a nasty seam on the side.

I found a better solution in another forum post here - [Polar Coordinate Material Function - #11 by simonschreibt](https://forums.unrealengine.com/t/polar-coordinate-material-function/1496/11)

I copied the graph from the image posted there and I get a seamless radial material.
