# Where should the origin be on modular level pieces?

I really like the idea of modelling pieces of a 3D environment as parts of a modular set and then sticking them together. I would make pieces of wall that were, for arguments sake, 3x3m and then stitch them together.

The thing I can't understand is what happens when you have a level where you can see both the interior and exterior of a wall. If a wall has any thickness then an external corner will be longer than an internal corner which will wreck my grid if I model the interior and exterior walls separately. If I model them together with the origin in the middle of the wall then that destroys the modular advantage by needing to maintain solid (2 sided) versions of the wall.

So my question is how can I model interior and exterior modular walls while still respecting the grid for snapping?

• You might be interested in Oskar Stålberg's advice to model tiles "on the dual grid". So rather than walls cutting along the edges of your grid, think of walls going through the middle of each grid square. Commented Nov 20, 2022 at 23:44
• @DMGregory, Your simplification requires doubling of the grid size.The "dual grid" has no benefit over an offset grid. Let me know if I missed something about that post.
– user122973
Commented Nov 21, 2022 at 3:24
• No, a dual grid is the same size as the original grid. (It is its dual in the graph theory sense) In the case of a square grid, the dual is an offset grid, shifted over by one half tile width. Commented Nov 21, 2022 at 3:40
• @DMGregory a "try at persuading" eh? As soon as I saw that I was already convinced it was a good idea. And I've never heard of it before. Unfortunately my game has object-like interaction with walls and floors, so it's not applicable. Commented Nov 23, 2022 at 14:20

Walls with zero thickness (i.e. plane) should be avoided in most instances, since they don't exist in reality, and on the flip-side the non-displayed wall sides should be culled before render.