I have a mesh for a procedurally generated maze, in which there are, due to overlapping walls, a large number of superfluous vertices along the walls and corners.

(Edit: Actually, the walls are all individual, slightly overlapping cuboids, so maybe I should try some boolean operation like union on them?)

(Edit2: See below for the .blend file)

Is there an easy way to remove all of these so that I am left only with the straight planes? I thought I could use something like limited dissolve or the Decimate modifier, but I can't get these options to work. (Not sure what I am doing wrong, but applying them either does nothing or causes the mesh to go out of shape).

enter image description here

Here is the .blend file: maze.blend

  • 2
    $\begingroup$ There isn't an easy way to fix it after generation. This is much more easily done in the maze generation code. $\endgroup$ – JakeD Dec 5 '16 at 21:04
  • $\begingroup$ @pycoder I am starting to think you are right. Do you have any information on how to do this? $\endgroup$ – mydoghasworms Dec 6 '16 at 6:07
  • $\begingroup$ It will vary greatly depending on the code you have, but you should be looking into the bmesh module to build the geometry rather than duplicating a prebuilt object into different locations. If you don't want to bother with bmesh, try from_py_data() $\endgroup$ – JakeD Dec 6 '16 at 12:33
  • $\begingroup$ @pycoder Well, I actually generated the data for the maze as a .obj file from Ruby using the data for a maze, then imported the .obj into Blender. So I have been trying to figure out how to 'walk' the maze to produce the walls without overlaps. Is there perhaps an algorithm to do this? $\endgroup$ – mydoghasworms Dec 6 '16 at 14:36
  • $\begingroup$ There are a ton of ways to do this; I built an advanced maze generator for Blender a while back, but I can't share code because of licensing issues. It shouldn't be too difficult to figure out though...try "fixing" it by hand, and I think you'll get the point of what you should be trying to accomplish. $\endgroup$ – JakeD Dec 6 '16 at 15:10

I have tried to mimic your scene and this worked quite well for me... so maybe it is worth to try:

EDIT: It looks like this method works only for a simple model like in my example, if it is more complex scene, you need to divide it into smaller parts otherwise the Remesh modifier does not reconstruct the model properly.

  1. Join all blocks into one mesh
  2. Add Remesh modifier, untick Remove Disconnected Pieces and play with the Octree Depth to get the initial shapes
  3. Add Decimate modifier - planar
  4. Apply modifiers

enter image description here

Then just apply that last modifier (the gif was too big to upload so I had to cut it there).

The result should look like this: enter image description here

  • $\begingroup$ Thanks for the answer, but I didn't manage to come right following these steps. I have added the .blend file to my question. Would you care to have a look? $\endgroup$ – mydoghasworms Dec 6 '16 at 5:01
  • $\begingroup$ Scratch that, I missed where you said to play with the Octree depth. I did get my shape back, but the first time it caused Blender to hang and I did not have Remove Disconnected Pieces unticked. Now it seems better, but it takes a long long time on my computer. $\endgroup$ – mydoghasworms Dec 6 '16 at 5:11
  • $\begingroup$ So, after the remesh, I go from having 968 verts and 726 faces to having over 200,000 of each. I'm not sure this is going to help me. As @pycoder says, it may be better to try and calculate the faces and verts correctly during the generation. $\endgroup$ – mydoghasworms Dec 6 '16 at 5:25
  • 1
    $\begingroup$ I can confirm that it is not working with your scene, it looks like it is too comples for the remesh modifier (you can split it into several parts of course but then it starts to be more manual work). Maybe you could try to use Solidify, check Only rim and decrease Thickness to get planes only, then remove doubles, Decimate Planar and Extrude faces back. But this won't give you the exact dimensions. But still I am sure someone finds the a solution :) $\endgroup$ – Jan Kadeřábek Dec 6 '16 at 10:13
  • $\begingroup$ You would have much more success with this method if you disable "remove disconnected pieces" on the remesh modifier. Still it is probably too complicated for this maze. $\endgroup$ – JakeD Dec 6 '16 at 15:15


  • Join all objects (Ctrl+J), in edit mode (Tab) select all vertices except top rim and delete them (X)
  • enable addon TinyCAD and with all vertices selected press (W) > Tiny CAD > XALL Intersect Selected Edges
  • remove doubles by Merge by Distance (Alt+M), Delete (X) > Limited Disolve
  • Fill (F), select and Delete (X) the biggest face
  • add Solidify Modifier > Thickness 1.5

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.