How do I make a radial UV texture coordinate map?

Using processing for generating textures like this is a great idea. I’m usually not happy with most methods I’ve tried on the past for doing “data” texture generation. I might have to pay around with it next week.

For actually using the radial uv texture in a real time application you’ll want to do a couple of things. As mentioned in that older blog post you want to set it to be a linear texture. After that you’ll want to disable compression, mip maps and bilinear filtering (use point filtering). This is specifically because of the seam that shows up at the point the angle gradient wraps, if you just need the radial gradient you don’t have to do any of that. That seam will be minimized, but not completely removed at this point. You’ll have gotten rid of the seam caused by mip maps and bilinear sampling softening the edge and adding a small unwanted gradient, but you’ll still have the problem of the GPU mip level calculation seeing a large change between one pixel and the next. I posted a longer explanation on Facebook when this topic came up there, but the ultimate solution is to override the texture sampler uv derivatives with your own values. For Unity this is done by using tex2dgrad, and with Unreal you can enable the option to provide derivatives.

Using a cone mesh gets around the issues with the seam since uv derivatives are calculated per polygon, so the triangle edges where the uv seam would show up doesn’t cause any issues.

4 Likes