need a fine hexgrid

Post questions on how to use or achieve an effect in Inkscape.
thespacegamer

need a fine hexgrid

Postby thespacegamer » Thu Jan 20, 2011 10:40 am

I'm making a model of a ship in a 3d program and am trying to make a texture for the hull. Part of this arcane process involves having a fine, B&W hexgrid to use as a bump map to make the hull appear to have depth and dimensionality.

Here's what I've done so far...

http://farm6.static.flickr.com/5123/537 ... fa97_b.jpg

It's close to what I'm looking for but the lines on the hexgrid are too thick, giving the hull a really prbbled look not quite what OI'm after in a hull meant to enter atmosphere and therefore needing to be streamlined.

I've worked with inkscape and had trouble getting it to be a hexgrid, does the latest version do this and if so how? Also if it doesn't is there a way to make a fine but definite lined hexgrid? I want a grid with lines between 2-5x finer than the ones on the ship's hull above.

Thanks for any aid.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: need a fine hexgrid

Postby druban » Thu Jan 20, 2011 6:40 pm

I don't know anyway to make a hexgrid automatically.
Try this: make an equilateral triangle. I use the extension render>triangle just to be sure all sides are equal.
g5465.png
g5465.png (28.92 KiB) Viewed 6761 times

Remove any stroke (for a precise hexagon!, otherwise Inkscape includes the stroke in the calculations, screwing up the tiling) - give it any fill (I just used black), then do tiled clones, 1 row 6 columns, P31M or P3M1 symmetry. Delete the original object (should be selected) select all and do a paths>union. You now have a lazy person's hexagon. You could just draw it precisely using guides, I suppose (Yawn).
use5472.png
use5472.png (902 Bytes) Viewed 6761 times

with your hgon selected do tiled clones, P3 symmetry. Use the number of rows and columns it takes to cover the area you want. Ignore the white spaces because you just want a grid, right? 12 x 12 gives me this:
g6250.png
g6250.png (44.89 KiB) Viewed 6761 times
Last edited by druban on Thu Jan 20, 2011 7:08 pm, edited 1 time in total.
Your mind is what you think it is.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: need a fine hexgrid

Postby druban » Thu Jan 20, 2011 6:57 pm

Now delete the original (shd be selected), select all, remove the fill and give them a stroke that you want for your grid. I used 3 px. Note that at low zooms Inkscape renders some lines lighter. At full zoom this should not be a problem. Pixelsnap might be useful if you are exporting bitmaps. Don't use a transparent stroke or this won't work!
g6558.png
g6558.png (68.97 KiB) Viewed 6760 times


Hope this is what you wanted.

P.S. You don't have to do the final deletion of the original - you can just change its style and the clones will update properly. I just did it out of neatness? tying up loose ends? Who knows...
Your mind is what you think it is.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: need a fine hexgrid

Postby druban » Sun Jan 23, 2011 2:54 pm

I am just curious if anyone else had a different method of creating a hexagonal grid???
Your mind is what you think it is.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: need a fine hexgrid

Postby ~suv » Sun Jan 23, 2011 4:52 pm

druban wrote:I am just curious if anyone else had a different method of creating a hexagonal grid???

  1. draw the hexagon using the star tool (polygon mode, 6 corners, filled, no stroke)
  2. use simple tiling as described in the manual: Inkscape » Tiling » Shift Tab at the bottom:
    «(…) a hexagon was tiled using a shift in x of 50% and a shift in y of −25% per row.»

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: need a fine hexgrid

Postby ~suv » Sun Jan 23, 2011 5:18 pm

druban wrote:I am just curious if anyone else had a different method of creating a hexagonal grid???

There appear to be several scripts (/ programs) available to create hex grids on the command line, in SVG format, outside of Inkscape (according to google), and there's an Inkscape extension which can generate hex maps:
Possibly related:
[1] Download the latest version 1.4.4, unzip the archive and install the hexmap extension into the user extensions directory: copy the two files 'hexmap.py' and 'hexmap.inx' into %APPDATA%\Inkscape\extensions (Windows) or ~/.config/inkscape/extensions (linux/osx), restart Inkscape. Works fine in 0.48 and later.

User avatar
RobA
Posts: 335
Joined: Fri Aug 10, 2007 1:22 am

Re: need a fine hexgrid

Postby RobA » Thu Jan 27, 2011 1:05 am

druban wrote:I am just curious if anyone else had a different method of creating a hexagonal grid???


I've also used tiled clones but in two steps, with normal (translational) symmetry:
hex.png
hex.png (162.17 KiB) Viewed 6658 times


-Rob A>


Return to “Help with using Inkscape”