logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

Creating a Realistic Lego Mosaic Generator with Substance 3D & Aseprite

Jared Gula showed us the working process behind the Lego Mosaic Generator project, discussing setting up the parameters for lifelike visualization and conveying the nostalgic feeling of playing with LEGOs using Substance 3D Designer, Aseprite, and Marmoset Toolbag.

Introduction

Hi there! My name is Jared Gula, I am a Material Artist from Massachusetts in the US. I started learning 3D art five years ago when I became interested in making movie intros for big blockbuster films like The Avengers and Star Wars. Through an independent study with my digital media teacher, Stephen Cass, I got to learn Blender, which motivated me to focus on digital art in college.

I always liked video games and had spent a lot of my earlier years making texture packs/mods for 2D games like Minecraft, Geometry Dash, and Terraria, so I decided to combine these two interests and go to school to learn game art at the University of Massachusetts Dartmouth. While there, I quickly grew my 3D skills, making dozens of cinematic renders in the style of Beeple or Max Hay. I quickly discovered I loved learning Blender's shader nodes, and this grew into a love for the whole material process.

My professors at the University, Otto Metzger and Shawn Towne, both encouraged me to learn Substance 3D Designer, and after far too long, I tried it out, and it became my life overnight. I spent the next year studying everything I could, learning from or talking to anyone who would respond to me. I currently work as the Lead Material Artist at RubyShark as a volunteer, but I am looking for my first real opportunity to work on a large-scale project.

Project Goals

Over the years, I have seen a few cool LEGO projects done in 3D, particularly by Cartesian Caramel and Laura Marchant. So, I was determined to try something myself, making it as realistic as I could. The most important reference I could have in this situation is a real one, so I "borrowed" a bunch of LEGO bricks off my girlfriend's desk and started a new Substance 3D project.

Shaping

The first thing I wanted to do was get all the bricks shaped out and make them look as realistic as I could make, so I set the height scale of my graph to 100 and shaped all the small 1x1 bricks out using the shape nodes. I wanted each of them to have a very slight edge bevel, similar to real LEGO bricks. However, I quickly realized that the basic bevel node would be useless on its own since it would create a slope from the floor to the top edge, but I could create a massive bevel (one that created a 45° angle from the surface of the brick to the floor) and shape it with a curve node. I ended up with seven different bricks, consulting the LEGO website to make sure I had every 1x1 brick that I would want to see here accounted for.

I fed all of these bricks I shaped into a Shape Splatter, where I tweaked the height scale to accurately reflect the sizes of the tiles and added the tiniest amount of random rotation (I knew from firsthand experience that sometimes these 1x1 bricks would not be placed perfectly by a human).

Color

I considered using a Flood Fill to Color and calling this a day, but I wanted to limit the bricks' colors to the hex colors LEGO produces for their sets. After I obtained a list of these colors, I found myself at a loss. I explored any option I could find, and originally, I thought my solution might be in the new palette nodes. However, I ran into trouble because the Apply Color Palette only takes ID maps, meaning I would have to give a grayscale image and arrange my colors manually, which didn't work for me.

The solution I found was to use the Hald CLUT node, which is meant for applying color lookup tables to an image. I found an unedited 4K LUT and brought it into Aseprite, a pixel art program, specifically because it has an indexing function that works exactly as I needed this system to work in Substance 3D Designer. I applied the LEGO palette to the LUT image and used this new LUT to color grade whatever image I input to be the LEGO brand colors.

Function Nodes

Function nodes became an important part of the process, as I wanted the parameters to be as simple as possible. For that, I needed one value to affect several things, sometimes not in a 1:1 sense. For instance, because I can find the exact dimensions of a LEGO tile, I would be able to use a Height to Normal World Units note to create a mathematically perfect Normal Map. However, to do so, I would need to take how many LEGOs are being used (which is being controlled by a different parameter) and multiply it by the size of a LEGO brick in millimeters. I used this trick again when I wanted to add 2x2 bricks, as I needed them to scale at half the amount of the 1x1 tiles.

Parameters

The main parameter in this graph is the "resolution" or amount of LEGO tiles I have in both the X and Y axes. This amount directly scales the strength of the Normal Map to a real-life scale, as well as the amount of 2x2 tiles, in which there has to be half the number. Some other important parameters included:

  • Allowing the user to switch between the colors LEGO produces for their actual sets and the colors derived from the image itself;
  • Ratio between 1x1 and 2x2 tiles;
  • Enabling or disabling the Metallic Map, as three LEGO bricks included in the palette are produced with metallic paint and should be shaded as such to be photorealistic.

Rendering

For rendering, I opted to use Marmoset Toolbag, as I've always enjoyed the ease of use and efficiency of the program. I found that a lighting setup that was bright but with no super strong direct lighting or shadows was perfect. I felt I was able to invoke the feeling of playing with LEGOs as a child, which would always be indoors with some nice, soft lighting.

Closing Thoughts

This project took me about a week to complete. I spent the first day setting up most of the graph and shaping the tiles, followed by a few days of tweaking and solving the main issues of color grading and normal scaling, and finally, a few days working on the presentation.

Out of everything, I think the most fun part was working on the presentation. Since I set up this whole project to work with any image I could bring into Designer, I had a lot of fun pulling in any image I could, even asking my friends for their random requests (which unfortunately did not make the cut for the ArtStation post). While I would not consider this my most difficult project to date, I could easily say it was the most I ever learned on one. This project forced me to learn detailed bevel sculpting using the Curve node, make my own LUT, and introduce math functions into my graph parameters.

If I had to give any advice to beginners, I would honestly say not to be afraid of things unfamiliar to you. This seems like an incredibly open-ended answer, but at any point in this project, I could have been stopped by some roadblock preventing me from creating this finished product. I would not have figured out the color grading issue if I were too afraid to ask for help, as I thought I had run out of options until someone from the Substance 3D Discord server mentioned LUTs while I was troubleshooting. I wouldn't have figured out function nodes if I were too afraid of engaging with math. I would not have even been able to start this project if I was too afraid to break out of my normal boundaries, as most of the materials I make and have made in the past are much more natural looking and were never about creating realistic, convincing shapes like I had to do here.

Thank you so much to 80 Level for giving me this opportunity to explain my workflow; it means everything to me. Have a good day, everyone. Thanks for reading! 

Jared Gula, Material Artist

Interview conducted by Amber Rutherford

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more