3
$\begingroup$

Blender's remesh tool produces a mesh of quad faces, but the vertices range from 3 to 5 connected edges. For example:

enter image description here

I'd like to be able to remesh so that every vertex has 4 connected edges, so that the mesh is a simple grid. This would be an easier topology for me to work with.

Is there a way to do that? If so, why doesn't remesh do that by default? If it isn't possible, what's the difficulty?

$\endgroup$
3
  • $\begingroup$ I can't see from the image exactly what you are trying to remesh, but you might be better using a projected shrink-wrap modifier. Sorry not to have a more direct answer. $\endgroup$ Commented Mar 21, 2015 at 17:08
  • $\begingroup$ I shrinkwrapped a pointcloud (lidar data from a fumarolic ice cave on an antarctic volcano). The shrinkwrapping caused serious distortions in the mesh, so I'm remeshing and the remeshed shrinkwrap is what's pictured above. You're right that the vertex to edge connectivity is actually exactly what I want after the shrinkwrapping (for a grid, I'd start with a subdivided cube). However, I need to remesh in order to eliminate the mesh density and distortion problems, and remeshing leaves me with this undesirable topology. $\endgroup$ Commented Mar 21, 2015 at 17:28
  • $\begingroup$ @foobarbecue try Remove_Doubles with small distance(to eliminate small faces ) then convert to quads again (to eliminate resulting tris) $\endgroup$
    – Chebhou
    Commented Mar 21, 2015 at 19:21

2 Answers 2

1
$\begingroup$

The Remesh modifier only generates quads.
If you need proof, select your object and with the remesh modifier applied, run this script.

import bpy

for polygon in bpy.context.object.data.polygons:
    print(len(polygon.vertices))

It will print out the number of vertices for each face in the selected object.

Even for areas that look like triangles, they really are quads just with vertices doubled up. In this gif, I move two vertices that are doubled up in a mesh with the remesh modifier applied.
animated gif

$\endgroup$
1
  • 1
    $\begingroup$ the problem was not in the quads, it is in the vertices shared between more than 4 quads , he wants a grid-like mesh $\endgroup$
    – Chebhou
    Commented Mar 21, 2015 at 21:53
1
$\begingroup$

This is a script I made a few weeks ago to solve this problem, it doesnt work 100% but it removed about 20% of redundant typology from models I tried it on, however I also found out they did the same with the remesh in sculpt mode so not sure if it will be of use to anyone anymore but here it is

import bpy
import bmesh


def ShowMessageBox(message = "", title = "Message Box", icon = 'INFO'):

    def draw(self, context):
        self.layout.label(text=message)

    bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)

def edges_count(v):
    i = 0
    return len(v.link_edges)

def deselect_all(bm):
    for v in bm.verts:
        v.select = False

def get_linked_total(value,f):
    i = 0
    for v in f.verts:
        if edges_count(v) == value:
            i = i + 1
    return i

def center(co,co2):
    return ((co.x+co2.x)/2,(co.y+co2.y)/2,(co.z+co2.z)/2) 
me = bpy.context.object.data

bm = bmesh.from_edit_mesh(me)

i = 0


for f in bm.faces:

    #probable candidate
    if len(f.verts) == 4 and get_linked_total(3,f) == 2:

        if edges_count(f.verts[0]) == 3 and edges_count(f.verts[2]) == 3:
            i = i + 1
            list = [f.verts[0],f.verts[2]]
            bmesh.ops.pointmerge(bm,verts = list,merge_co = center(f.verts[0].co,f.verts[2].co))

        elif edges_count(f.verts[1]) == 3 and edges_count(f.verts[3]) == 3:
            i = i + 1
            list = [f.verts[1],f.verts[3]]
            bmesh.ops.pointmerge(bm,verts = list,merge_co = center(f.verts[1].co,f.verts[3].co))



bmesh.update_edit_mesh(me)


ShowMessageBox(("found faces "+str(i)), "Incorrect faces", 'INFO')

Before script

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .