Tag: GIMP

  • Painting with LEGO: How to Recreate Mondrian’s Tableau I (1921) with 1×1 Flat Tiles

    LEGO recreation of Mondrian's Tableau I--white canvas, black intersecting lines, rectangles of red, blue, yellow, and white.

    I have appreciated Piet Mondrian’s neoplasticism artwork for many years. As I wrote about here, I was glad to see his work shown in Lt. Cmd. Data’s quarters on Star Trek: The Next Generation. Then, after seeing some of his works in person at the Museum of Modern Art in Manhattan, I hatched a plan to copy his the painting from Data’s quarters–Mondrian’s Tableau I (1921) on display at the Kunstmuseum Den Haag–using a different medium: LEGO.

    Planning with GIMP

    GIMP screenshot with Mondrian painting

    Before creating a planning image using GIMP, I had to decide what size I wanted (and could afford) my build to be. I had already decided to use LEGO 1×1 flat tiles as the “painting medium.” Using LEGO’s Pick-a-Brick service online, these bricks cost $0.05 each in a variety of colors. If I went with a 32×32 stud “canvas,” that would give a surface area of 1,024 studs and therefore a need of 1,024 flat tiles to cover all of those studs. This would cost $51.20 for enough tiles to cover a 32×32 surface. Other options that I considered was enlarging each dimension by 1.5 to 48×48 for 2,304 studs and a cost of $115.20 for enough tiles or enlarging by 2 to 64×64 for 4,096 studs and a cost of $204.80 for enough tiles. Even using bricks that I already owned to create the canvas and stand, it was hard to spend more than the $51.20 for enough tiles to cover a 32×32 canvas and essentially fill the volume of your hands cupped together.

    With that decision made, I could begin working in GIMP. First, I opened an image of Mondrian’s Tableau I (1921). The original is painted on a 103cm x 100cm canvas. Since I am creating a perfect square, I needed to square this image and resize it to match my calculations. To do this, I simply selected Image > Scale Image > unlinked the horizontal and vertical resolution > entered 320 for X and Y > clicked Scale. This made the image a perfect square with a resolution of 320 by 320.

    GIMP screenshot with Mondrian painting with Filters menu open

    Next, I needed to make the image look more LEGO-like to calculate how many flat tiles I would need of each color. To do this, I added a new layer over the original image and then clicked Filters > Render > Pattern > Grid.

    GIMP screenshot with Mondrian painting with Grid window open

    On the Grid pop-up window, I changed the Width and Height to 10–meaning that there would be a grid line every 10 pixels on the X and Y axes. Since I had already scaled the image to 320 pixels on each side, this grid would perfectly approximate the 32 x 32 grid of my LEGO canvas. Also, I set the line width and height to 1 pixel each so that it wouldn’t be too large and obscure the next step. After clicking OK, the grid appears over the image.

    GIMP screenshot with Mondrian painting with grid overlay

    While remaining on the layer with the grid, I selected the paint bucket tool, selected the color of the target areas–black, blue, red, and yellow–in turn, and filled the appropriate squares to match the original painting underneath. I did this to make sure I was making the tile count as accurate as possible. If I hadn’t done this, the black lines would be less noticeable and what I might count as a colored square versus a black line might become confused. At a LEGO resolution of 32×32 studs, it was impossible for me to make it as accurate as the original, so this technique helped me approximate the original with a high degree of accuracy.

    Then, I counted the squares of each color to make my LEGO order: 686 white, 177 black, 77 blue, 70 yellow, and 14 red. I ordered a extra flat tiles of each color in case my counting was incorrect.

    Building the Canvas

    LEGO white plates in a 32x32 layout

    I wanted to build a substantial canvas for the Mondrian instead of using a 32×32 base plate. Also, I wanted to build with as many white bricks and plates as I could to reduce how much I had stored in plastic bins under my desk.

    To begin, I laid out a 32×32 grid of plates. I didn’t have a large number of similar types of white plates, so I had to try different configurations before settling on one. If I had to do over again, I would have tried configuring it for more staggered stepping instead of long break lines as I did.

    LEGO white plates in a 32x32 layout turned upside down

    I flipped over the plates to begin building the support frame for the canvas using bricks.

    LEGO white plates in a 32x32 layout upside down with white bricked border

    I wanted the canvas to appear stretched, so I continued the color white from the canvas’ plates to the border.

    LEGO white plates in a 32x32 layout upside down with bricks filling the full layout

    Knowing these other colors would be hidden, I used filler bricks in a mirrored pattern (I would know what it was like underneath even though no one else would).

    LEGO white plates in a 32x32 layout upside down with bricks filling the layout but center removed for hidden compartment

    After beginning to cover the filler bricks with white plates (stretched canvas) and sand plates (wood frame), I thought that it would be cool to build a hidden compartment to hold a written statement about the artwork. So, I pulled out some central bricks, filled the center with inverted 2×2 flat tiles.

    LEGO white plates in a 32x32 layout upside down with bricks filling the layout but center removed for hidden compartment and trapdoor installed
    LEGO white plates in a 32x32 layout upside down with bricks filling the layout but center removed for hidden compartment

    I constructed a compartment door on hinges in the middle of the back of the canvas and filled the rest of the space with dark sand plates (paper backing protecting the canvas).

    LEGO white plates in a 32x32 layout upside down with bricks filling the layout but center removed for hidden compartment with trap door open

    Here is the hidden compartment door open.

    LEGO white 32x32 canvas completed studs up

    Flipped back over, the canvas is primed and ready for the “paint.”

    Constructing Display Stands for the Canvas

    LEGO canvas with display stand installed

    I used LEGO Technic bricks to build two stands for the canvas so that it was held at a stable angle.

    LEGO canvas with display stand installed sideview

    It’s about 70 degrees from horizontal.

    LEGO canvas with display stand installed

    I beefed up the friction connection between the stands and the canvas by using two 1×10 Technic bricks that attach to the canvas.

    LEGO canvas with display stand installed closeup

    From the blue color, you can see that I used a number of 3 brick width pins.

    LEGO canvas display stand legs detail

    These photos show the stands in more detail detached from the canvas.

    LEGO canvas display stand legs detail
    LEGO canvas display stand legs detail

    Note that the angle is achieved by having the long arm simply rest against a smaller L-shaped Technic support arm. Gravity holds things in place.

    LEGO canvas display stand legs detail

    I added extra Technic bricks to the stand’s bottom support legs for extra strength.

    Assembling Mondrian’s Tableau I (1921)

    After placing my LEGO Pick-a-Brick order for the “painting” 1×1 flat tiles, it took about a week-and-a-half to arrive.

    Bag of hundreds of LEGO pick-a-brick

    I ordered bricks for a custom Millennium Falcon that I am currently also working on, so I needed to sort everything out.

    Man sorting LEGO bricks from bag of pick-a-brick

    Here I am sorting the LEGO bricks.

    5 piles of 1x1 LEGO flat tiles in different colors

    With the bricks sorted, I began to paint my recreation of Mondrian’s Tableau I (1921).

    LEGO Mondrian painting build in progress

    I began at the top horizontal line and created one line at a time–kind of like a CRT drawing a line of pixels across the screen one-at-a-time.

    LEGO 1x1 flat tiles skewed at different angles after connecting to LEGO plate

    The problem with LEGO flat tiles is that they are difficult to align just by placing them on a stud.

    To align each line of flat tiles, you can take a brick separator, place it edge-wise along the flat tiles, and pull it back-and-forth lightly–hard enough to press against the flat tiles’ edges but not so hard as to keep it from moving above the adjacent studs as in the picture above.

    Straight aligned row of 1x1 flat tile LEGO

    As you can see, the flat tiles are now aligned better. I did this trick for each line of flat tiles as I worked down the canvas.

    Almost completed LEGO Mondrian painting

    Nearing the end of the build, I discovered that I didn’t have enough flat tiles in white and black. I recounted and recalculated. My count was correct, but LEGO short changed me about 70 elements from my order and gave me 70 extra yellow tile that I didn’t order. I called their customer service the next day and asked that they correct the order. I received the missing parts after another week-and-a-half. I continued “painting.”

    3/4 view of completed LEGO Mondrian painting

    After several weeks, I had completed my copy of Mondrian’s Tableau I (1921) using LEGO!

    Sideview of completed LEGO Mondrian painting

    The side view reveals hints of the “paint” of the lines of 1×1 flat tiles.

    Back view of completed LEGO Mondrian painting

    The back of the canvas mounted on the display stands has its hidden compartment in the back center of the canvas.

    Artist statement on parchment pasted to inside of hidden compartment on LEGO Mondrian painting back

    For the hidden artist statement, I cut out a 4×4 square and wrote in pencil, “Miniature copy of Piet Mondrian’s Tableau I (1921), 103cm x 100cm at Kunstmueum Den Haag. Design and Build by Jason W. Ellis 2024. Medium: LEGO.” I pasted it on the flat tiles inside the lid of the hidden compartment.

    What art should I recreate with LEGO next?

  • How I Guide Stable Diffusion with ControlNet and Composite Images

    GIMP showing a multi-layer image of Lynn Conway on the right and her co-authored textbook Introduction to VLSI Systems on the left.

    For the illustration of Lynn Conway and her co-authored textbook Introduction to VLSI Systems at the top of yesterday’s post, I used a locally hosted installation of Automatic1111’s stable-diffusion-webui, the finetuned model Dreamshaper 5, which is based on StabilityAI’s Stable Diffusion 1.5 general model, and the ControlNet extension for A1111.

    Stable Diffusion is an image generating AI model that can be utilized with different software. I used Automatic1111’s stable-diffusion-webui to instruct and configure the model to create images. In its most basic operation, I type into the positive prompt box what I want to see in the output image, I type into the negative prompt box what I don’t want to see in the output image, and click “Generate.” Based on the prompts and default parameters, I will see an image output on the right that may or may not align with what I had in mind.

    Automatic1111's stable-diffusion-webui image generating area

    For the positive prompt, I wrote:

    illustration of a 40yo woman smiling slightly with a nervous expression and showing her teeth with strawberry-blonde hair and bangs, highly detailed, next to a textbook titled introduction to VLSI systems with microprocessor circuits on the cover, neutral background, <lora:age_slider_v6:1>

    I began by focusing on the type of image (an illustration), then describing its subject (woman), other details (the textbook), and the background (neutral). The last part in angle brackets is a LoRA or low rank adaptation. It further tweaks the model that I’m using, which in this case is Dreamshaper 5. This particular LoRA is an age slider, which works by inputting a number that corresponds with the physical appearance of the subject. A “1” presents about middle age. A higher number is older and a lower/negative number is younger.

    Automatic1111's stable-diffusion-webui ControlNet extension area

    ControlNet, which employs different models focused on depth, shape, body poses, etc. to shape the output image’s composition, is an extension to Automatic1111’s stable-diffusion-webui that helps guide the generative AI model to produce an output image more closely aligned with what the user had in mind.

    For the Lynn Conway illustration, I used three different ControlNet units: depth (detecting what is closer and what is further away in an image), canny (one kind of edge detection for fine details), and lineart (another kind of edge detection for broader strokes). Giving each of these different levels of importance (control weight) and telling stable-diffusion-webui when to begin using a ControlNet (starting control step) and when to stop using a ControlNet (ending control step) during each image creation changes how the final image will look.

    Typically, each ControlNet unit uses an image as input for its guidance on the generative AI model. I used the GNU Image Manipulation Program (GIMP) to create a composite image with a photo of Lynn Conway on the right and a photo of her co-authored textbook on the left (see the screenshot at the top of this post). Thankfully, Charles Rogers added his photo of Conway to Wikipedia under a CC BY-SA 2.5 license, which gives others the right to remix the photo with credit to the original author, which I’ve done. Because the photo of Conway cropped her right arm, I rebuilt it using the clone tool in GIMP.

    I input the image that I made into the three ControlNets and through trial-and-error with each unit’s settings, A1111’s stable-diffusion-webui output an image that I was happy with and used on the post yesterday. I used a similar workflow to create the Jef Raskin illustration for this post, too.