Jump to content


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


16 replies to this topic

#1 Nyundi

Nyundi

    Posts: 131
    Joined: 09-October 07
    Member: 2069
    Country: USA

Posted 14 October 2008 - 11:52 PM

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!

Posted Image


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:

Posted Image

Posted Image

Posted Image


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:

-Navigate to www.bricklink.com
-Select the Catalog tab
-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:

Posted Image


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:

Posted Image


This will bring up the Indexed Color window:

Posted Image


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 [Color Table] window:

Posted Image


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:

Posted Image


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:

Posted Image


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.

Posted Image


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

Posted Image


This will make your window look like the example below:

Posted Image


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!):

Posted Image


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

Posted ImagePosted Image


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  :tongue: I hope that this has been helpful and informative!

MOSAIC ON!!!

#2 Erdbeereis

Erdbeereis

  • Not short in real life


    Posts: 6877
    Joined: 31-January 08
    Member: 2630
    Country: U.S.A.

Posted 15 October 2008 - 12:17 AM

You have made a wonderful tutorial Nyundi!

This is a really good idea and I didn't realize how well Photoshop would work for this.

Your mosaic turned out very well, but you had to choose Hinckley as a subject?! :tongue:

Nice work!

New Member? Read This | Questions? Need Help? Ask Here

Site Guidelines | Eurobricks FAQ | Visual User Guide | Tutorials


#3 Nyundi

Nyundi

    Posts: 131
    Joined: 09-October 07
    Member: 2069
    Country: USA

Posted 15 October 2008 - 12:18 AM

View PostErdbeereis1, on Oct 14 2008, 08:17 PM, said:

Your mosaic turned out very well, but you had to choose Hinckley as a subject?! :tongue:

Partly to be funny I suppose, and partly because it would be a recognizable image to the community!  :classic:

#4 Dragonator

Dragonator

  • Blurry? No! Furry? Who knows?


    Posts: 4811
    Joined: 07-October 07
    Member: 2052
    Country: New Zealand

Posted 15 October 2008 - 12:38 AM

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. :sweet: 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. :thumbup:

New Member? Read This | Questions? Need Help? Ask Here

Site Guidelines | Eurobricks FAQ | Visual User Guide | Tutorials


Feel like relaxing with a blood-thirsty game? Check out the LEGO Mafia, RPG and Wargames forum


#5 Athos

Athos

  • Sloppiness Seeker


    Posts: 3757
    Joined: 31-October 04
    Member: 84
    Country: USA

Posted 15 October 2008 - 12:38 AM

That's a great tutorial. Can it be done similarly with a free image altering program like GIMP?

Steve

#6 Pickerel

Pickerel

    Posts: 273
    Joined: 01-August 08
    Member: 3618
    Country: USA

Posted 15 October 2008 - 01:12 AM

View PostAthos, on Oct 14 2008, 07:38 PM, said:

That's a great tutorial. Can it be done similarly with a free image altering program like GIMP?

Steve
Probably, although I'm not sure (I've got both GIMP and Photoshop Elements, so I'm not sure if I can even do it...) GIMP and Photoshop (Elements) are quite similar, so it's possible.

Great and interesting tutorial, I'll have to try this out sometime (if possible)!

:classic: Pickerel
Martinus, Azufre's best baker

#7 Front

Front

  • Odonaman!


    Posts: 1338
    Joined: 26-March 08
    Member: 2934
    Country: Denmark

Posted 13 November 2008 - 03:53 PM

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

#8 Lasse D

Lasse D

  • Pink Poodle


    Posts: 929
    Joined: 24-December 06
    Member: 1144
    Country: Denmark

Posted 13 November 2008 - 04:42 PM

Nice tutorial.

It should be possible to do the same in Gimp, but I prefer dedicated mosaic programs where you don't have to fiddle with the color palette.

Here is an example where I tried to do the same as the tutorial (same colors and nearly same color quantization), but using a mosaic generator:

(Photoshop, original, mosaic generator)
Posted ImagePosted ImagePosted Image

Edited by Lasse D, 19 November 2008 - 07:39 PM.

Posted Image Posted Image Posted Image
Posted Image Posted Image Posted Image

#9 mania3

mania3

    Posts: 627
    Joined: 09-November 08
    Member: 4324

Posted 13 November 2008 - 06:15 PM

I have to say, this tutorial is really great.  I've used a similar technique through Photoshop for some time now, but yours is a bit simpler.  Thanks for putting this up!

#10 Nyundi

Nyundi

    Posts: 131
    Joined: 09-October 07
    Member: 2069
    Country: USA

Posted 19 November 2008 - 07:01 PM

View PostFront, on Nov 13 2008, 10:53 AM, said:

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.

#11 I Scream Clone

I Scream Clone

  • Returning Nocturnian Master


    Posts: 6217
    Joined: 30-March 08
    Member: 2955
    Country: Australia

Posted 20 November 2008 - 01:37 AM

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.

Anyway thanks for the great tutorial.

Got Questions? Need help? New member?,Read the site guidelines,Index of helpful tutorials

Posted Image  Posted Image   Posted Image  Posted Image


#12 Shadows

Shadows

  • Awesome, brilliant, not redundant.


    Posts: 14491
    Joined: 30-April 07
    Member: 1558
    Country: USA

Posted 23 November 2008 - 10:06 AM

A very nicely presented tutorial on an interesting subject. Good job! :thumbup:

It has been added to the Tutorial's Index, pinned at the top of this forum.

Shadows is looking for stalkers. Yep, you heard me right. CLICKY!



New Member? Read This | Questions? Need Help? Ask Here
Site Guidelines | Eurobricks FAQ | Visual User Guide | Tutorials


#13 WhiteFang

WhiteFang

  • Beep beep!


    Posts: 15754
    Joined: 31-December 07
    Member: 2351
    Country: Singapore

Posted 23 November 2008 - 10:26 AM

Very good and useful tutorial indeed! Thanks for sharing. It's a wonderful presentation.  :thumbup:

My BrickLink Store // Sign up for Reviewers Academy // Trains & Town Reviews // Black Knights Kingdom (EBRP) // Watch out EB News!

Click here to find out more about WhiteFang


New Member? Read This | Questions? Need Help? Ask Here

Site Guidelines | Eurobricks FAQ | Visual User Guide


My name is Wilhalm Bloodaxe and I am back to be part of the Ragnarök Now Redux.

Lord Kenneth Valise, Level 1 Knight, 28yrs old human
Power: 4 Health: 10/10 Gold: 10
Inventory: One potion, a Greatsword (WP: 3) and a Shield (SP: 2)


#14 FiletOFish

FiletOFish

    Posts: 48
    Joined: 15-June 09
    Member: 6407

Posted 15 June 2009 - 10:37 PM

Best tutorial so far, but I have a problem.

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!

Example of my process:

1. Photoshop uses, for example, a certain brown from your uploaded color file.
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  :cry_sad: . Please help!

#15 Tom Bricks

Tom Bricks

  • Video Games Reviewer


    Posts: 833
    Joined: 29-April 09
    Member: 5938

Posted 15 June 2009 - 11:58 PM

This is a great tutorial, I'm gonna have to use this some time. Nice job.
You can call me Tom
Posted ImagePosted Image Posted ImagePosted Image Posted ImagePosted Image
Flickr
“Tell me one last thing,” said Harry. “Is this real? Or has this been happening inside my head?”
“Of course it is happening inside your head, Harry, but why on earth should that mean that it is not real?”

#16 Nyundi

Nyundi

    Posts: 131
    Joined: 09-October 07
    Member: 2069
    Country: USA

Posted 16 June 2009 - 04:14 PM

View PostFiletOFish, on Jun 15 2009, 06:37 PM, said:

Best tutorial so far, but I have a problem.

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!

Example of my process:

1. Photoshop uses, for example, a certain brown from your uploaded color file.
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  :cry_sad: . Please help!


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


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:

<TD BGCOLOR="62F58E"><A HREF="/catalogList.asp?v=2&colorID=37"><IMG SRC="/images/dot.gif" WIDTH="15" HEIGHT="15" BORDER="0"></A></TD>
<TD><IMG SRC="/images/dot.gif" WIDTH="3" HEIGHT="1"></TD>
<TD><FONT FACE="Tahoma,Arial" SIZE="2">Medium Green&nbsp;</TD>


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  :sceptic:

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   :classic:

#17 FiletOFish

FiletOFish

    Posts: 48
    Joined: 15-June 09
    Member: 6407

Posted 16 June 2009 - 06:01 PM

View PostNyundi, on Jun 16 2009, 05:14 PM, said:

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


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:

<TD BGCOLOR="62F58E"><A HREF="/catalogList.asp?v=2&colorID=37"><IMG SRC="/images/dot.gif" WIDTH="15" HEIGHT="15" BORDER="0"></A></TD>
<TD><IMG SRC="/images/dot.gif" WIDTH="3" HEIGHT="1"></TD>
<TD><FONT FACE="Tahoma,Arial" SIZE="2">Medium Green&nbsp;</TD>


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  :sceptic:

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   :classic:


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).

Again, I appreciate your help.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users