Code

Adobe Photoshop Tip– Simple Matrix Code

Also check out the sequel to this tutorial: The Matrix Code Retooled. It’s a much improved version of the Matrix raining code effect using actual type just like in the films.

bookend1 Adobe Photoshop Tip   Simple Matrix Code

I know why you’re here. I know what you’ve been doing… why you hardly sleep, why you live alone, and why night after night, you sit by your computer. You’re looking for this. I know because I was once looking for the same thing. And when it found me, I realized I wasn’t really looking for it. I was looking for an answer. It’s the question. It’s the question that drives us. It’s the question that brought you here. You know the question, just as I did.

“How do I make that funky green raining code that you see in the Matrix, the Matrix Reloaded and the Matrix Revolutions?”

The answer is right there, and it’s looking for you, and it will find you if you want it to…okay, it won’t really…never mind…here’s the tutorial:

I’m starting with a 5″ square canvas at 300ppi filled with black in RGB mode. We’re going to have at least 4 layers of code that will give our image depth. The first layer (the layer furthest back) will consist of steps that will be used throughout this tutorial. We shall call these steps “the Recipe” Here we go:

Background Layer: Green Rain – Downpour

Using the Background layer, follow the steps of the recipe as described here:

The Recipe
  1. Go Filter > Texture > Grain*. Use a setting of 100 Intensity, 100 Contrast on a Vertical Grain Type and click OK.
    Picture 1 Adobe Photoshop Tip   Simple Matrix Code

    * the Grain Filter is one of those Photoshop filters that produces new and different patterns and distributions of its effect each time you use it. So don’t try to be clever and skip steps by duplicating previously rendered layers. There is a difference between knowing the path and walking the path.
  2. Now go Filter > Other > Maximum. Use a setting of 1 Pixel and click OK.
    Picture 2 Adobe Photoshop Tip   Simple Matrix Code
  3. Next go Filter > Stylize > Glowing Edges adjust the setting to be an Edge Width of 1, Edge Brightness of 5 and a Smoothness setting of 1. Click OK.
    Picture 3 Adobe Photoshop Tip   Simple Matrix Code

Then bring up the Levels Adjustment window (Command-L) and set the Output Levels (the two fields below the histogram) to 0 and 80 and click OK.

Layer 1: Green Rain – Intermittent showers

Picture 4 Adobe Photoshop Tip   Simple Matrix Code

Make a new layer filled with black on top of the first. Apply the Grain effect from step 1 of the Recipe. Now scale this new layer by hitting Command-T and entering a value of 200% in the width and height fields before applying the scale.

Go ahead and complete steps 2 and 3 of the Recipe on this layer.

Add a layer mask to this layer (Layer > Add Layer Mask > Reveal All) and click on the Quick Mask Mode button in the Tools palette.

Choose Filter > Render > Clouds.

Now go Image > Adjustments > Threshold. Set the threshold to 140 and click OK.

Go Filter > Stylize > Wind. Set the Wind filter to “Wind” and “From the Right” and click OK. Hit Command-F 3 times to apply this Wind effect several more times.

Apply a Motion Blur of 10 pixels at 90? (Filter > Blur > Motion Blur) to smudge the wind lines a little.

Go Edit > Transform > Rotate 90? CCW.

Exit Quick Mask Mode by clicking the Standard Mode button in the Tools palette.

Click on the thumbnail on your layer’s mask in the Layers palette and then hit delete to mask out the “Cloudy-Windy texture” you’ve created.

Deselect All (Command-D)

With the mask thumbnail still selected bring up the Levels Adjustment window (Command-L) and set the three fields above the histogram to 0, 0.10, and 255 and click OK.

Set the Blending Mode of this layer to Screen.

Layer 2: Green Rain – Raining Cats and Dogs

Picture 5 Adobe Photoshop Tip   Simple Matrix Code

Make another new layer filled with black on top of the other two. Apply the Grain effect from step 1 of the Recipe. Scale this layer as you did with Layer 1, only this time crank it up to 500%.

Because of all the scaling we’ve done, there is a lot of image data that resides beyond the confines of the Canvas and any filters we apply will have to render across this unseen image area. So to save time in applying filters, we’re going to crop off this extra image data. Select All (Command-A) and go Image > Crop the hit Command-D to deselect again.

Apply a Threshold (you remember Threshold from Layer 1) of 128 to this layer

Apply steps 2 and 3 from the the Recipe, but when you get to step 3, use an Edge Width of 2 on the Glowing Edges filter.

Add a Layer Mask to this layer also and, with the layer’s mask thumbnail selected, apply the Clouds filter and then adjust the Levels to 70, 1.00, 190 for the Input Levels and set the Output fields to 0 & 150.

Set the Blending Mode of this layer to Screen.

Layer 3+: Green Rain – Enter the Code

Picture 6 Adobe Photoshop Tip   Simple Matrix Code

The previous layers have all been less detailed background representations of the text based code that runs through the Matrix. In this section we will be adding text layers to more accurately represent the code.

Select the Vertical Type Tool (in the Tools palette, click and hold on the Type Tool to reveal the Vertical Type Tool). Set the font to Courier (or a mono spaced font of your choosing), set the type size to 9pt, the alignment to “Top Align Text”, and the color to white. Hit the Caps Lock key on your keyboard and type something…anything…be it nonsense or subliminal messages.

Once you’ve typed a few characters, highlight them all, open the Character palette and set the tracking to -150.

Once you have a single vertical line of text (it doesn’t have to stretch from the top to the bottom ó it’s actually better if it floats in the middle a bit). When you’re done typing, click the Gradient Tool and then add a layer mask (Reveal All again). With the Gradient options set to the standard “White to Black”, Normal mode, 100% Opacity settings, click the mouse down on the baseline of the letter second from the bottom of you line of “code” and drag it straight up, releasing your mouse button somewhere slightly beyond the height of the topmost letter.

Repeat this process by creating a few more Vertical Text strings…not too many…just more. You can even Option-Drag your completed code strings to replicate them in various parts of your image.

Final Layer: Adjusting to the Green

Picture 7 Adobe Photoshop Tip   Simple Matrix Code

Create a Hue/Saturation Adjustment Layer (Layer > New Adjustment Layer > Hue/Saturation) above all your other layers. Set the Hue/Saturation Adjustment Layer to Colorize with settings of 146 Hue, 55 Saturation and -37 Lightness.

Well, there you go that’s it for another Graphics Tip. Stay tuned to MacMerc.com… you never know when we’re gonna bring you another one.

bookend2 Adobe Photoshop Tip   Simple Matrix Code

Also check out the sequel to this tutorial: The Matrix Code Retooled. It’s a much improved version of the Matrix raining code effect using actual type just like in the films.

iPhone with iChat

Brought to you by: James

If you know someone who can receive SMS messages on their mobile phone, then it’s easy-as-pie to send an SMS message to them using iChat.

First, Go to File/New Chat With Person. Then, in the field presented, enter +1 followed by the phone number (with area code). For example, you may want to enter “+15556226372″ for (555) MAC-MERC. If you were successful, you will be greeted by this kind message:

“Your IM has been sent to my mobile device. When I receive it, I will be able to reply. Thanks for your IM! Want your IMs forwarded to your phone? Click here.”

Adobe Photoshop Tip– Matrix Code Retooled

previous Adobe Photoshop Tip   Matrix Code Retooled

NEO: Whoa. Deja vu.
TRINITY: What did you just say?
NEO: Nothing. Just had a little deja vu.
TRINITY: What happened? What did you see?
NEO: A Matrix Code Tutorial on MacMerc.com and then I saw another that looked just like it.
TRINITY: How much like it? Was it the same tutorial?
NEO: It might have been. I’m not sure. What is it?
TRINITY: A deja vu is usually a glitch in the Tutorial. It happens when they change something.

Matrix Code Retooled Adobe Photoshop Tip   Matrix Code Retooled

NEO: Hm, upgrades.

Make Green Rain…

Unlike the Andy and Larry Wachowski, I prefer that sequels be an improvement upon the original. So in this Matrix code tutorial, unlike its predecessor, the code will consist entirely of actual text.

1. Download the Matrix Code Pattern unstuff it and remember where it is on your hard drive. (Full credit goes to Thomas W.Otto who developed the cut of the Matrix Code font that I used to make this pattern. Good job, TWO!!)

2. Start a new document (Command-N) in Adobe Photoshop: 5.25 x 7 inches, 300 pixels/inch, RGB, White Background. (Is there a significance to the 5.25 x 7 inch dimension? Not really. But it will be easier to follow along if you do what I do all the way through.)

3. Create a new layer and title it “Live Matrix Code”

4. Go Edit>Fill… and set the Content to Use Pattern, the Blending to Normal, the Opacity to 100% and uncheck the Preserve Transparency check box. Now click the thumbnail beside Custom Pattern. You should now see your entire collection of patterns…except the one you just downloaded. Click the button in the top right hand corner of this window to open the flyout menu and choose Load Patterns…

This will open up a Load dialog box. Now just navigate to where the Matrix Code Pattern.pat file you unstuffed resides to load it. Once it’s loaded, select it in the collection (it will be the last one on the list … hover the pointing finger cursor over the thumbnails to find the one titled “Matrix Code” if you want to be extra sure). Click OK.

01textgrid Adobe Photoshop Tip   Matrix Code Retooled5. Under the View menu choose Show>Grid and then under the same menu choose both Snap and Snap to>Grid. If your grid is set to the default, you should see that each character of the Matrix code fall in its own cell in the grid.

Now go into your Guides, Grid and Slices Preferences (Photoshop>Preferences>Guides, Grid and Slices) and change your Grid to Gridline every 0.16383 inches with 2 subdivisions. Now you’ll still see every character in its own cell, but that cell with be divided into 4 smaller cells by lighter lines.

6. Fill the Background Layer with black and turn off the Live Matrix Code layer by clicking in the eye next to it in the Layers palette.

7. Create a new layer between the Background layer and the Live Matrix Code layer called “Bright White Glow”

8. With Bright White Glow selected, Command-Click the Live Matrix Code layer to make a selection in the shape of the code. Fill that selection with white.

9. With the code shape selection still live and the Bright White Glow layer active, hit Shift-Command-I to inverse the selection and then apply a 3 pixel Gaussian Blur (Filter>Blur>Gaussian Blur). You can deselect now.

10. Now go to the Layer menu and choose Add Layer Mask>Hide All. Bye bye!

Don’t worry, we’ll bring it back in a minute.

02makebrush Adobe Photoshop Tip   Matrix Code Retooled11. Select the Background layer in the Layers palette and with the Rectangular Marquee tool make a selection anywhere on your image that follows the bold lines in the grid and envelopes a 2 x 2 group of cells. Now go Edit>Define Brush… and name your brush “Square”. Deselect.

12. Select the Brush tool and open the Brushes palette. Scroll down and select your newly created brush from the Brush Presets. Click “Brush Tip Shape” in the Brushes palette and reduce the Spacing to 1%. Click Color Dynamics and set the Foreground/Background Jitter Control to “Fade” at a value of 1200. In the Option bar, set the Painting Mode to Lighten

13. Click Bright White Glow’s layer mask in the Layers palette to make it active. Hit the D key to reset your foreground and background colors also.

14. Now you are going to place your brush onto the canvas and start painting the streams of falling code, one by one. But before you do, you need to perfect this sequence: Click…Shift…Push…Release…Release

  • Click and hold the brush in the center of one of the boldboxes of the grid where you want the lowest code character to be
  • Hold down the Shift button.
  • Push your mouse upward until the fade is complete
  • Release the mouse button
  • Release the Shift key.

Now try it. If you make a mistake, hit Command-Z. But make sure you get the pattern down—it’s the key to getting straight streams of code.

03coderain Adobe Photoshop Tip   Matrix Code Retooled15. Code away! Repeat step 14 and toggle the grid on and off to see what it looks like between strokes. (make sure the grid is visible and that Photoshop is set to snap to the grid when you actually paint the strokes though)

As a guideline try to put a string of code in almost every available column.

Avoid starting too many strings on or near the same row and, similarly, try not to have more than 3 strings in the same column. Go for an even but random dispersion of code.

Once you are satisfied with the code coverage proceed to Step 16.

16. Create a new layer above the Bright White Glow and name it Green Rain. (Keep the grid visible. I know it’s ugly, but hold tight.)

17. Change the foreground color to R:22, G:255, B:113. Command-Click the Live Matrix Code layer and the hit Option-Delete to fill the code shaped selection with green pixels on the Green Rain layer. Deselect.

18. Group the Green Rain layer to the Bright White Glow layer by hitting Command-G.

19. Now, with the Green Rain layer still active, Command-Click the layer mask of the Bright White Glow layer. Take the Rectangular Marquee tool and Shift-drag the selection upward. The grid will make the selection snap up to the next grid line. Let it snap up until it has moved up 2 small cells to the next bold gridline.

Go Layer>Add Layer Mask>Reveal Selection.

20. You can turn the grid off now.

04codefinal Adobe Photoshop Tip   Matrix Code Retooled

Add Dimension…

Just because I’m improving on my original is no reason to abandon what elevated the Simple Matrix Code tutorial above the other Vertical Grain filter based Matrix Code tutorials—depth.

21. With the Green Rain layer still active, hit Command-E to merge the grouped layers into one. Rename the merged layer “Green Rain 1″

22. Now go Layer>Remove Layer Mask>Apply.

23. Hit Command-Minus a couple of times and enlarge you window—we’ll need some room to move in a second.

05perspective Adobe Photoshop Tip   Matrix Code Retooled

24. Hit Command-T to activate the Transform function. Control-Click within the selection and choose Perspective. Grab the lower left transformation node and pull it to the left. Keep an eye on the Horizontal skew value as it changes in the Options bar and stop stretching when it reaches about 18°.

25. Make a duplicate of Green Rain 1 above the original and name it “Green Rain 2″

26. Flip Horizontal Green Rain 2

27. Hit Command-T again and at this point if you need to hold down the Shift key and drag Green Rain 2 left or right to make the angles look correct, do so.

06perspective2 Adobe Photoshop Tip   Matrix Code Retooled28. Hold down the Shift key and Green Rain 2 straight up about 1/7 of the total image height.

29. Control-Click within the selection and choose Perspective. Grab the lower left transformation node and pull it to the left. Stop stretching when the Horizontal skew value reaches about 9°.

30. Guess what? Make a duplicate of Green Rain 2 above the original and name it “Green Rain 3″

31. Flip Horizontal Green Rain 3

32. Hit Command-T again and at this point if you need to hold down the Shift key and drag Green Rain 3 left or right to make the angles look correct, do so.

33. Hold down the Shift key and Green Rain 2 straight up about 2/7 of the total image height.

34. Control-Click within the selection and choose Perspective. Grab the lower left transformation node and pull it to the left. Stop stretching when the Horizontal skew value reaches about 4.5°.

35. Click on Green Rain 1 in the Layers palette and set the Layer Opacity to 60%.

07radialblur Adobe Photoshop Tip   Matrix Code Retooled36. Go Filter>Blur>Radial Blur… Set the amount to 3, the Blur Method to Zoom and the Quality to Good. Also click and drag the Blur center to the bottom center of the window and click OK.

37. Click on Green Rain 2 and set the Layer Opacity to 80%. Then hit Command-F to apply the Radial blur to that layer also.

38. Also click on Green Rain 3 and hit Command-F to apply the Radial blur. No adjustment to the Layer Opacity here.

Add Scan Lines…

On other sites, the next 4 step would constitute a tutorial of their own. Here you get it as a finishing touch.

39. Create a new layer above Green Rain 3 and name it “Scan Lines” Set this layer’s blending mode to Overlay.

40. Go Edit>Fill… and set the Fill properties to 50% Gray, Normal, 100% and uncheck Preserve Transparency. Click OK. Don’t worry if you see no change—you’re not really supposed to yet.

41. Hit the D key to reset your foreground and background colors.

42. Go Filter>Sketch>Halftone Pattern… and adjust the setting to a Size of 1, a Contrast of 5 using a Line Pattern. Click OK.

43. Apply the same Radial Blur to the Scan Lines layer as you did to all the Green Rain layers.

44. Just go Layer>Flatten Image and you’re done.

08final Adobe Photoshop Tip   Matrix Code Retooled09closeup Adobe Photoshop Tip   Matrix Code Retooled