Back to videos

Why 3D Walls Look Terrible at Corners - And How to Fix It (Three.js)

Overview

In the previous episode, we solved one of the first big challenges of a 3D home editor: cutting real holes through walls for doors and windows.

In this second devlog, we continue building Pascal, a browser-based 3D home editor inspired by The Sims, and tackle another deceptively simple problem:

Why do 3D walls look terrible at corners?

If you’ve ever built walls by placing boxes from point A to point B, you’ve probably seen overlapping geometry, clipped corners, and broken junctions. In real construction, walls miter together cleanly, regardless of angle or thickness. In Three.js, that behavior has to be built manually.

When Walls Meet

Adding a single wall is easy.

You draw a box between two points and you’re done.

The real problem starts when walls meet.

Add a perpendicular wall and you get an overlap.

Add a diagonal one and suddenly three walls are intersecting in impossible ways.

The first instinct is usually to:

  • Extend one wall

  • Shrink another

  • Let one override the others

These shortcuts fall apart quickly—especially when:

  • Walls have different thicknesses

  • Walls meet at any angle

  • You need predictable, clean geometry for production use

This isn’t a visual issue.

It’s a geometry problem.

In this episode, we solve it properly by:

  • Breaking the problem down in 2D first

  • Visualizing the solution before touching 3D

  • Calculating precise intersection points for wall edges

  • Building clean polygons at junctions

  • Extruding those shapes into real 3D walls

This approach works with:

  • Any wall angle

  • Different wall thicknesses

  • Corners and T-junctions

If you’re building level editors, floor planners, configurators, or any serious 3D tool, this is a foundational problem you need to understand.

Resources/Tech Stack

#threejs #js #devlog

Need help with this tutorial? Join our Discord community!