AuthorTopic: Hegagons viewed at an angle  (Read 9298 times)

Offline Arne

  • 0010
  • *
  • Posts: 431
  • Karma: +1/-0
  • Panties.
    • View Profile
    • AndroidArts

Re: Hegagons viewed at an angle

Reply #10 on: January 23, 2010, 11:26:37 pm
Here's a rotated version.

Offline Arne

  • 0010
  • *
  • Posts: 431
  • Karma: +1/-0
  • Panties.
    • View Profile
    • AndroidArts

Re: Hegagons viewed at an angle

Reply #11 on: January 24, 2010, 12:02:36 am
So, 4 is the height of the angled hexagon at the top of the image in the post above and 7 is the plain top down height...

asin(4/7) in degrees

 = 34.8499046 degrees

I don't know much about trig, but I ran with this assumption, which seems to return a 4.



(Yeah, I checked 90 - 34.8 just to be sure.)

These angled lines can be useful later if I need to check perspective and overlap of things, perhaps.

« Last Edit: January 24, 2010, 12:13:24 am by Arne »

Offline happymonster

  • 0010
  • *
  • Posts: 455
  • Karma: +0/-0
    • View Profile

Re: Hegagons viewed at an angle

Reply #12 on: January 24, 2010, 12:24:16 am
I don't really understand the problem.. I assume you will flatten the hexagons to get a nice angle for even steps on the lines anyway?

Offline Arne

  • 0010
  • *
  • Posts: 431
  • Karma: +1/-0
  • Panties.
    • View Profile
    • AndroidArts

Re: Hegagons viewed at an angle

Reply #13 on: January 24, 2010, 10:01:27 am
I don't understand what it is that you don't understand. The problem was to determine good (w/h) proportions and view angle. I also wanted even slopes. I think it's solved.

Here's one that's proportional to +-0.5px or so. It's viewed at about 52 degrees. Edit: 43.8 degrees, I think. Edit: thought wrong, it's 35.1 degrees. Maybe.

« Last Edit: January 25, 2010, 01:40:34 pm by Arne »

Offline Lizzrd

  • 0010
  • *
  • Posts: 273
  • Karma: +0/-0
    • View Profile

Re: Hegagons viewed at an angle

Reply #14 on: January 24, 2010, 10:06:18 am
Why is it so important to have completely "hexagonal" hexagons anyway?
Photocopier: the fact that arne can also code so well
Photocopier: is horrificly unfair

Offline Arne

  • 0010
  • *
  • Posts: 431
  • Karma: +1/-0
  • Panties.
    • View Profile
    • AndroidArts

Re: Hegagons viewed at an angle

Reply #15 on: January 24, 2010, 10:11:10 am
It's good to be informed. You have to know the rules to break them, etc. Now if I break something I can know which direction I'm breaking it in.

Also, chances are that since I know the view angle, I can draw buildings and stuff which doesn't feel disjointed with the perspective of the ground. If I feel the need to, I can use a 3D program to help me make complex stuff like castles or skyscrapers.

Completely 'equilateral' hexagons ensures... that all directions are fair... I mean, look fair. The graphics are just a representation of some array of course. It always bothered me that the (text) 'tiles' in rogue-likes are tall, because it makes it difficult to judge distance. My hexagons are wide of course, but we're used to seeing compressed perspective along the ground plane like that. If the perspective and proportions are proper, then it's easier for the brain to... read what's going on, I'd say.
« Last Edit: January 24, 2010, 10:29:40 am by Arne »

Offline Rosse

  • 0010
  • *
  • Posts: 182
  • Karma: +2/-0
    • ssero
    • bluecrystalrod
    • View Profile

Re: Hegagons viewed at an angle

Reply #16 on: January 24, 2010, 01:44:04 pm
Interesting problem. I tried to calculate it and found out that your original tile is not really correct. Is that possible? According to my calculations, the width of an hexagonal tile (with a 2px slope) is height*4 or height/0.25. Your original tile was 10px height and 30px width. I redraw your tile with a 10px height and 40px width. It doesn't really look better (it feels too flat), but I think it's more correct mathematically. The top-view hextile is drawn with the photoshop polygon tool and proved my calculations were ok (The height or the top-view tile is the height of the tilted *3.464: 10px*3.464=34px)



For the other problem, the tilt-angle, I tried to calculate that too and got 73. I think it should be correct, but of course I can make mistakes. I post the sheet where I calculated everything. I hope it helps you and you can understand what I did. If something is unclear, just ask. The text is very thin, so if it's too hard to read, I can send you the original scan (300dpi), which is much easier to read.

Offline Arne

  • 0010
  • *
  • Posts: 431
  • Karma: +1/-0
  • Panties.
    • View Profile
    • AndroidArts

Re: Hegagons viewed at an angle

Reply #17 on: January 24, 2010, 02:20:04 pm
Wouldn't my first tile (which is indeed not wide enough, I noticed this soon after having posted it), be similar to the flat brown one some posts above. It's 8 wide and 2 high, and yours is 40w 10h. My big brown top down hexagon is 7 high, but I'm not sure if that's exact.

asin(2/7) in degrees

90 - 16.6015496 = 73.3984504

Yeah, that's a 73, but not an exact match to yours.

---

After this test below I concluded that doing... smoothing, or anti aliasing at tile level (half forest, etc) will probably just make the strategy element suffer because the map is less distinct. I can probably vary the forests a bit, but not in density. I'm thinking that it's better with some more Boolean terrain cases.

Also, I should add some faint lines around the edges of the hexagon where the ground shows.



Painted sloppily at 5x, scaled down, sharpened, masked.



Offline Arne

  • 0010
  • *
  • Posts: 431
  • Karma: +1/-0
  • Panties.
    • View Profile
    • AndroidArts

Re: Hegagons viewed at an angle

Reply #18 on: January 24, 2010, 04:25:15 pm
Right, so, perhaps I shouldn't have used an integer 7 there. It seems like the actual height falls short. It seems like my new (eyeballed) height gives a value closer to Rosse's:

asin(2 / 6.93) in degrees

90 - 16.7741759 = 73.2258241

I hope this is somewhat accurate, as far as Photoshop experiments can go. I wouldn't trust me here, because I keep making silly mistakes.

Edit: Indeed I did: Updated the rightmost column.

« Last Edit: January 25, 2010, 01:40:11 pm by Arne »

Offline Arne

  • 0010
  • *
  • Posts: 431
  • Karma: +1/-0
  • Panties.
    • View Profile
    • AndroidArts

Re: Hegagons viewed at an angle

Reply #19 on: January 24, 2010, 05:29:26 pm
More distinct tiles this time, and some border. I think it's an improvement.