Block Structure: Removing interior faces only

voxel-art
modeling
(Alan47) #1

Hi,

I have a (quite simple) model which is composed of 1x1x1 unit blocks (a voxel structure). Those blocks were joined into a single model and had their doubles removed.

Please find an example in this blend file: blocks.blend (552.8 KB)

My question is: how do I get rid of the internal faces?

I know that there is Select -> Select All By Trait -> Interior Faces. The problem is that it doesn’t work in this case. For many faces, all four vertices which make up the external face also contribute to internal faces and thus are selected by this operation. The issue is that the external face is then also selected (that’s just how selection in blender works).

There is also this question on stackexchange which is essentially what I would like to do as well, however it has gone unanswered since 2014 (!!).

I also tried a different approach, by modeling the cubes as object and then using the BoolTool Addon to compute the union of all cubes, but unfortunately the result is a complete mess.

Any advice on this matter would be much appreciated.

0 Likes

(colkai) #2

I’m not precisely sure what you are after here. Do you want to retain the faces within the structure, including their vertices? Or do you want only the exterior faces, or hte exterioir faces plus interior vertices? Or do you want to keep the general shape and remove the interior?
Here’s the permutations I’m guessing on.
Lwyer 4 holds the latter option, where I used selecting a poly the shift+g co-planar, hide & repat until left with the “interior” faces, select all and delete faces.blocks1.blend (690.7 KB)

EDIT: Note, choosing shift+G ‘normal’ is no good as that selects ALL faces in that orientation, “co-planar” select only faces at that relative position.

0 Likes

(Way) #3

I would just recreate this model from scratch if this is your final model. Deleting all these interior faces by hand will take longer and i don’t think you can automate this (at least not in vanilla blender). You don’t need to use booleans just simply extrude these 4 (3x3 faces) inwards and that’s it.

0 Likes

(Alan47) #4

@colkai Sorry I should have been more precise. I want to keep the entire “surface” intact, only remove the faces which are not visible. Think of the structure as the walls and floors/ceilings of a building. There’s no point in having faces inside the walls. At best it would only consume more RAM in a 3D engine than required, at worst it would cause strange artifacts during the rendering.

@Way I see your point, but I’m actually designing a building, with interior and exterior at the same time. I really don’t want to mess with the topology during this process, so placing down quads was way easier. The problem is: I can’t unify those quads and end up with clean geometry at the moment.

Just in case that we don’t end up with an in-blender solution: I’m using a very neat open-source program called MagicaVoxel to do the quad modeling right now. When I’m done with that, I’ll just need to export the model from MagicaVoxel (e.g. as an *.obj) and re-import it in Blender.

0 Likes

(Mariusz Sukiennik) #5

I’m probably understanding you incorrectly. since I am a huge newbie when it comes to blender

but the example “blocks.blend” is easy fix by going Alt+Z, going top (num 7), orto (num 5) selecting faces,then going around the exterior and deselecting those faces, X - delete FACES

Sorry to waste your time if its incorrect (issue)

Mod_T_blocks.blend (546.6 KB)

0 Likes

(Alan47) #6

Ok so I want to be super precise here, since there seem to be a lot of misunderstandings. The following screenshot was taken from the blend file I provided earlier:

I’ve hidden all non-relevant parts in this image. Note the four selected vertices. All four of them are necessary to create the desired 3D shape/structure. The problem is that they also form a face. This face is within the wall - it will never be visible, it does not contribute anything to the appearance of the model. It is mereley a source of error for any renderer.

Here is what I would like it to be:

The vertices are still in place, the overall shape is intact, but the face (which is internal to the wall) has been removed.

Of course, this can be done manually for every instance of the problem. However, since I intend to place a few ten-thousand blocks and then merge them, doing this manually is not really an option.

I hope the problem is a bit more clear now.

0 Likes

(colkai) #7

Do any of the results in the blend file I attached to my reply above do the job? Or are you looking to retain the inner edge structure and just remove the faces?
If so, follow what I suggested to get the reult on layer 4, but instead of ‘delete faces’ choose ‘only faces’, which should retain the edges & vertices but not the faces of those interior faces.
If you want both faces & edges removed, then layer4 should be what you were after.

0 Likes

(JA12) #8


One way is to

  • select some faces on each surface
  • select linked flat faces with ctrl+alt+shift+F
  • invert selection and delete faces
  • non-manifold geometry messes with linked flat faces and there still are interior faces left, which can be found by selecting non-manifold in vertex select mode
  • and delete faces in that selection

Or, if the actual size is not important but that the result is blocks, could use boolean to get the form and remesh to get the blocks. Scale the boolean object
blocks_ja12.blend (114.7 KB)

1 Like

(colkai) #9

This, I did not know, chalk up another thing I have learned! :slight_smile:

Edit: I am guessing this differs from Co-Planar in as much sa the latter does not need the faces to be directly connected, simply at that position relatively.
By the way, yes, it would actually be way faster to rebuild this than to remove the errant faces.

0 Likes

(Alan47) #10

Thanks for the tips & tricks folks! I learned a few neat features today.

Alas, the game engine I’m going for seems to disagree (heavily, lol) with the idea of having the entire building as one big model - I’ll need to break it down after all (for different reasons, including lighting and collisions).

0 Likes

(colkai) #11

That’s going to a pain as “donkey work” is the only way to remove those inner faces, so if you need to do that a lot, it’s gonig to be time consuming.

0 Likes