Home Technical Talk

Interior/Exterior modular tetris

interpolator
Offline / Send Message
DEElekgolo interpolator
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?
7dWPmkf.png

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
Q4tZrXi.png

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.
R5iB4yT.jpg

Replies

  • walkonsky
    Options
    Offline / Send Message
    walkonsky polycounter lvl 11
    I had similar issues with my first (and only so far) set of modular pieces. After trying and failing with several attempts, I decided to lay down one grid for all my pieces (for example 256x256 units). I then made modules (for example a wall) that have exactly this length and a certain thickness that is suitable for a wall. I chose the origin of that wall to be on the grid, while the actual surfaces of both sides of the wall have a certain distance from the imagined grid (both one half of the thickness of the wall to either side of the grid).
    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... ;)
  • DEElekgolo
    Options
    Offline / Send Message
    DEElekgolo interpolator
    Blocked out a quick test. It seems like with the double-wall method the corners just make themselves. Even if I decide not to make a unique corner piece. Even that one convex case could be gimmicked into a corner at the cost of receding from the other part of the grid and shifting everything after that wall that lost space to compensate.
    9luU1VQ.png
    8HwRj09.png
    6Qn9YnD.png
    z5yNrZ6.png

    Thanks by the way!
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    Or just make inner and outer corner pieces.
  • walkonsky
    Options
    Offline / Send Message
    walkonsky polycounter lvl 11
    Yeah, that is how i did it.
    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.)
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
  • DEElekgolo
    Options
    Offline / Send Message
    DEElekgolo interpolator
    Oh I've read that before from the wiki as well as some of Philipk's and the Unreal engine articles on the subject and such. A lot of tutorials and information out there don't really talk of cases that I had mentioned though which extends onto designing how wall are set up or having contact points beyond just the sides that tile(that I thought would have been a possible solution for "who gets the 'window'".
    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".
    gr9ZvNL.png
    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.
    9L25a1v.png
    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.
  • Steppenwolf
    Options
    Offline / Send Message
    Steppenwolf polycounter lvl 15
    I've been working and experimenting with modular pieces a bit lately. The best method i found seems to be to start with an imaginery block and place walls on the outside of that block. That way all your inner pieces (like floors and ceilings) can have the same base dimensions and you only need special pieces for outside wall corners. The pivots for the walls is placed on the inside edge.
Sign In or Register to comment.