Breakdown 3 of 4
The Unreal toolset
I built an Editor Utility Widget in Unreal to browse, colour, place and snap LEGO parts in the editor.
Overview
The toolset is the last stage of the pipeline and the only part of Tool Brick an artist uses directly. It’s an Editor Utility Widget (EUW) built with Unreal’s Editor Scripting Library, entirely in Blueprint, and it opens from a Tool Brick tab on the menu bar. It reads the imported JSON part list from the Python stage and the meshes and stud positions from Houdini. I built an MVP with the browser, placement and colours first, had it playtested, and used the feedback to add stud snapping, toggles and a saved state.
The part browser
A data table imports the part list JSON and finds each part’s mesh and thumbnail in the content browser. The widget makes a UMG tile for each part, with a search box and a category dropdown on top. To keep it responsive, the part objects are cached the first time they’re created, and tiles are only built for parts that match the current search. Finding parts with keywords is much easier and faster than in the content browser. Parts without a thumbnail get a crossed-out placeholder.



Bricks
Clicking a tile raycasts from the editor camera, places the brick on the first surface the viewport is looking at and selects it straight away so you can move it. This stands in for drag and drop, which an EUW can’t do.
Rendering at scale
Before choosing how to render the bricks I looked at how LEGO games handle them. Gameloft built LEGO Star Wars: Castaways using LEGO Digital Designer, then merged the bricks into final meshes with greedy meshing and drew the studs with a shader on a flat plate that faces the camera (Ichim and Taillon, 2023). Studio Gobo used Nanite for LEGO Horizon Adventures on high-end platforms, since it suits detailed geometry like studs (Cormack, 2025). For Switch they built procedural Levels of Detail (LODs) (Verstraete, 2025) and, building on Gameloft’s approach, raytraced each stud in a pixel shader on a camera-facing card (Cormack, 2025).
To keep the scope manageable, I aimed the tool at rendered work rather than real time, so I kept to the simpler end of that. Every part is a Blueprint holding its mesh as an instanced static mesh (ISM), letting Unreal batch copies of the same part, and uses Nanite to keep all their stud detail while staying cheap to render.


Grid and imperfection
Bricks snap to a 10 x 10 x 4 grid, one stud across and one plate high, which the Houdini page explains. Even with this, real bricks are never placed perfectly and are made slightly undersized to leave some tolerance between them, so every brick is scaled down to 0.99 and given a small random offset in position and rotation. BrickNerd’s Oscar Cederwall shows the weird results of this in a blog post about studs-not-on-top building (Cederwall, 2022).

These settings can be adjusted on each brick, although they aren’t expected to be changed. The values below showcase what this looks like:
Brick’s parameters
BP_Brick
- Part
- Grid
- Imperfection
- float
- bool
- vector
- string
- random stream
Colours
LEGO has released hundreds of colours, so I used BrickLink’s colour guide (LEGO Group, 2024) to decide which to include. A colour had to be from the main LEGO series, in current production and used on more than 100 parts, or be an active special colour. I also used BrickLink’s colour names throughout, since different platforms often name the same colour differently. This process left me with 73 colours:
The swatches are laid out as top-down bricks, like BrickNerd’s Chris Clarke laid out the 2023 palette, and Chris’s research into each colour’s hex code is what got the swatches the actual LEGO colours (Clarke, 2023).

Each colour is its own material instance, which also lets Unreal batch them. Studio Gobo instead stored the palette in one lookup and gave each brick a colour ID, so a single model could be painted brick by brick (Cormack, 2025). That suits a game with player customisation, but in an editor tool where every brick is its own actor, material instances were simpler. The active colour applies to whatever you place next, and the part tiles are tinted to match. With a brick selected, clicking a swatch recolours that brick too.
The master material
The colours share two master materials, an opaque one for the solid colours and a translucent one for the transparent ones. For realism I relied on Stefan Müller, the creator of LDraw2Houdini (Müller, 2023), who has been studying LEGO materials since 2016 and breaks down what makes a brick look real on Stefan’s CG Blog (Müller, 2019). Not all of it works in real time without baking textures for every part, so I took the parts that do: the roughness breakup, scratches, dust and fingerprints.

The surface textures are ambientCG’s Smear 002 (ambientCG, 2018), Cornelius Dämmrich’s glossy maps (Dämmrich, 2025), Chris Spooner’s film dust textures (Spooner, 2018) and TextureCan’s fingerprint texture (TextureCan, 2024). Most are directly from Stefan’s CG Blog.
Playtesting
Testers of the MVP wanted to place bricks off the grid and snap them together by their studs, see which colour they had selected, have the tool remember its state, and get more categories to search by, and I addressed each of these.
Stud snapping
When you select a brick, the tool spawns a snap handle based on the stud type at every position the Houdini network found, and you can move the brick from any of them. Once you pick one, handles that can’t connect to it are removed, and clicking one of the rest snaps the two bricks together by those studs. A small data table decides which stud types can connect to which.
Toggles and saved state
Four toggles switch the main behaviours on and off, and the widget saves their state to JSON so closing the editor doesn’t reset them:
- Recolouring - Selected bricks change to the new colour when one is picked from the palette. Turning it off lets me pick a colour for the next brick without repainting the current selection.
- Grid snapping - Bricks snap to the brick grid as they move. Turning it off allows free placement for bricks that sit off the grid.
- Stud selection - Selecting a brick spawns its stud handles. Turning it off keeps the viewport clear when I only want to move bricks.
- Stud snapping - Clicking a second handle snaps the two bricks together by those studs. Turning it off lets me select handles without the bricks jumping into place.

Tool Brick widget’s parameters
ToolBrickConfig.json
- Browser
- Toggles
- bool
- int
- string
Reflections
- Snap handles as actors - Each handle is its own Blueprint actor attached to the brick as a child actor, and anything with a lot of studs, like a big baseplate, gets laggy to move. Turning Stud selection off stops the lag, but the proper fix is moving the handles into the brick Blueprint as a dedicated component.
- No Nanite for translucent parts - Nanite doesn’t support translucent materials, so transparent colours cost more than solid ones and are best used sparingly in a big build. Traditional LODs for them are the likely fix, like the procedural LODs Studio Gobo generated for LEGO models (Verstraete, 2025).
- Real-time use - The tool targets rendered work. For a game, merging bricks and drawing studs in a shader, as Gameloft and Studio Gobo did, would be the next step.
- The limits of Blueprint - In C++, bricks wouldn’t need a Blueprint just to hold their instanced mesh or need to store variables as public parameters on it, the tool could read the mouse position for proper drag and drop, and the JSON could be read back efficiently.
There are a few small bugs left, like an unnecessary warning when you delete a brick while its handles are showing (due to the Blueprint child actor being attached), and part tiles without a thumbnail sometimes picking up the colour tint when you scroll.
Sources
ambientCG (2018). Smear 002. [online] Available at: https://ambientcg.com/view?id=Smear002 [Accessed 24 Nov. 2025].
Smear texture in the master material.
Cederwall, O. (2022). LEGO SNOT Basics: Geometry, Techniques and Pitfalls. [online] BrickNerd. Available at: https://bricknerd.com/home/snot-basics-geometry-techniques-and-pitfalls-3-18-2021 [Accessed 23 Nov. 2025].
Breakdown of the odd sizes and tolerances in LEGO geometry.
Clarke, C. (2023). The LEGO Color Palette: 2023 Edition. [online] BrickNerd. Available at: https://bricknerd.com/home/the-lego-color-palette-2023-edition-1-24-23 [Accessed 23 Nov. 2025].
The swatch layout, and the hex codes for the solid colours.
Cormack, A. (2025). Rendering a Scalable Brick Based World. [online] Digital Dragons. Available at: https://www.dropbox.com/scl/fi/xk98gs5wjruh17jyo16xq/Ali_DD_25_3.pptx?rlkey=hhcbw8sff1sm34s5ovssbji14&st=iyq2b73k&dl=0 [Accessed 6 Oct. 2025].123
How Studio Gobo rendered LEGO Horizon Adventures.
Dämmrich, C. (2025). 8k Tileable Glossy Maps. [online] Gumroad. Available at: https://corneliusdammrich.gumroad.com/l/OYhL [Accessed 24 Nov. 2025].
Smudge and scratch maps in the master material.
Ichim, A. and Taillon, F. (2023). Technical Artist Summit: 'LEGO Star Wars: Castaways': Building an All-Brick World. [online] GDC Vault. Available at: https://gdcvault.com/play/1029333/Technical-Artist-Summit-LEGO-Star [Accessed 6 Oct. 2025].
Gameloft's studs drawn by a shader on a flat plate, which Studio Gobo built on.
LEGO Group (2024). Color Guide. [online] BrickLink. Available at: https://v2.bricklink.com/en-us/catalog/color-guide [Accessed 23 Nov. 2025].
Which colours made the cut, and their names.
Müller, S. (2019). Exploring LEGO Material Part 3. [online] Stefan's CG Blog. Available at: https://stefanmuller.com/exploring-lego-material-part-3/ [Accessed 23 Nov. 2025].
What makes a brick look real, and the basis for the master material.
Müller, S. (2023). ldraw2houdini: Import LDraw Files Directly into Houdini. [online] GitHub. Available at: https://github.com/stefanmuller/ldraw2houdini [Accessed 23 Nov. 2025].
The HDA that turns LDraw part files into meshes.
Spooner, C. (2018). 30 Free Film Dust Textures to Add Dirty Effects to Your Work. [online] Spoon Graphics. Available at: https://blog.spoongraphics.co.uk/freebies/30-free-film-dust-textures-add-dirty-effects-work [Accessed 24 Nov. 2025].
Dust texture in the master material.
TextureCan (2024). Fingerprint Imperfection Texture. [online] Available at: https://www.texturecan.com/details/212/ [Accessed 24 Nov. 2025].
Fingerprints in the master material.
Verstraete, S. (2025). LEGO Horizon Adventures: Procedural Optimization. [online] YouTube. Available at: https://www.youtube.com/watch?v=VoXLoRFRDvY [Accessed 6 Oct. 2025].12
Studio Gobo's procedural LODs for LEGO models.