2
$\begingroup$

I'm a programmer who's trying to get into modeling, but i'm having a hard time achieving the effect i want, in the way i'd like to.

I have a circular mesh, on this i'd like to project a square texture. Using a custom shader i can easily overwrite the UV values to roughly what i want, namely the length of the local vertex positions xy.

Result, using shader

However i'd like to just export the mesh with the correct UV's, but i cant wrap my head around how, what they should be. This is roughly what i got going at the moment: blender

I think i want the top vertices to have V 1, and the bottom vertices V -1, same with X. But i dont know how to set the correct value for each vertex. How do i know what selection in the UV view corresponds to what vertex in the world? Is there a better way to go about achieving the effect i want? Maybe the mesh should be triangulated differently, with a vertex in the center?

$\endgroup$
1

1 Answer 1

2
$\begingroup$

You can use a triangle fan, and simply reset the UV map.

  1. Use a circle with a triangle fan (one vertex in center)
  2. UV > Reset
  3. Rotate and Scale the UV map

Done.

enter image description here

$\endgroup$
4
  • $\begingroup$ Thank you very kindly, this is exactly what i wanted to achieve! It took me a little while to figure out how to create a triangle fan, but that can be done in version 2.9, in the Modeling tab > Add > Mesh > Circle and then in the menu in the bottom left set the Fill Type to Triangle Fill. $\endgroup$
    – TJHeuvel
    Oct 20, 2020 at 13:50
  • 1
    $\begingroup$ No problem :). If you get stuck anywhere else, feel free to ask. Good luck with your project. $\endgroup$ Oct 20, 2020 at 14:01
  • $\begingroup$ One question, how do you get a live preview of the texture? $\endgroup$
    – TJHeuvel
    Oct 20, 2020 at 14:42
  • 1
    $\begingroup$ Upper right corner of viewport, switch to Material Preview :) imgur.com/a/U5pvDE8 $\endgroup$ Oct 20, 2020 at 14:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .