0

I am attempting to create UVs for a series of 3D brush strokes. I only have the mesh data which is built like amorphous tubes as seen in the images below.

If I were doing just a few of these I suppose I would define a seam and unwrap, however I have hundreds of these strokes so this is not feasible.

Anyone have ideas of how I can create some cylindrical UV coordinates out of these meshes?

Thanks! enter image description here

My idea was to try to generate a spline along this path and then generate UVs from that, but I do not know how I can do that!

Edit:

So I was able to get part of the way there, using this tutorial (which is very good): https://www.youtube.com/watch?v=02XNGOVpSV4

However I still have some issues:

  1. This method uses world normal to generate the seam, which doesn't produce a very nice result. I would like to somehow intelligently generate one of my texturecoords along a spline that would pass through the middle of this geometry (I don't care about the other axis as much)
  2. This adds the generated UVs to a namedAttribute, which I am not able to set as an actual UV map. See this issue here: How to convert UVMap attribute to UV map in blender 3.6

enter image description here

nturley
  • 43
  • 3
  • How, exactly, are you generating your 3D brushstrokes? It would, of course, be more convenient if there was a route to splines at modelling-time... – Robin Betts Aug 23 '23 at 07:02
  • @RobinBetts Absolutely. They are exports from Tiltibrush I believe... I will try to find a path that way as well, but curious to see if I could do it from Mesh alone... – nturley Aug 23 '23 at 14:28
  • This is something I've been playing with.. so far I've found unreliable hacks, that's all.. I think there's no completely unambiguous definition of the spine of a 3D stroke, working backwards. I hope to be contradicted, of course :) – Robin Betts Aug 23 '23 at 15:03
  • @RobinBetts It is definitely an ill defined problem :)

    It's sorta like finding the centroid along the volume and creating a curve. Obviously deciding which way is "up" would be an issue, but I feel like there should be a way to at least trace along the stroke. Maybe something with ShrinkWrap

    – nturley Aug 23 '23 at 16:16
  • 1
    @RobinBetts If this were a quad mesh, the sort of thing Blender would make, I would select edge ring along length, use "select edge loops" to get all of the circumferential loops, scale to 0 along individual origins, and merge by distance to recreate the spine of the curve. There are GN techniques whereby you could "bind" this to original positions to identify the tangent vector associated with any particular surface (can't just do sample nearest, risk of getting some other sample, like with self-intersection.) From here, you can use an arbitrary vector to get radial UV. – Nathan Aug 23 '23 at 16:55
  • @Nathan ... yes, that's a thought.. crude spine > smooth > curve > too-big tube > shrinkwrap down normals, then you don't need the good spine. – Robin Betts Aug 23 '23 at 17:28
  • https://blender.stackexchange.com/questions/258246/curve-to-mesh-with-uvs-in-blender-3-x (I should add my methods to this bit I haven't gotten around to it. anyway this should be good if you are using curve to mesh) edit: nvm looks like you are not using curve to mesh – shmuel Aug 23 '23 at 22:57
  • why don't you just manually unwrap it? – shmuel Aug 23 '23 at 22:59
  • @shmuel because there are hundreds of these I would need to do individually – nturley Aug 27 '23 at 00:14
  • so these are not generated in GN? – shmuel Aug 27 '23 at 06:04
  • @shmuel no they were produced with Tiltbrush as mentioned above. Turns out the UVs are fine and the artist just had to re-export. Anyway, still an interesting problem I think! – nturley Aug 27 '23 at 16:52

0 Answers0