07 September 2007

AutoCAD: Popup OSNAP Menu

AutoCAD's options for Object Snaps and Object Tracking are extremely far reaching, but keeping them all turned on can be madding when trying to get AutoCAD to understand what you're trying to do. Opening the OSNAP menu to turn on and off options as you need them is one way to handle this dilema, but there's another option.

'Shift+Right Click' pops up the OSNAP popup menu with a plethora of common and lesser used OSNAP and OTRACK options. Of particular note is the 'Mid Between 2 Points' option ('m2p') a very handy option which alleviates the need to draw guide lines to snap to a temporary midpoint.

Photoshop: Reset Dialog Values

The next time you're adjusting values in a Photoshop dialog, take a second to hold down the 'Alt' Key ('Option' on a Mac) and keep an eye on the 'Cancel' button in the dialog. You'll notice it changes from a 'Cancel' button to a 'Reset' button, allowing you to start over in the dialog without have to close and reopen it.

06 September 2007

AutoCAD: Previous and Last Selection Set

AutoCAD's options for defining a selection set are extremely varied. Over time, we'll cover the majority of the lesser used or understood options in other topics, but today we'll focus on the 'Previous' and 'Last' selection methods. These two selection methods are incredibly useful for quick editing, especially since they're so simple. The 'Previous' selection method does exactly what it sounds like it would do. Choosing 'Previous' (type 'P <enter>') selects the last group of selected objects. Very useful for when you accidentally cancel a complicated selection set before you get to execute the command. The 'Last' selection method works slightly differently and is equally powerful. Choosing 'Last' (type 'L <enter>') selects the most recently drawn objects. Very useful for performing a modify action on that object you just created.

Photoshop: Replace Color

Earlier, we covered using 'Match Color...' to recolor a research image to represent a palette concept. A useful compliment to this tool is the 'Replace Color...' tool which we'll demonstrate here to recolor only a specific color in an image.

Here's the image we'll be working with:
In this image we're looking to replace the greenish color of the vessel with a more blue tone. After opening the image in Photoshop, we'll start the 'Replace Color...' command (Image->Adjustments->Replace Color...). The first thing you'll notice in this dialog is the selection preview in the middle of the dialog. This preview describes which portions of the image will be affected by the command -- white areas will be affected, while black areas will remain unchanged. By default, the eyedropper tool is selected in the upper corner of the dialog. Clicking on the green color in the image modifies the selection area to include only the green areas of the image. Using the eyedropper tool with the plus (+) icon lets us add colors to the selection set, while the eyedropper tool with the minus (-) icon will subtract colors from the selection set. The fuzziness slider controls the tolerance of the selection set to include colors similar to the selected colors.
Once we get the selection preview roughly selecting only the area we want to change (we're not going to be overly detailed here, as we're using this command as a visualization tool rather than for final output), we'll click on the target color swatch to pop-up the color picker. This color picker functions just like any other Photoshop color picker -- we can either choose a color directly, or if we want to match a color already in the image, clicking in the image functions just like the eyedropper tool.
Once we're satisfied with the replacement color we've chosen, we'll click OK to produce the final result.
Looking at this image, you can see that some colors were replaced in areas that we didn't particularly want to replace (top right corner). If we're looking to produce a final output, we may have to do some work with some other tools to create the precision we're looking for.

AutoCAD: OOPS Command

AutoCAD offers a wonderful compliment to the undo command: OOPS. (That's right.. OOPS). Unlike the UNDO command which steps back through the command history, OOPS undeletes the most recent set of deleted objects. Very useful for those times you find you've accidentally deleted objects, but don't want to step back through all the commands you've performed since then.

03 September 2007

AutoCAD: SCALE Using a Reference Length

The 'SCALE' command reference option simplifies the process of scaling objects. Here's how to use it:

  1. Start the 'SCALE' command ('SC' from acad.pgp)
  2. Select the objects to scale
  3. Specify the base point to scale from
  4. At the 'Specify scale factor or [Copy/Reference]' prompt, type 'R <enter>'
  5. Either enter a length to use as the base scale, or select two points to define the length. (TIP: Select the base point used to scale the object to simplify things)
  6. Specify the new length to scale the selected object(s)
HINT: The 'SCALE' command also offers a 'Copy' open. Invoking this option instructs AutoCAD to scale a copy of the object(s).

AutoCAD: Grip Editing Options

AutoCAD offers several useful options when editing via grips to make this a more useful method of editing objects. When you select a grip to edit, you'll notice a few options on the command line:

  • Copy: Creates a copy of the object you're grip editing. This can be a useful and quick alternative to the 'OFFSET' command when editing the middle grip of an object.
  • Base Point: Allows for the definition of another base point for the grip edit action.
These two options add another level of editing power to an already intuitive method of modifying objects. HINT: Using the copy option when editing a LEADER endpoint is a quick way to create multi-line leaders.

AutoCAD: LENGTHEN Command

The LENGTHEN command ('LEN' from acad.pgp) functions in a very similar way to the TRIM and EXTEND commands, while offering more precision control of the resulting values. Starting the LENGTHEN command prompts with these options:
  • DElta: Specifies the amount to lengthen an object. Can also accept an [Angle] argument when modifying arcs.
  • Percent: Specifies the percentage of the length that will remain after selecting an object. Values less than 100 will shorten an object, while values greater than 100 will lengthen an object.
  • Total: Specifies the total length of an object after completion of the command. Can also accept an [Angle] argument when modifying arcs.
  • DYnamic: Allows dynamic lengthening and shortening of a object.
The capital letters in each option indicate the letters needed to define a option (e.g. Entering: 'DY' at the prompt will select the dynamic option). After selecting the type of lengthen operation, selecting an object will apply the appropriate change to the object. The endpoint closet to where you select an object determines how the object is modified. HINT: Negative values can be entered for DElta to shorten an object.

AutoCAD: BREAK at a Single Point

The default action of the 'BREAK' command ('BR' from acad.pgp) is to break an object on two points. The first point selected is based on where you select the object to break. The following procedure can be used to break an object in two at a single point.
  1. Start the 'BREAK' command
  2. Select the object to break
  3. Type: 'F <enter>' and reselect the first break point
  4. At the prompt for the second break point type: '@ <enter>'
HINT: To automate this process, create a macro in CUI with '^C^CBREAK;\F;\@;' and assign it to the shortcut key of your choosing.

Photoshop: Precision Cursor

Need to see exactly where the center of the active tool is? Pressing the 'CAPS LOCK' key toggles between 'Standard' and 'Precision' cursor mode. HINT: Also helpful for those time you can't figure out where your normal brush cursor went.

Photoshop: Quick Access to Brush Properties

For quick access to brush properties such as 'Size' and 'Hardness', right click while using any tool that uses a brush ('Brush' and 'Erase' in particular) to display a popup dialog to modify the current brush. This, coupled with the brush opacity control on the toolbar, makes changing brush properties a breeze.

Photoshop: Image Navigation

When zoomed in to an image beyond the available screen real-estate, pausing to use scroll bars or switch to the pan tool can be a pain. Photoshop provides a keyboard shortcut for just this occasion. Pressing and holding the spacebar switches the current tool to the pan tool, allowing grabbing the canvas and moving it as nessecary. Releasing the spacebar returns to the previous tool.

Photoshop: Fill vs. Opacity

Everyone understands the effect of the Opacity control in Photoshop, but directly below the Opacity control lies the fairly misunderstood Fill control. Stated in words, the Opacity control affects the overall opacity of all elements on a layer including layer effects, while the Fill control affects only elements on a layer, leaving layer effects untouched. Lets look at an example. The image above contains a simple layer with several layer effects applied. Lowering the value of the Opacity control produces an expected result:
However, if instead the Fill value is lowered, the layer contents are modified differently:
In this example, only the elliptical shape in the center is effected while the layer effects applied to the layer are unchanged. Understanding Fill values provides another facet of layer control. Specifically it allows using layer contents to control the shape of layer effects; setting the fill value to 0% hides the layer contents while still leaving the layer effects fully visible.

Photoshop: Making the Most of the Workspace

When working in Photoshop, two keyboard shortcuts can make it easier to work on smaller screens without all those distracting tool palettes and information windows.

  • The 'F' Key cycles between the various full screen modes ('Standard Screen Mode', 'Full Screen Mode with Menubar', 'Full Screen Mode'). These modes are also accessible via the three buttons at the bottom of the tool palette.
  • Pressing the 'TAB' key hides and unhides all tool palettes and information windows, affording a clean workspace to manipulate your image.

Photoshop: Quick and Dirty Depth of Field Effect

Creating a shallow depth of field effect is a feature included in almost every 3D modeling and rendering program, but the effect can add valuable processing time to the rendering process. 3D rendering programs are excellent at recreating accurate depth of field effects based on distance from the POV. When effect is more important than accuracy, a quick Photoshop session can duplicate a shallow depth of field.

In this example we'll be working with this image:
We're looking to create a depth of field effect with the straw and the front edge of the glass in the sharpest focus. After opening the image in Photoshop, I'll switch to 'Quick Mask' mode (type 'Q') and using a brush with a very soft edge, paint a mask over the areas that should be sharpest in the final image. Varying the opacity of the mask as I get further away from the focus plane will improve the final version of the effect.
Once I've painted the mask, I'll switch back to 'Standard Mode' (type 'Q') and execute the 'Lens Blur' command (Filter->Blur->Lens Blur...). Varying the 'Radius' value effects the amount of blur applied to the unmasked areas of the image.
Clicking OK to accept the filter's action produces the final result.

02 September 2007

AutoCAD: Exporting Images

From time to time, the need to export images from AutoCAD arrives. (To include in PowerPoint class lectures for example.) AutoCAD offers two commands to perform this action easily from within AutoCAD. 'PNGOUT' outputs a PNG file and 'JPGOUT' outputs a JPEG file. Invoking either command, AutoCAD prompts for a file name to use when saving the output file, followed by requesting the selection of the objects to be included in the file. Neither command allows a great degree of control over the output result; colors and lineweights are based on the display settings rather than plot settings, so control over scale is also not possible. For more discerning users, the output of a PDF file which can be opened in Photoshop and resaved most likely remains the better option.

Windows: Show in Groups

Most of us know that icons in Windows Explorer can be arranged according to size, name, file type, etc. Windows Explorer offers another option for arranging icons that can be helpful for quickly locating files. To access this option, select 'View->Details' to show files with details, then select 'View->Arrange icons by->Show in Groups'. Clicking the header of each detail column controls which property is used to group the options. For example, clicking the 'Size' header groups icons into groups such as 'Tiny', 'Small', 'Large', or 'Huge'. Clicking on the 'Date Modified' header groups icons according to modification date with groups such as 'Today', 'Yesterday', 'One Week Ago' etc. Just another way to find those files more quickly and intuitively.

Photoshop: Match Color

Often finding a research image that also matches the palette you're working in can be a daunting task. Luckily however, Photoshop offers a tool tailored very well to that specific situation. In this example, we'll be using two images. The first image:

represents the color palette we'll be trying to match. The second image:
represents the image that doesn't quite fit into the palette we've decided upon. First, we'll open both images in Photoshop, and selecting the image we want to modify start the Match Color command (Image->Adjustments->Match Color). Near the bottom of the Match Color dialog we'll drop-down the Source option and select the image that represents the palette we're looking to match (in this case 'referenceimage.jpg').
Photoshop will display a preview of what the resulting image modification will be. Modifying the 'Color Intensity', 'Luminance', and 'Fade' options will vary the effect until the desired result can be achieved. You can also select a portion of the source image using whatever selection method you prefer and select 'Use Selection in Source to calculate colors' in the match dialog to restrict the source colors to a selection set in the source image.

AutoCAD: Rotating Using a Reference Angle

Rotating objects in AutoCAD can be a confusing task involving rotation directions and angles referenced from the default angle direction. The reference option allows for the temporary redefinition of the zero angle direction. After selecting the objects to be rotated and specifying a base point AutoCAD prompts with 'Specify angle or [Copy/Reference]'

Typing 'R <enter>', AutoCAD prompts for the reference angle, which you can either type or select two points on the drawing (selecting the base point of rotation as the first point makes things easier) to define the reference angle. Rotation of the object is now based on this new rotation angle.
HINT: Also on the command line when rotating an object is the 'Copy' option. Invoking this option instructs AutoCAD to rotate a copy of the object.

AutoCAD: Multiple Offset

Offsetting an object or objects sequentially in AutoCAD usually falls to the 'ARRAY' command. When offsetting a single object multiple times an often overlooked option to the 'OFFSET' command can simplify the process. After prompting for an offset distance and selecting an object to offset, AutoCAD presents the following options on the command line:

The multiple option (type 'M' <enter>) instructs AutoCAD not to return to the 'Select Object to Offset' prompt. Clicking again on the side of the object you wish to offset will offset the object in question repeatedly each time you click. Pressing <enter> will return to the 'Select Object to Offset' prompt, while still maintaining the multiple option. Press <enter> twice to end the command entirely.

AutoCAD: Managing Image References

As images are included more frequently in design and technical drafting, the task of managing external image references and maintaining link integrity when transmitting drawings can become increasingly frustrating and tedious. Many have found themselves sending drawings to others only to get return emails about broken links and missing references, leaving one to either fix them, or rely on the experience of the receiving party to readjust link locations. Knowledge of few principles however, can make the process manging image references significantly easier:

  1. Organize your directory structures and use relative paths. Most of us have certain directory structures we maintain to organize our drawings and keep everything arranged. However you structure your directories is not of major importance -- keeping the referenced images associated with the drawing file after its transfer is. Consider adopting a directory structure that keeps everything arranged effectively, one solution: Season Year\Employer\Show Name\ -or- Employer\Season Year\Show Name\ Whether you keep your image references in this directory or in another directory under it (my personal preference) is a matter of personal taste. What this allows you to do is more easily use relative paths when referencing images in your drawings. Relative vs. Absolute paths: Absolute paths reference a file using the complete directory structure used to find the file on your computer. Once a file is moved to another computer, the directory structure will very likely change. Consider the example of saving files on the desktop of your computer. The absolute path to a file on your desktop on a windows machince will look something like this: C:\Documents and Settings\username\Desktop\filename.file In this example, username will be replaced with the username associated with the account you're currently logged into on a windows machine. Unless the person you're sending a file to has the same username as you (a rather unlikely scenario), the absolute path to the file you send will be different on the other persons computer. Relative paths, on the other hand, reference a file using the current directory as the starting point. In the case of AutoCAD references the starting point is the location of the file that contains the reference. A relative directory doesn't contain a starting drive letter (e.g. C:, D:, etc) or a leading backslash (\), lets looks at another example: The filename containing the reference is: C:\Documents and Settings\wreality\My Document's\mydrawing.dwg If I were to reference an image in this file using an absolute path it would look like: C:\Documents and Settings\wreality\My Document's\images\image.jpg When I send this DWG and image file to someone else, unless their username is the same as mine, AutoCAD would fail to load the reference because it would be looking for the image using the absolute directory I told it to look in. However, if I use relative a relative path: images\image.jpg AutoCAD will look for the file in a directory called 'images' under the directory in which the .dwg file is saved. As long as the person receiving this file saves it in such a directory, AutoCAD will find the referenced file. Saving relative paths when inserting drawings is a simple as selecting 'Relative Path' from the 'Path Type' drop down menu in the 'IMAGEATTACH' dialog:
    Selecting relative paths instructs AutoCAD to reference the attached file based on the saved location of the host file.
  2. Using Reference Manager to correct links. Often times you're presented with a file in which the links have been incorrectly identified and AutoCAD is unable to find the referenced item, or you want to check to see that your file will be correctly interpreted once you send it on to someone else. The AutoCAD reference manger allows you to do just that. This often overlooked application resides in the same Start Menu folder that AutoCAD is contained in (by default Start Menu->Programs->AutoDesk->AutoCAD->Reference Manager). Starting Reference Manager and opening a dwg file (File->Add Drawing) presents us with the following:
    This dialog lists all externally referenced objects in the .dwg files as well as the current state of the referenced file (Resolved, Not Found). By right clicking on any reference in the list we can select 'Edit Selected Paths...' and modify the path stored in the .dwg file used to reference the object. Following the rules above for creating relative paths will reference the file from the current directory.