pickledpirate Posted January 17, 2016 Share Posted January 17, 2016 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. [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. Quote Link to comment Share on other sites More sharing options...
Staff Ben Posted January 20, 2016 Staff Share Posted January 20, 2016 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. Leigh 1 Quote 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 Link to comment Share on other sites More sharing options...
hevonen Posted March 17, 2016 Share Posted March 17, 2016 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? Quote Link to comment Share on other sites More sharing options...
Staff Ben Posted March 17, 2016 Staff Share Posted March 17, 2016 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. Quote 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 Link to comment Share on other sites More sharing options...
hevonen Posted March 17, 2016 Share Posted March 17, 2016 Thanks, that seems to do it! However I couldn't write it straight into the field, maybe sqrt() function is not supported? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.