GrafX2

From OHRRPGCE-Wiki
(Redirected from Grafx2)
Jump to navigation Jump to search

Grafx2 is somewhere between a pixel art program and a CG program. Grafx2 binaries are currently available for Windows, Amiga, Mac, and Linux.

It is designed for doing pixel-precise work like sprites and demoscene logos (as in many of the works at http://gfxzone.org), and also has many useful CG-ish features -- like:

  • Quickshade, which darkens/lightens pixels within the currently selected ramp as you paint
  • Smudge, translucency, smoothing

Other prominent features:

  • Keeps track of how many colors you've used, and provides an quick + easy way to reduce colors
  • the split-screen zoom (like a more powerful version of the zooming in OHR's built-in sprite editor) can be very handy, and everything can be accessed via customizable keyboard shortcuts, for speed.

It's inspired by 'DeluxePaint' and 'Brilliance' for the Amiga, so it is also very easy to change drawing colors (even as you are painting), to paint with two different colors quickly, to pick up part of the picture as a brush, to stencil out some colors as 'read-only' or to get a 'spare page' for testing stuff on.

Since version 2.4, includes animation support, which is also pretty handy.

Download[edit]

Documentation[edit]

http://code.google.com/p/grafx2/wiki/UserManual

NeoTA says[edit]

Probably *the* best program for casual editing/creation of static sprites/images.

  • Pixeling in Grafx2 is very different (and far more fun!) than pixeling in GIMP, Photoshop, or even ProMotion, for me; It is very friendly to the kind of experimentation needed to achieve the best result.
  • It also does not confuse the issue with things irrelevant to pixeling, so it is good for newbies to get a grasp of pixeling with.
  • If you load in your entire 256-color palette when drawing sprites, you don't need to do any palette management - just pay attention to the reported number of colors used. As long as you don't use more than 16 you can import the image (saved as an 8 bit BMP) as a 16 color sprite in the OHR.
  • Supports limiting rgb precision -- rightclick on the 'Pal' button to set this. For example default rgb precision is 256 (0..255), 16 steps of RGB intensities, like the Amiga, is more useful IMO. (You can also adjust this via a commandline parameter -- eg. run "grafx2 /rgb 16")
  • It's a pretty nice way to create master palettes, too. the rgb restriction is good for this, since you want to avoid having virtually-identical colors. Also a script you can install into GrafX2 makes it easy to send palettes back and forth between GrafX2 (for detailed palette editing and building ramps) and a 24bit image editor like GIMP (for overall edits, eg. using Curves, Levels, or Color Balance on many or all colors in the palette.)
  • As of 2.4, it has a Tilemap mode like Pro Motion's, where drawing on one tile in the picture updates all identical tiles in the picture (tile size is taken from grid settings, btw -- you'll need to make sure the grid is set to 20x20, but it doesn't have to be active.). This is handy for building maps and making better quality tiles, since you can see the tile as it is in the map or tiled with itself.
  • As of 2.4, Animation is supported. Rightclick on the icon in the extreme bottom left of the GrafX2 window, and you can choose either Animation or Layers mode; The toolbar immediately above that controls either the Layers or Animation frames, according to which mode is active.
    • A single tick in OHRRPGCE terms is about 1/18.3 of a second (0.0546 of a second). In GrafX2 terms a single tick lasts 55 ms. When you click on the 'set frame time' icon in the above toolbar, you can use that value 55 , and you can easily opt to set the frame time for all frames at once (click 'Set all frames' in the dialog that appears)
    • You can play the current animation either backwards (rightclick on the << button) or forwards (rightclick on the >> button)
    • And of course the usual features for moving through the animation frame by frame, adding or removing frames, and rearranging frames, are available.

Guide to common manipulations[edit]

  • Editing tiles with autocompletion (eg. in screenshots to check whether the tiles work in all the necessary contexts.)
    • GrafX2 includes a tile autocompletion mode. This mode finds all the unique tiles in the image, and when you change a tile, it propagates that change to all the other instances of that tile.
    • To activate it, first you have to set the grid parameters.
    • Click on the FX button (statusbar shows 'drawing effects' when you hover over it)
    • Rightclick on the Grid icon.
    • In the dialog which comes up, set X and Y to 20, to match the tile dimensions
    • If the image you are editing has 'partial tiles' near the edges (for example, it was taken while the player was moving and the map was scrolling), you will need to determine the X,Y offset of the topleft-most whole tile and enter it into the dX and dY fields. Otherwise dX and dY can be left at 0 (the default)
    • Make sure Snap is off; You may want to turn Show on so you can see the edges of the tiles in the zoomed view.
    • Click OK
    • Click on FX again
    • Click on the Tilemap icon. GrafX2 will analyze the image and tell you how many unique tiles are in it, and then enable tile-completion
    • You can now draw on any tile and the changes will be propagated to all other instances of that tile.
    • If you want to toggle tile autocompletion off/on, just bring up the FX/Drawing Effects dialog again and click on the Tilemap icon.
  • Darkening or lightening tiles which use a single color ramp
    • Go to the palette area. leftclick on the starting color, then rightclick on the ending color.
    • Click on FX then 'QShade'.
    • Make sure 'Feedback' in the FX dialog is OFF.
    • QShade is active, now you can lighten or darken things which use that ramp using all the usual drawing tools -- leftclick darkens, rightclick lightens (if you use the typical dark on left, bright on right arrangement). Pixels of a color not in the ramp will be unaffected.
    • If you rightclick the QShade button in the FX, you can modify the 'Step' (default = 1) to control how strong the effect is per application.
    • http://code.google.com/p/grafx2/wiki/DrawingModes explains how it works.
    • Of course you can quickly switch ramps to shade tiles with a few different color ramps in use (just do the leftclick on starting color, rightclick on ending color procedure again)
    • remember to turn off Shade mode when you want to draw normally (try pressing the 'All Off' button in the FX dialog)
  • Darkening or lightening tiles which use multiple or crossing-over color ramps
    • Set up the ramps explicitly (rightclick on the Shade button, not QShade).
    • Shading can work however you want it to using this (and Grafx2 remembers the shade table for you)
    • however, initial setup takes longer. check the DrawingModes list above for an example
    • again, remember to turn off Shade mode when you want to draw normally
  • Copying tiles
    • First enable Grid (FX ->Grid); set the Grid parameters appropriately (X,Y = 20)
    • Use the 'rectangular brush grab' tool (dotted rightangle, near middle of toolbox) to pick the tile(s) you want
    • That is now your brush. When drawing, the background color you have currently selected is considered as transparent in the brush.
    • When you are finished putting down copies of the tile, click on the brush selector (top left icon in the toolbox) and select a normal brush
    • you can also paint using fragments of tile, by using the 'freehand brush select' tool adjacent to the 'rectangle brush select' tool when initially picking your brush. You probably want Grid OFF for this.
  • 16-color palette ordering
    • It helps to have read the intro to master-palette editing below, first. This sub-guide assumes that you have.
    • Use the 'Sort' function on the entire 16color palette except the first color, in Hue/Light mode. This will get most of the colors grouped with the colors that they share a 'ramp' with, and the ramp ordering approximately correct.
    • Use the 'X-Swap' button to move any colors that you consider incorrectly grouped or wrongly ordered.
    • Use 'X-Invert' on any ramps you think are pointing in the wrong direction (eg. Light->Dark, rather than Dark->Light). You may also opt to use X-Invert on the entire 16color palette except the first color, which would effectively reverse all ramps.
    • Use 'X-Swap' to exchange entire ramps so the ramps you want to come first, come first.
    • That's it.

And uncommon manipulations[edit]

Master Palette editing[edit]

  • Make sure that the 'safety colors' option in the settings is turned OFF, otherwise GrafX2 may modify your palette to include its GUI colors.
  • Click on the 'Pal' button after loading the current master palette.
  • You can select a range of colors by clicking and dragging, and apply changes to the hue, saturation, lightness, red, green, blue, or overall brightness aspects of them as a whole using the sliders.
  • (of course you can also use the sliders to adjust individual colors)
  • Spread is your most vital tool if you aim to make your own color ramps. It makes a gradient between the start color and end color of the selection.
  • Invert will reverse the order of the selected colors, eg. 12345 -> 54321. Useful if you accidentally made a ramp that is in the opposite order from your other ramps.
  • for all the details, visit the Grafx2 wiki.

Making 3d backgrounds[edit]

  • This is the technique found in the classic FUABMX. It requires a reasonable understanding of how perspective works, naturally.
  • First you have to understand how to use the spare page. There are two 'pages' (images) at once in Grafx2, main and spare. They are each independent, having their own palette, layers, etc. You can use Tab key to switch between them. When you start Grafx2, the 'main' page is active.
  • We'll use the spare page to hold our textures, and draw the actual background in the main page.
  • So, you need to start by loading your textures into the spare page. Make sure their palette matches the master palette you're working with, and that they are appropriately sized (double the size of the surface you're mapping them onto, is about right.)
  • Prepare the main page for your background. Size it to 320x200 (or 640x400 if you want to get added smoothness at the cost of a slightly more involved process) and make sure the correct master palette is loaded.
  • I recommend using the line tool to sketch out the rough structure on a separate layer before any real drawing work is done.
  • Next, prepare the sky plane and ground plane using the below techniques. I say this
  • Here is the main process. I highly recommend you research 'Brush FX' first because we use them heavily, and knowing the keyboard shortcuts will make the process much quicker. (hover over the 'brush fx' button and hit F1. An explanation of the various functions is shown, along with their keyboard shortcuts.)
  • It can also help you to enable Grid on the spare page (with size set to, say, 4, Snap on, Show on). This will make it easier to align textures across surfaces. Grid is found in the 'drawing modes/FX' toolbar button.
  • Finally, consider whether to enable split screen zoom ('M') on the main page and/or spare page. This can make aligning things precisely much easier.
    • Switch to the Spare page and grab a texture (or part of a texture) with brush grab ('B'). Consider the area you will map it to when choosing the part of the texture.
    • Switch back to main page.
    • Move the mouse to the approximate location of the surface you want to texture.
    • Activate Distort (Shift-S) and drag the four corners where you want them. Rightclick to confirm when you're happy.
    • The surface is NOT drawn yet-- you have the distorted texture as your new brush. Draw it where you want it -- in multiple places if you so desire. Remember there are other useful brush functions that will help you with things such as flipped versions of the surface(X, Y keyboard shortcuts), rotated(Z to rotate by 90 degrees, W to rotate an arbitrary amount), stretched and squashed (S to stretch or squash the brush,)

Other tips:

  • You can create curved surfaces by Distorting more than once. Try it!
  • If you reuse a texture a lot, you can save it in one of the preset slots (Leftclick on the brush selector, then rightclick in one of the buttons in the bottom row and select 'Set'). Then you can quickly get it back via the brush selector.
  • Working with overlapping objects? Layers are quite effective for this.
  • Textures don't have to be entirely solid, or rectangular. The color you have selected as 'BGcolor' will be treated as transparent when drawing the brush. So, you can make textures with transparent areas in them.. you can also grab a texture using the 'lasso' method, where you grab an arbitrary area out of the texture by click-dragging (and Rightclick when you're done).
  • you can save time by using parts of the background themselves as textures. Using stretch and distort, you can create larger or smaller versions of a landscape feature (ie. perspective-ized copies)
  • if you need to create a tiled version of a texture, using the 'Tiling' drawing mode in conjunction with filled rectangles may be what you want.

See Also[edit]