I often need to make straight a piece of photogrammetry or just a photo I want to project onto certain regular geometry . With "straightening" I mean something irregular and slightly deformed to become something having equal intervals and X/Y alignment typical for a texture. A baroque building facade for example or a road turn armco rail.
Through years i used:
1) mesh deform in Photoshop or puppet warp( inconvenient as hell , never precise,)
2) mesh deform brush in Zbrush with a transparency slider and a grid on desktop picture
3) retopo of flat plane with image in 3d max or Blender > uv projection > straightening horizontal and vertical loops.> setting equal intervals > ortho render . Too much of a hassle in a word
4) Draw vector curves in Affinity > export as SVG > chat GPT python script . ( slow and never worked fine)
5) mesh deform in Substance painter ( same as in Photoshop . inconvenient, tedious)
Does anyone know an easy simple way ? Like putting a few vector curves on an image ( not a mesh ) and have it perfectly straight and regular? Blender addon or just a nice geometry node rig to do it maybe? AI that would work not only on a pattern/fabric details. Maybe Designer node where I could put an arbitrary number of points that turn into vertical and horizontal curves and it would output perfect deforming UV .
It's one of those things you thought would be convenient soon 30 years ago but it never did. If I missed it please point it to me.
Replies
https://renderhjs.net/shoebox/textureRipper.htm
You can download it here for free: https://renderhjs.net/shoebox/
Shoebox was built on Adobe Air, which was then sold off to Samsung, so the runtimes are now here: https://airsdk.harman.com/runtime
- Just post an actual test case of a element you are currently in the process of straightening out. That way you'll get actual practical solutions matching your need, rather than just suggestions.
It only takes minutes and is doable in any 3d software without the need for any specialized toolkit (which would be likely limited to perspective correction alone and wouldn't let you straighten out a bent object). And since you get a regular, real mesh as a result, further edits are possible even before the final 2d touchups - like duplicating bolts, copy-pasting bits here and there, and so on.
Yeah that's precisely why I think this barebones approach is interesting IMHO, as while the first pass involves straightening things on Z after placing the meshing, a later second pass is is always possible. Points can be added as needed and they can be fine-tuned either in UV space or in 3D space (or both).
This is a mesh transformed into curves
Corners are preserved in the conversion to curves by being marked with a Boolean x Point attribute so they get temporarily split. You may need to tweak the Corner Angle option in the 2D Triangular Remesher group. This group was created by Higgsas, you can get it there in his tris to quads file.
I'm using Catmull Rom because they're very convenient and will keep the corners without extra work. You'll have to check out the attributes of other types of splines to recreate them in a way they match the results you'd get with a true Curve object if you want to use other types, then figure out the best approach to keep corners. Attributes example for a default NURBS:
It's possible to create a quads mesh instead, Higgas has a handy patch node group for this, but you'll have to either hunt it down in the thread or just buy his nodes, which are great.
You can unwrap it in many ways, my favorite is to position it over a 0-1 plane with the image (could be the same you're tracing over) and capture the vertices positions relative to it as the UV. Then you pick how you'll straighten the mesh, by hand, geonodes, whatever.