TUTORIAL: Making mosaics with the help of Photoshop (pic heavy)

17 posts in this topic

Greetings everyone! I thought I'd throw out a tutorial on how to use Photoshop to create a photorealistic mosaic using your LEGO element of choice! I hope this is of use to someone out there who would like to make a large mosaic but isn't quite sure where to start!

What this tutorial is about:

In this tutorial I'll use an image taken off the web, some information from http://www.bricklink.com, and Photoshop CS2 to create a guide or "map" for building the imagine into a LEGO mosaic!

What you will need:

For most people, the hurdle here will be a copy of Photoshop. There are plenty of other solid image editing platforms available, I'll be showing how to do this step by step with Photoshop, but chances are the same effects can be replicated with any other "real" image editing programs (not touch-up programs that may come for free with your camera or computer). Beyond this, you will need to have a photo or digital image of some sort to use as your template, and a large selection of identically sized LEGOs to work with.

In this example, I'll be using the color palette available with 1x1 bricks; this can easily be modified to use 2x2 bricks, 1x1 plates, 1x1 tiles, etc. The choice of element is up to you, and I'll show you how to narrow your color palette based on the element you choose in a bit!

Getting started:

For my example, I'll use an image that should be familiar to all of us here on Eurobricks, our friendly admin Hinckley, apparently on a roller coaster!

I pilfered this image straight from the webpage, and opened it immediately in Photoshop.

The first task is to decide how large of a mosaic you want to make. This can be the most important decision of the whole process as this will have a huge impact on how many pieces you will need, more so than you might imagine! In any event, select a suitable size for your collection. At this point we'll want to resize the image so that each pixel of the image is equivalent to a stud in your mosaic. For this example, I'll be reducing the size of this image from 100x100 (meaning 10,000 total studs!!) to 25x25 (or a mere 625 studs).

To accomplish the image resize, I'll select the [image] menu, and choose [image Size...]. From there, I'll enter the Width and Height desired in the boxes, and select [Ok].

To bring this image into a clearer mosaic-esque focus, zoom the image in a good amount, 1600% should be sufficient. This overall process of image resizing, followed by a zoom will make my window in Photoshop look like the following three windows in order:

Adjusting the color palette:

At this point, the image is already starting to look like a mosaic, but this is simply the beginning of the process. Now we have what Photoshop can approximate as the original colors of the image, after it has been substantially reduced. But these colors are not necessarily equivalent with the color palette of LEGO elements that we'll want to use. What we need to do is define a custom palette of colors that is specific to LEGO, and apply this to the image, forcing Photoshop to match the existing colors to the closest available colors of our beloved ABS.

To do this, first we need to determine what components we want to use to construct our mosaic. For this example, I will be using 1x1 bricks, but you can adjust the steps to suit your needs!

In order to adjust our color palette, we have to know what colors are even available in our chosen element. To find this out, I'll use the catalog resource available on www.bricklink.com:

-In the top search area, select Brick from the drop down labeled --- All Categories --- and click [Go!]

-Select the first element in your list, the 1x1 brick (3005)

-In the top right corner, click on (View Them) next to the word Sets

-The first list now will show all of the colors that this part has been constructed in, it should look like this:

Now that we know what colors we have available to us, we can construct our color table for the image. Back in Photoshop, we can choose [image], then [Mode] and finally [indexed Color...]. The menu you select should look like this:

This will bring up the Indexed Color window:

Before we begin to edit the color table, we must make one quick change to the options. Be sure your Dither mode is set to None. Now we can edit the color table and have the desired effect!

From the first drop down (Palette), select [Custom...], which will bring up the window:

At this point, you will need to load in the colors of the elements available to you. One method to do this is to clear the current color table, and select entirely new colors. An easier method, if you plan on using 1x1 bricks, is to download the saved color table I used for this tutorial from my brickshelf (LegoColorPalette.act). Whether you start from scratch, or from the table provided, you may want to edit your table to remove the possibility that Photoshop will use certain colors. For instance, you may not have any Light Pink 1x1 bricks, so why give Photoshop the option to use it? It can simply be removed and Photoshop will use the next closest available color should the need arise. Further, new colors may be available in the future, and you may want to add new ones to your table.

To remove colors from the table, hold down the COMMAND key (on Mac OS X... I apologize, I'm not sure what the hotkey is when working in a Windows environment). The cursor will become a "scissors" icon. Simply click on the color to have it removed.

To add a color to the table (or change an existing one), click on the color and the color selection window will appear. Select the color you want! (Advanced Tip: during this time, all Photoshop windows outside of this window will have the Eyedropper Tool enabled; this means you can simply click on a color in another Photoshop window and you will automatically get that color. This is particularly useful if you make an image of the colors available from Bricklink, as above, and open it in Photoshop first. Doing so will let you select the color without having to "approximate".)

Once you have your color table loaded and edited to your desire, select [OK] and close both popup windows. And guess what has happened?! Photoshop has now applied the limited color selection to your existing image, essentially forming your image into LEGO-only colors! It should look something like this:

Constructing the mosaic:

Now it's time to actually put the mosaic together. To make life a little easier (how can it get any easier?!?!), you can turn on a visual grid over your image, to make it really obvious where each stud belongs. To do this, first you need to set the resolution of your grid to be 1 pixel square. Select [Photoshop] then [Preferences] and finally [Guides, Grid & Slices]. The selection path should look like:

This will bring up the preferences window. In this window, find the area labeled Grid, and set the Gridline and Subdivisions to 1, and the Gridline unit to pixels.

Now, to turn on your grids, select [View] then [show] and finally be sure that [Grid] is checked. It should look like this:

This will make your window look like the example below:

Wow! Now we're talking!!! At this point it's just a matter of following the map. Pull out your 1x1 studs and start building. When it's all said and done, you'll have something like this (note I faked a few of the colors as I ran out of reddish brown and light pink!):

If I zoom the image out (ie. back away) it will become a little more clear (with the original for comparison):

Now I have a nice mosaic of Hinckley riding in a roller coaster that I can hang on my wall!

Conclusion:

Although this tutorial may get a little deep into areas of Photoshop you may not have delved yet, it does provide a really clever way of having your computer plot your LEGO mosaic for you from an existing image. Also remember that the higher resolution you work on, the more bricks you will need, but the clearer the image will be... the example I made is 25x25, an extremely low resolution, and the results show I hope that this has been helpful and informative!

Share this post

Link to post

Share on other sites

Thanks for this Nyundi, it is really helpful, and I must say that I learned something from it. I'll have to try it out sometime soon. It is clearly laid out and is easy to follow, which is what tutorials should be like. Well done, and I'm sure many here in the community will find this to be a valuable asset.

Share this post

Link to post

Share on other sites

It's a fine description of the proces of making a mosaic from a picture.

One important thing I have to ad though, while trying myself to use the method on different pictures of different size (e.g. 30x40 bricks):

The match of the pictures colours to the indexed colours can be rather unfortunate, if the pictures colours are way different than the lego-colour index file (act file).

Therefore it can be a good idea to try and adjust you pictures brightness and saturation (or even hue), before changing it to indexed colours.

In the example shown, a good result is obtained directly, but the input picture is also a bright colourful picture, with colours matching the colours of lego bricks rather well.

To obtain good results, it can be a good idea to find a picture with colours that already are not that far away from colours of standard bricks.

Front

Good point!

To get a solid contrast in foundation colors, you can actually reduce the brightness and raise the contrast. This will really dramatize this difference in colors and may help when switching to an indexed color palette.

Share this post

Link to post

Share on other sites

Great work Nyundi! I was thinking about making a mosiac for CCCCVI, so I will take a look at paint.net to see if it has something like this as I don't own photoshop. Guess I could look for a mosiac program or GIMP too.

Share this post

Link to post

Share on other sites

I loaded your color file to photoshop and used it. My design is done and I'm ready to order the parts. My problem is, I cannot identify the colors in photoshop as Lego colors on Bricklink. What I am doing is inspecting the RGB values of the colors you uploaded, and looking at peeron's color chart in hopes of getting an RGB value match. Once a match is established, I can see the color description/name (for example: reddish brown) and then purchase reddish brown 1X1 bricks. Problem is, the colors in Photoshop aren't matching with the Lego color chart!

2. I try to match this brown in Photoshop with a brown on Peeron's color chart. I do this by trying to find the same RGB values (for example, if a color in Photoshop is RGB:23, 18, 57, I will search for a color on Peeron's chart with the same values)

3. Once a match is established, I read the descriptive title/name of the color and order that part on Bricklink.

Am I doing something wrong? Because the color set you uploaded already involves Lego colors, I should be able to order the colors featured in Photoshop. But, I cannot identify them . Please help!

Share this post

Link to post

Share on other sites

I loaded your color file to photoshop and used it. My design is done and I'm ready to order the parts. My problem is, I cannot identify the colors in photoshop as Lego colors on Bricklink. What I am doing is inspecting the RGB values of the colors you uploaded, and looking at peeron's color chart in hopes of getting an RGB value match. Once a match is established, I can see the color description/name (for example: reddish brown) and then purchase reddish brown 1X1 bricks. Problem is, the colors in Photoshop aren't matching with the Lego color chart!

2. I try to match this brown in Photoshop with a brown on Peeron's color chart. I do this by trying to find the same RGB values (for example, if a color in Photoshop is RGB:23, 18, 57, I will search for a color on Peeron's chart with the same values)

3. Once a match is established, I read the descriptive title/name of the color and order that part on Bricklink.

Am I doing something wrong? Because the color set you uploaded already involves Lego colors, I should be able to order the colors featured in Photoshop. But, I cannot identify them . Please help!

Oh you've found a hole in my tutorial!!! Well I'll have to plug it at some point

For now, however, here's a (less than desirable) solution for you:

It seems that the colors on Peeron don't perfectly match the ones from Bricklink (which is where that color palette was built from). If you go to the Bricklink Color Catalogue, you can see where I got the colors from. I used the HTML (hex value) colors to build the colors in that palette.

Back in photoshop, if you open Image->Mode->Color Table... and then click on one of the colors, you can get the hex value of the color from the text field labeled with the # sign (under RGB, it should be a six digit code, including some letters). For example, the brightest green color (actually Medium Green) in the palette will have the value #62f58e.

Back to the bricklink colors, if you view the source of that page (in Safari, this would be View->View Source; I expect its similar in IE/Firefox), you can extract the HTML that was used to construct that page. Now here's the less fun part... do a find on the page for the hex value of the color. It will be embedded in some HTML TD tags. You want to follow two TD tags over to get the name of the color. You should find it to look something like this:

Share this post

Link to post

Share on other sites

Oh you've found a hole in my tutorial!!! Well I'll have to plug it at some point

For now, however, here's a (less than desirable) solution for you:

It seems that the colors on Peeron don't perfectly match the ones from Bricklink (which is where that color palette was built from). If you go to the Bricklink Color Catalogue, you can see where I got the colors from. I used the HTML (hex value) colors to build the colors in that palette.

Back in photoshop, if you open Image->Mode->Color Table... and then click on one of the colors, you can get the hex value of the color from the text field labeled with the # sign (under RGB, it should be a six digit code, including some letters). For example, the brightest green color (actually Medium Green) in the palette will have the value #62f58e.

Back to the bricklink colors, if you view the source of that page (in Safari, this would be View->View Source; I expect its similar in IE/Firefox), you can extract the HTML that was used to construct that page. Now here's the less fun part... do a find on the page for the hex value of the color. It will be embedded in some HTML TD tags. You want to follow two TD tags over to get the name of the color. You should find it to look something like this:

YUCK! I'll need to extract those and add them to the tutorial above when I have some time, so that others won't have to do the same

Hopefully that'll be enough to get you going on your mosaic (and share it with us when it's done!!). Sorry for the trouble

Thanks for your reply. I appreciate you going out of your way to help a stranger.

Currently I am doing a similar but less efficient method in regards to the colors (I will try your method out soon). What I am doing is taking a screen shot of the For Sale index (left column) of colors offered for 1X1 bricks from BrickLink and posting it within Photoshop. I then use the eyedrop tool to sample a color from the screenshot. I then select all of a certain color within my mosaic and replace it with the color I eyedropped. It is a very rudimentary/ghetto method since a screenshot of the colors does not accurately maintain the color (parts of the color box become different colors, although from far away it looks like it's one color). Your HTML method is a much more accurate way to sample the colors and I will try it out when I have time (within a day or two).