Is there a way to

… select an edge loop or a single edge and create a stroked line in a texture map?

What I’m trying to do is select a bunch of specific edge loops and/or edges and somehow create a texture map from that selection and apply it to the UVs. Does that make sense? I’m lazy so I don’t want to manually paint over my model to get the desired result.

1 Like

It’s possible, I do it all the time - it’s just a bit of pain if you didn’t set up your UVs right. What you have to do is unwrap your UVs, select one face per island and align each of the four edges to X or Y to straighten it perfectly, select the whole island, unwrap > follow active quads. Fix overlap as needed, now each face is perfectly straight. Now you can make an image texture that’s half white and half black. Move everything into the white, move edges over to the black until you have the lines you want. You can use the black and white image as a mix factor between your shaders and the line color

2 Likes

Sounds like a plan. So I can select loops/edges in the 3d view and move those in the UV window into the black area?

Yep that should work

It works perfectly … if I stay within Blender. However, I need the original UVs to remain intact so that I can use them in another program, like Daz or Unreal Engine. Is that possible?

You can make a secondary UV map for this and leave the original UVs alone, I’m not sure how that’ll affect the export process though

1 Like

Would this be a good candidate for UDIMS?

Probably? I haven’t actually tried it but I can see how that would be useful here

Certainly, beyond what I play with but many apps support UDIMs now and would enable a single UV map while splitting islands into separate texture maps, just a thought anyway.

1 Like

Here is what I’m trying to create (I manually painted all those lines, but they are uneven and the process was quite tedious over multiple texture maps).

I’ve done something similar with Vertex Painting (set up the edges you want in a Vertex Group, and in Vertex Paint do a paint-all thing) but I can’t look it up right now, I’ll try to get back to this later today if you still need it then. But for export you’d bake the vertex painting and then overlay it on the original texture/UV.

Edited to add: not that I’m recommending StackExchange these days, but there’s some info here from me using this method for a displacement map (but it should also work for what you’re doing).

1 Like

I tried that before, but I don’t know enough about Vertex Painting to get a nice, solid line… there’s a blend between the selected vertices and those adjacent to them. Guess that’s how Vert Paint works?

Check out the StackExchange ask I linked to above, I detailed methods that didn’t work for what I was trying to do, but might be what you want (“Using a Subdivision modifier thickened / rounded all of it, as did assigning a low Weight to the Vertex group and Paint > Vertex Color from Weight”). Can’t get into more right now, sorry.

The way to get perfectly vectorized lines is with my method- it gives perfect lines regardless of resolution, and it should work with export using UDIMs. A slight variation on that method is to keep your original UVs, fill with black, scale them down individually (S > I), texture paint fill all of them white, scale them back up, now each face you scaled has a black border- however, it’s not a vectorized line like you get with the alignment method

1 Like

Tried various weights and none seem to get a nice solid line. Model was already subdivided, so I’m not sure if adding more levels of subdivision will help.

1 Like

I’ll keep trying this to see if I can work out a method that works efficiently. Selecting faces might require me to paint out the edges that I don’t want.

Is one of these what you’re looking for?

RoundcubeEdgeLines001.blend (1.3 MB)

RoundcubeEdgeLinesBeveled001.blend (1.8 MB)

Those are quick workups from the files I was doing this with about a year ago – if one of those methods is what you need the material can be baked/exported.

This could work. I’d have to alter the geometry somewhat where the lines cross, which I’m reluctant to do since it would affect any shape keys that I have.

Remember what @joseph said above – make the geometry changes on a copy of your model, then bake the texture and use it on the real one. Also, IIRC, on the sharp-cornered one, in Edit mode I beveled the entire vertex group all at once, it wasn’t a massive slog. (The bevel modifier didn’t help while really beveling the geometry did, don’t know why.)

Quick tip if you haven’t worked with vertex groups much – it’s a good selection-save, I recomend asigning your selected edges to the vertex group frequently.

Good ideas here. It works on a large portion of the model, but certain areas need extra attention, which I’m not willing to spend time on. It’s a shame that my real job doesn’t leave me a lot of time for my hobbies. :frowning_face:
I’ll keep working on it.

1 Like