November 2025

Tool Brick

I developed a start-to-end procedural LEGO building tool for Unreal, with 900+ parts that snap together by their studs, and released it on GitHub.

Emmet's bedroom built from LEGO bricks, warm light from an arched window falling across a studded yellow floor, with a bed, a red wardrobe, a bike, a computer on a round table and a digital clock reading 12:01

Breakdowns

  1. A folder of grey 128px part thumbnails beside the terminal logging each download
    01Python and LDraw dataI scripted a filter that sifts LDraw's 23,000+ parts down to 900+ common LEGO parts.
  2. The underside of a quarter round part in Houdini, green points marking every anti-stud position
    02Procedural LEGO partsI used a PDG network to batch generate parts and their stud positions with a raycast algorithm.
  3. Rows of 2 x 2 bricks in every solid, transparent, glitter, pearl and metallic colour against a blue sky
    03The Unreal toolsetI built an Editor Utility Widget in Unreal to browse, colour, place and snap LEGO parts in the editor.
  4. A low angle across Emmet's studded LEGO floor towards the bed, a green blanket catching the lamp light and the clock reading 12:01 behind it
    04Emmet's apartmentI rebuilt Emmet's apartment from The LEGO Movie brick by brick with my own tool, in 5 hours including lighting and camera.

Overview

Tool Brick is an Unreal Engine 5 tool for building environments out of LEGO bricks inside the editor. I made it over 8 weeks for my final year Advanced Specialism module at Escape Studios and released it on GitHub. It’s aimed at rendered work like brickfilms, but could be adapted for real-time use.

It started as a reaction to LEGO’s brick-by-brick mode in Unreal Editor for Fortnite, which gives you around 50 preset parts and a clean look that suits Fortnite (Epic Games and LEGO Group, 2025). I wanted brick-by-brick control with the realism of The LEGO Movie (The LEGO Movie, 2014) instead, scratches and fingerprints included. Animal Logic built the film’s sets in LEGO Digital Designer (Fxguide, 2015), and my idea as a technical artist was to move that step into the engine, so artists don’t have to export, import and set up parts by hand.

The pipeline uses Python to collect, analyse and sort the LDraw part library, filtering it down to 900+ suitable parts in one JSON part list. A Houdini PDG network then builds every part’s mesh with LDraw2Houdini and raycasts each one to find its studs where possible. In Unreal, an Editor Utility Widget lets artists search the parts, pick from 73 colours and snap bricks together by their studs, with every brick slightly scaled and offset so the build isn’t too perfect.

To finish, I used the tool to rebuild the bedroom of Emmet’s apartment from The LEGO Movie part by part, which took 5 hours including the lighting and render work.

Timelapse of building a set from The LEGO Movie with Tool Brick.

Download

Everything is on GitHub under a CC BY-NC 4.0 licence, including an Unreal 5.5 project with the tool, the generated part library and the showcase level. You can also download my full written breakdown.

The showcase walks through the browser, colours, snapping, the test levels and the apartment.

The setup guide runs through every Python stage on camera.

Reflections

I hit every goal I set myself at the start, from the editor tool through to an environment built with it. The biggest weakness was building it all in Blueprint. Editor utilities and JSON handling were difficult to do, as support for them was lacklustre, and I often hit limitations and kept having to write workarounds. Written in C++, it would probably have been a smaller tool, but a much better integrated one.

If I came back to it, I’d move the snap handles inside the brick as components, and generate parts on request through Houdini Engine or similar instead of baking the whole library up front, so there’s no friction outside the engine. I’d add support for importing the common LEGO set formats straight into Unreal: LDraw’s .ldr and .mpd, BrickLink Studio’s .io and Mecabricks’ .zmbx. I’d also like to build the smaller tools I dropped from my original brief to focus on the core, like placing fences, rocks and walls from a few settings instead of brick by brick.

Tool Brick wouldn’t have been possible without LDraw (LDraw.org, 2002) and Stefan Müller’s LDraw2Houdini (Müller, 2023). The thumbnails come from Rebrickable, the surface textures in the master material are credited on the Unreal toolset page, and everything else is credited on the project’s GitHub.

Tool Brick is released under the CC BY-NC 4.0 licence.

LEGO® is a registered trademark of the LEGO Group, which does not sponsor, endorse or authorise this tool. Visit the official LEGO website at lego.com.

Sources