Jump to content

Recommended Posts

The new triangular grid is really neat. It helps me make hexagonal assets for a game I'm working on.

 

An obstacle I'm facing is that the grid spacing value corresponds to the hypotenuse of the triangle and not the base of the triangle. When using a whole number (actually any rational number) for the spacing (e.g. 32px), the base (i.e. x-coordinate spacing) works out as an irrational number (27.71281292px...). It's not possible to enter a spacing value that results in integer x-coordinate spacing since the coefficient between the base and hypotenuse is irrational (square-root of 3).

 

As a result of this the triangular grid is never aligned with the pixel grid. Since the slice persona requires that slice coordinates and dimensions are all aligned with the pixel grid it's not possible to precisely slice shapes that are aligned with the triangular grid.

 

There are a few possible fixes, any would work:

* Allow the user to space the triangular grid using the base instead of the hypotenuse.

* Allow non-integer values for the x and y coordinates in the slice persona.

* Allow the user to enter expressions that result in irrational numbers in the spacing field [1].

 

I attached a screenshot showing the misaligned grids in a zoomed-in slice persona.

post-17587-0-17408200-1453043779_thumb.png

 

[1] This is allowed presently, but the result is resolved to an insufficient precision. Even on a small canvas (500px by 500px) the accumulating difference means that the two grids become misaligned fairly quickly.

 

 

Share this post


Link to post
Share on other sites

This is the problem with a 30degree grid (isometric).  I chose to measure along axis lines, because the grid system needed to work for all grid configurations.  This then allows you to control the angles of the grid lines without affecting the sizing.

 

The standard isometric grid is never going to fall on perfect pixel positions due to the non-conformant aspect ratio.  For this reason I also included the 2:1 isometric which follows the style of computer graphic isometric, and can be configured to uniformly fall on pixel positions.

 

I had thought about offering a way of expressing the axis in X:Y sizes also.  Either way, there will also always be an issue of precision in how we display the sizes.

I also plan to include an on-spread grid widget in the future that will allow grid configuration using snapping, etc.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Sorry for being dim, but how do you exactly configure 2:1 triangle grid to fall on perfect pixel positions? What spacing must one use?

 

edit 2:

How do you configure 2:1 isometric grid to fall on full pixel positions?

Share this post


Link to post
Share on other sites

You need to set the scale of the axis to be proportional to the square root of 5.

 

So, try typing "2.23607 * 16" into the axis size field to make a 2:1 grid of 16x32 pixels.

 

I'm considering if there is a better way to express it in X or Y dimensions.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.