2

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?

TJHeuvel
  • 123
  • 3
  • 3
    Somewhat related https://blender.stackexchange.com/questions/30738/how-can-i-morph-a-flat-plane-to-be-a-flat-cirlce/93180#93180 Thats the projection, so similarly to https://blender.stackexchange.com/a/185949/15543 can map the texture space of the circle -> square UV space. – batFINGER Oct 20 '20 at 13:24

1 Answers1

2

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

jachym michal
  • 31,744
  • 5
  • 55
  • 115
  • 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. – TJHeuvel Oct 20 '20 at 13:50
  • 1
    No problem :). If you get stuck anywhere else, feel free to ask. Good luck with your project. – jachym michal Oct 20 '20 at 14:01
  • One question, how do you get a live preview of the texture? – TJHeuvel Oct 20 '20 at 14:42
  • 1
    Upper right corner of viewport, switch to Material Preview :) https://imgur.com/a/U5pvDE8 – jachym michal Oct 20 '20 at 14:48