The basic challenge is learning how to manipulate images
There is a wide variety of photo/image editing software. In the lab you have installed Pixelmator. There are heaps of tutorials and tons of amazing thing you can do with this software...and most of the functionality is the same as in other popular image editing software, such as GIMP or Photoshop. This tutorial just gives a quick overview of some basic functionality for image processing.
Some things will work well, some won't. Remember, you can always "Undo" the last few actions.
- Open Pixelmator (the icon in the Launchpad).
- Download testpack.png and Open it in Pixelmator.
- Rather than working on this image, you’ll create a new one to work on. While in Pixelmator, from the main menu select File | New. Set the size of the new image to at least 400x400 pixels. The exact size doesn’t matter at this stage; you just need enough room to work with. Press "OK".
- Find the "Layers" window and make the "Background Layer" invisible by removing the check-mark beside it.
- You should see a new image with a checkerboard pattern. This pattern sits behind your image and it means that the entire image is now transparent.
- Go back to the "testpack.png" image (it should still be open in Pixelmator). Find the "Tools" window and select the Rectangular Marquee Tool.
- Select the top line of runners sprites from "testpack.png". Copy these to clipboard (⌘command-C), switch to the new image, and paste (⌘command-V).
- You can use the Move Tool (top-right of the toolbar) and move the runners into the middle of the image. You can use the Zoom Tool (bottom-left of the toolbar) to zoom in or zoom out. Zoom in a bit to better see what you’re doing.
- From the toolbox, select the Color Selection Tool.
- The menu bar on the image window is context sensitive -to the selected tool. Right now, it should be showing options for the Color Selection Tool. Select the cog-wheel and make sure to disable the "Smooth Edges" option.
- Click and hold on the black background of the runner image. The Color Selection Tool tool select all of the black pixels in the image. While holding the mouse-button down, you can drag the cursor to change the tolerance. Set the tolerance to about 1%.
- Let go of the mouse button and you should get a selection of the black pixels around the silhouettes of the runner. Press ⌘command-X (or select Edit->Cut from the main menu) to remove the background.
- Find the Layers window. It should list two layers: "Background Layer", which you disabled earlier, and "Layer", which is the layer that got created when you pasted the silhouettes. We won't need the "Background Layer" - you can remove it by right-clicking on it and selecting "Delete".
- Make sure "Layer" is selected in the Layers window. From the toolbar select Rectangular Marquee Tool and from the image select one of the frames of the runner. Copy to clipboard.
- Now paste: ⌘command-V or Edit->Paste. Initially you may not see any difference, because you’ve pasted the runner on top of where it was previously. Move (the Move Tool) the image so that you can see it.
- Notice in the Layers window that your pasted image created a new layer: "Layer 2".
- From the main menu select Edit | Flip Vertical. Move the inverted runner until it makes a reflection (see below). Note that you can use the arrow keys for fine placement.
- Now, the upside runner is going to be made into a shadow, so the first thing is to blacken it. From the main menu select Image | Color Adjustments.... Find the Effects Browser window that should appear, and select "Hue".
- In the pop up dialog, slide the Lightness all the way down to -100 to blacken the shadow and press "OK".
- That’s a start, but shadows are softer, less precise in general. In the Effects Browser window switch the effect to "Blur" and select Gaussian.
- A dialog will pop up where you can adjust the blur. Watch the main image windows to observe the corresponding effect. Adjust the radius of the blur until you’re happy with it and press "OK".
- In the Layers window adjust "Layer 2"'s "Opacity" to about 70% to give you a nice, soft, transparent shadow.
Shadows are cool, how about a reflection?.
- Select "Layer" in the Layers window. Go back to the image, select, copy to clipboard and past another silhouette. The new image will become "Layer 3". Flip it and line it up with the original.
- Next, you want to distort the reflection slightly. In the Effect Browser select "Distortion" effects and double click on "Twirl". The window that will pup up will allow you to manipulate the effect with a combination of "Radius", "Angle", and a dongle-like control that adjusts curvature of the effect.
- Reflections tend to get less well defined the further away from the source of the reflection. To simulate this, you can create a layer mask with a gradient effect.
- In the Layers, while "Layer 3" is selected, click the cogwheel at the bottom and select "Add Layer Mask".
- Click on the mask in the Layers window and from the toolbar select the Gradient Tool.
- In the image, click near the foot of the reflection, and drag downwards. Drag to near the head of the reflection. You should see the following effect (if you don't, you might have to select a different gradient type in the context-sensitive toolbar):
- If you're not quite happy with it, you can try to distort and warp things a bit more with filters of your choice.
Check the Layers window. It’s quite possible that your shadow and reflection layers are sitting on top of the original sprites. They should really be underneath. In the Layers window, drag the layers around so that "Layer" ends up on top.Once you’ve finished editing layers, it’s often useful to merge them into a single layer. You can select layers for merging, but in this case just merge them all into one by selecting Layer -> Merge All Layers from the main menu.
Show your work to the demonstrator for assessment.
- creating images/audio
Intermediate challenge is about creating your own digital content.
Drawings with a tablet
There are two Samsung Galaxy Tab A with S Pen
tablets in the department that you can borrow for a limited time. It's an excellent tool for artwork creation - much easier to draw with the pen than with a mouse.
- Before login on to the tablet, make sure that "Student" account is selected
- Swipe to log on. The tablet has two applications for drawing: Autodesk Sketchbook and Arftflow. You can find the icons for both programs on the home page once you log-in.
- In either program you can create artwork by drawing with the S-Pen right on the tablet. You can work off existing pictures, create new ones, use layers...etc. There are plenty of tutorials out there on digital painting, such as Ctrl-Paint series for instance. This lab will not provide instructions on how to use the programs - just how to get the images off of the tablet.
- Once you have you're image ready, like the one below done in Artflow, find the option for sharing the image and save it to the device. Remember which directory you saved it to - "Pictures" or "Downloads" or whatever.
- Next, plug-in the provided USB dongle (the little USB connector doesn't go all the way in on the tablet, so don't force it). Then plugin a memstick at the other end of the dongle. After a short delay "File Manager" should come up on the tablet screen. Find the directory where you file has been saved. Tap and hold the file, until selection box appears next to it. Select it and click on "More" in the right-hand corner. You should get an option to "Copy" or "Move" the file. Then copy/move it to your USB.
- If it's a PSD file (default save mode for Artflow), then you can open that file in Pixelmator and all the layers will be preserved...so you can continue working on your artwork - adding various effects, and then saving it as PNG. If you saved the artwork in PNG format, you can probably import it to Unity directly.
Drawing with Inkscape
Inkscape is another graphics creation program. While Photoshop is mainly based around working with raster images (pixels), Inkscape is more about editing vector based images. Vector based images have the advantage that they scale to any desired resolution without blurring or ‘pixelating’. Unity has limited support for rendering vector based graphics, SVG files (though there is an SVGAssets
plugin that works with the Pro version ). Still, it is often a better option to create assets in vector graphics and save it as a raster image at a resolution appropriate for your game.
One of the coolest sites around...
is an excellent tool for creating pixel-style tiles and animation. Tutorial on how to use it can be found on PyxelEdit's website
Audacity is a software for editing multiple audio tracks, recording sounds, chopping them up, applying effects and exporting to a variety of formats. While doing this lab, think about how you could make sounds for the first assignment. Perhaps try dropping them into the Space Invaders project from yesterday’s lab.
Recording a sound
The machines in the labs all have built in microphones.
- Open Audacity.
- Click on the big Record button. Audacity will start recording the input from the microphone.
- Make a sound! Something traditional like "Testing, testing, 1, 2, 3" or maybe some lightsaber sound effects? Hit the Stop button when you’re done.
- You can hit the Play button to listen to your masterpiece. Also, you can drag a selection in the track to play back just that portion:
- If the recording is a bit quiet, you can increase the volume with the -/+ slider to the left of the graphic display of your sound.
- Often you’ll end up recording far more than you need. It’s fairly easy to trim this down. Select the bit you want to keep, playing the sound back to ensure you have everything you need, and choose Edit | Trim.
Importing a music file
If you have a music file (and the legal right to use it) that you want to use as background music, Audacity can be a handy way to modify it to fit your needs.
- Just use File | Open... to load the track you want.
- Music files tend to be fairly large. To zoom in and out on the sound’s timeline, you can use the zoom in/out/selection/project buttons on the tool bar.
- In the top left, are six buttons that select the current tool. Examples are the Selection (default) tool, for selecting a portion of our sound, Zoom tool for zooming in on the timeline and the Time Shift tool, which slides the entire track back and forth along the time line. Also, the Envelope tool can be used to selectively dampen or make louder parts of the track.
Here’s where we have some fun. Audacity can apply a number of effects to your sound track. Simply select the region you want to apply the effect to, and choose the effect from the Effect menu. Some examples are:
- Fade in / out – useful for cleaning up the beginning and ends of a sample, or to make sounds appear to be ‘coming and going’.
- Alter Pitch / Tempo – change your voice into a Pixie or an Orc.
- Repeat – save yourself some copying and pasting.
- Noise Removal – take out background static.
- Every time you record a sound in Audacity, it puts it into a new track. If you record more than one track, Audacity will combine them together, allowing you to build up (or ‘layer’) composite sounds.
- If you have multiple tracks, then the Cross Fade In and Cross Fade Out effects become useful for mixing one track into another nicely – the basic Fade In and Fade Out won’t give as nice an effect.
- Unity supports various types of audio files, which can be exported from Audacity. Typically you’d use wav files for sound effects and ogg files for music or speech.
- Try exporting your sounds with different settings to get a feel for how they affect things in terms of quality / file size.
Pick two methods of creating digital content and create your own game assets based on what you learned. For example, you might choose to draw few backgrounds using a tablet and then a couple of characters using Inkscape. If one of your choices is Audacity, create an original piece of music. Show your work to the demonstrator for assessment.
- Learn how to use Timeline in Unity, create one complex cut scene (or few simpler ones) and implement it (them) in Unity's Timeline. The storyboard should be rich (not just stick figures on a black background) and follow a chosen theme. All artwork should be yours. You can have some animation in there if you wish. It's perfectly fine to use the cut scene in your team's game.
- Devise and complete your own Graphics Master Challenge - just check with Lech or Nick first, whether the scope of the work will be sufficient for the awarded skill points.
Show your work to the demonstrator for assessment.