I've been making some modular assets lately and I've been running into some weird cases that I've had to handle in weird ways. I tend to deal with individual "cells" in which the roof or walls or ground are given different their own modules to just wedge together similar to how a 2D tilemap may work but when it comes to elements that depend on two or more "cells"(for corners or stairs for instance) I run into some little issues. Particularly for "holes" like for doors or windows and such. Which piece would get the "window" or "door" or should it just be its own element all together or should each "side" just have their own half of the cavity?
I've also ran into moments when I'd have to push the modular wall piece inwards just go allow thickness such as if I have to add a room which would also require me to make little corner piece modules to handle the intermediate parts
I feel I might be missing the point of using modular assets to limit drawcalls and memory by being unsure of what specific cases merit me making a new modular bit and also just what all should be grouped together into one modular chunk while still keeping the pieces flexible enough to be used someplace else.
Replies
This way, you can easily combine modules even for more complicated and bigger structures. It also makes for easyly fitting inside corners. However, you need one extra piece for the outside of those corners. T-junctions or X-junctions are also possible easily.
For your door/windows issue: I normally made modules with both sides in one piece, which then also had the window in it. You could however, also make the window a seperatepiece for increased modularity and variety.
However, all this probably also depends on your specific case. If you have a module whose outside surface is never seen, dont include it...
Thanks by the way!
It might be personal preference and might depend on the situation (e.g. size of the structure), but I would not shift the modules away from the grid but rather make corner pieces.
However, in contrast to what you showed with the blue modules, I would just include the very edge to them. (Basically substracting the red module from the blue.)
http://www.thiagoklafke.com/modularenvironments.html
I don't see a lot of material on designing concise modular pieces for interior/exterior environments beyond some sealed-in interior or placing rocks around to recreate a cliff face. They tend to account for an only-exterior or only-interior but not much that are similar to some GTA-like environments.
The original idea I had for this environment for example was to have these inner wall pieces with windows that never escape the 500x500x500 module grid "cell".
And the outer side of the wall would just be its own module that would make use of some "window contact point" that would favor the interior piece to have the window geometry.
Only to later extrapolate that this would involve making small convex corner wedges for each wall type and is almost never seen from the interior besides possibly the window sill while still demanding an extra drawcall which is when I figured that just giving the interior wall the entire window piece would be better but this tug of war of who gets what and how is eating away at the previous information on modular environments I've used.