I am constructing a ship’s hull. The horizontal lines are not perfectly straight nor are all of them truly horizontal so I cannot select the vertices and then scale them to straighten them out.
I have a screen-grab pic here that shows the hull lines. Looks fairly decent but when I apply a subdivision modifier or just a right-click to “shade smooth” it is too rough.
Is there a process to use that can smooth out these edges? Or is there an addon that can help me with this?
there could be many ways but I’d try one of these 2 first -
1 - duplicate you ship, select all the verts you want to smooth and go vertex - smooth vertices a bunch of times until the edges are nice and even (don’t worry about loosing volume)
2 - select you original ship, shift select the smoothed out one, and in the object data tab under shape keys select join as shapes from the dropdown.
3 - add a corrective smooth modifier to your smoothed ship, (the one with the shape key on)
4 - dial on the shape key all the way to 1 and adjust the corrective modifier
alternatively you can -
1 - same as last time
2 - put a shrinkwrap modifier on the smoothed out ship, select your original as target
3 - play with the shrinkwrap settings, maybe set it to projection (you can use this for a vertex group as well if certain parts are acting up)
I still don’t know why blender hasnt edge constraints like other softwares its why i aware of using it in modelling. Best solution for you - is in adding new cuts with knife and horizontal snapping turned on, then deleting existing edges…
OK, this must be the crappiest looking gifs I have seen in the past 2 decades. Anyway, before putting too much time into fixing your loops it might be worth trying these, you can even do it for just a part of the model by using vert groups, or use them in combination.
Forgive me if I’m missing the point of your post or reading it too simplistically but have you tried selecting the edge loop you want to straighten either by holding down Alt and clicking on an edge of the line of verts you want or selecting the first vert of the line you want to straighten then holding down ctrl and selecting the last vert (this should select all verts inbetween) then just hitting ‘s’, ‘z’, 0 ? You should then have a horizontal line of verts/edges which you may need to tweak slightly on the x or y axis to get your contour back but they should be pretty close.
As far as smoothing goes, it looks a pretty decent mesh it should smooth out by applying shade smooth first then applying a subdiv modifier on level 2.You’ll just need to add additional edge loops near the edges to keep them sharp.
Yes I have alt_left-clicked to select individual lines. But the problem is that even though they appear to be horizontal, they are not. Especially about half way up. Those lines are the locations of each deck level on the ship so I cannot scale them on the z-axis.
I have had some success by going into edit and selecting the vertices and then right-clicking and selecting “smooth vertices.” I am still trying to work out the two methods that Dan2 suggested.
the second one with the shrinkwrap/project is probably a bit faster and seems to work pretty well, at least for starters (you can define that for just the hull with vert groups, even lock certain axis like Z if you want to keep the loops straight) -
I made this super quick script that just does a slightly smarter smoothing, It should work fine for simple meshes, If someone wanna turn it into an addon, feel free.
Edit: there was a small issue on the script but I fixed it now, It wasn’t updating the normals between iterations.
import bpy
import bmesh
from mathutils import Vector
# You can change these variables if you are unsatisfied with the results
REPEAT = 100
STRENGTH = 0.1
ob = bpy.context.active_object
if ob.mode == "EDIT":
bm = bmesh.from_edit_mesh(ob.data)
else:
bm = bmesh.new()
bm.from_mesh(ob.data)
selected_verts = [vert for vert in bm.verts if vert.select]
for _ in range(REPEAT):
new_co = []
for vert in selected_verts:
co = Vector()
for other in (e.other_vert(vert) for e in vert.link_edges):
co += other.co
co /= len(vert.link_edges)
co -= vert.co
co -= co.dot(vert.normal) * vert.normal
co += vert.co
new_co.append(co)
bm.normal_update()
for vert, co in zip(selected_verts, new_co):
vert.co = vert.co * (1 - STRENGTH) + co * STRENGTH
if ob.mode == "EDIT":
bmesh.update_edit_mesh(ob.data)
else:
bm.to_mesh(ob.data)