Modular walls and pillars - how to make them actually fit?

I need help… I have ‘design’ problem… how to design pillars and walls that one can assemble in game engine without z-fighting as in the below image:

Ideas I have right now:

  1. make pillars 0.01cm higher on top/bottom
  2. pretend the problem don’t exist
  3. merge those in blender with correct topology (the problem here is that there are too many combinations - I have 23 pillar types and 24 wall variants - that would mean loads of combinations)

Grant in the course used something in-between 1 and 3 (he joined objects and moved top of a wall a bit). His solution is not ideal as you cannot stack such modules on top (e.g. light will bleed through gaps) and there is some ‘hidden’ and overlapping geometry.

Edit: More context: I’m doing this to fully learn and experience doing ‘asset pack’. So the assumption is I don’t have control over the camera, or level design or how it will be really used. Ofc I cannot cover all possible use cases, but the more I support the bigger utility.

1 Like

Go with 2! Who is going to see it here time you have a floor and celling set up too, it will all be inside one or other of those. Or can be set up so it is. Even as some people do, remove those faces, as the are ‘inside’ the floor or ceiling. Waste of polygons!
I have seen LP tutorials where they remove any internal face, not convinced it saves much but they do it.

1 Like

If you create a ceiling, then no one will see those top faces and can be deleted when you are in a gaming environment, where face count does influence fps speed.

  1. Fit the wall or pillar mesh to allow that type of connection. Like LEGO bricks.

Thanks guys! I added important piece of context to the first post:

It does nothing really. Maybe if you have gazillion of those and use some ancient game engine that will not batch them and do no occlusion culling (or any other optimization technique invented in last 10-20 years). Or you really target some specific hardware, like a low-end phone… or maybe a toaster :wink: .

But there is another reason why removing internal faces is desired (and leaving them is bad practice). Some of those optimization techniques or even just normal displaying in various edge cases breaks down… and you see inside the object. One example is when numerical precision isn’t enough (happens sometimes when looking at objects from some distance and at an angle) the z-sorting algorithm gets confused and you get z-fighting between internal ‘not-visible’ faces and the external ones.

Yeah, that is approach that overall gives best results. But with so many pillars and walls variants it is simply impossible to lego it ;-). Unless I go back to drawing board and redesign the whole thing, with a hope I can find solution that gives enough variety, but without being overwhelming in number of combinations…


Edit:

Another potential solution:

  1. Extend the asset pack with ‘caps’, ‘trims’, etc. (overall elements designed to hide issues like that)

I am leaning more and more toward solution 1) (i.e. making size variations). With maybe adding some of 4). I have to check how other asset packs are built in this regard…

2 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.