Page 1 of 4 1234 LastLast
Results 1 to 10 of 33

Thread: Gimp Script: Hex Grid

  1. #1

    Post Gimp Script: Hex Grid

    This post asked about drawing hex grids in Gimp.

    I posted a quick and dirty hex script there, but have cleaned it up and added more features.

    I shows up as Filters->Render->Pattern->Hex Grid... (which is the same sub-menu as the existing grid script).

    This script works on the current layer/drawable to be consistent with the way the normal grid plugin works.

    Here is the dialog:
    Click image for larger version. 

Name:	hexdialog.jpg 
Views:	652 
Size:	27.6 KB 
ID:	12813

    The options are:

    Element to Specify - is either the length of one side, the distance from point to point (equals the horizontal center to center in a horizontal oriented hex grid) or side to side (equals the vertical center to center in a horizontal oriented hex grid).
    Length of Element - the length in pixels of the above item.
    Hex Orientation - Horizontal or Vertical
    Line width - the width of the stroke
    Horizontal and Vertical offsets - when zero the first grid is tight in the upper left hand corner, with the stroke half off the edge. So for example, if you set it to a 1 pixel line width, you might want to change the corresponding offset to 0.5 so the lines are drawn lined up with the pixels and don't get aliased.
    Color - colour of the hex grid, spelling the American way

    Just a note that the grid dimensions and offsets are always to the center of the lines, so if you run the script again with a different colour and a thinner line width you can get some neat effects:
    Click image for larger version. 

Name:	hex.jpg 
Views:	29147 
Size:	80.0 KB 
ID:	12814

    Hope this is useful. Suggestions on improvements or general comments and criticisms welcome.

    -Rob A>
    Attached Files Attached Files

  2. #2

    Default

    Thanks again for making this, it works great.

  3. #3

    Post

    I cannot get the script to work, could someone please explain how to add this script to Gimp. when i refresh scripts i get an error message

    it says: Error: not a number (errorbj SF-SPINNER)
    Last edited by Stormcrow; 05-11-2009 at 09:05 AM.

  4. #4

    Post

    Quote Originally Posted by Stormcrow View Post
    I cannot get the script to work, could someone please explain how to add this script to Gimp. when i refresh scripts i get an error message

    it says: Error: not a number (errorbj SF-SPINNER)
    What version of gimp are you using?

    -Rob A>

  5. #5

    Post

    I am using Gimp 2.2.17

  6. #6

    Default

    Sorry - I have no way of testing it on that old a version of Gimp. It works on 2.4 and later, as far as I know. (There were big changes in the script interpreter somewhere in there...)

    In any case, I would suggest upgrading your version of gimp, probably to 2.6.5, as I hear there are some problems with 2.6.6

    -Rob A>

  7. #7

    Post

    This might sound ignorant of me but how do i upgrade to 2.6.5

  8. #8

    Default

    Depends on the OS. What are you using?

    If windows, download the latest built installer and install it overtop.

    If linux, if it is supported my your package manager, get it that way.

    If you download it and build from source, you probably wouldn't be asking the question


    Mac - no idea.

    -Rob A>

  9. #9

    Post

    Hy updating from a so old version may be better FOR WINDOWS unistall first
    and delete the "personal" gimp directory, before reinstall

    If you use Windows easier way may be use REVOunistaller.
    (or use after unistall SEARCH to find and delete your personal gimp folder ...i suggest Revo just because it may be handy to unistall also other SW, that if not would left some crap or even problematic dll behind)

    This because is possible that you had installed extra plugin or script that now will be incompatible with 2.6,

    For minor update (i.e from 2.6.x to 2.6.y) you may just overwrite
    Last edited by PhotoComix; 05-19-2009 at 10:02 PM.

  10. #10
    Guild Journeyer Feralspirit's Avatar
    Join Date
    Jan 2009
    Location
    Utah, United States
    Posts
    134

    Post

    Aargh. Up until a day ago or so, I've been using the Mosaic filter for hexes. Well, I've dicovered they were not what I wanted when I tried to alter their hue (not perfect hexes due to the applied light and depth). So, I downloaded your script but I can't get it to run with my desired values (element; side to side, length 30, line width 1). Instead it gave me these error messages;


    Calling error for 'Hex Grid':
    Procedure 'script-fu-hex-grid' returned no return values

    gimp_plug_in_handle_proc_run: ERROR

    and vanished from my filter dialogue. It reappears after restart. I am using version 2.6.4 Any ideas?

    Edit- Ok, I got it to run. It could be that my nearly antique machine just couldn't handle the load. I restarted my computer (to clear the cache), went straight to GIMP and used a new clean white file (still preserving as much virtual memory as possible). Ta-da, hexes. Copy to the file with my map and all is right with the world. If you have any additional thoughts for future use though, I'd be happy to hear them.
    Last edited by Feralspirit; 06-16-2009 at 10:19 PM.
    Doubt is an unpleasant condition, but certainty is absurd. -Voltaire

Page 1 of 4 1234 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •