Isometric snappy grid for game development and guide

Hi,

I’m looking for a way to create an isometric grid 30° but that snap vector or simple drawing on it.
I know how to create an isometric grid in krita, but GUIDES can not be placed precisely in Krita.
for example guides (horizontal and vertical) can be set 0.5 pixel above/under the correct value the isometric grid gives.
Therefore even if Krita has an isometric feature, guides can not be placed precisely on the corner of the isometric grid has corner can be 29.5 pixels. This is weird by the way.

So I would like to know how can I have an isometric grid 30° and to have guides that can match it, so no isometric grid with half pixel coordinates and where guides can be correctly positioned so I can create a real rhombus/tile to a snappy grid / guides

thanks a lot

The isometric grid is accurate at 30°, as far as I can tell but the ‘problem’ is that the guides snap to pixel boundaries so you can’t paint an individual pixel centred on a guide.

Also, you can’t place a guide on the corner of an isometric grid because the intersection/corner is usually not exactly aligned with the pixels.

For snapping, the cursor itself snaps to the guide (or the grid) but at a small scale, the brush pixels are not centred on the cursor.
Snapping is only strong when you’re zoomed out and if you zoom in so you can see 30px wide details, the snapping becomes almost non existent.
I suppose it’s assumed that you can see where you want to be at pixel accuracy if you’re in that situation.

What you can do is make a large scale grid which will give smaller percentage errors.

If I’ve misunderstood what you’re trying to do and the problem you’re having then please provide a screenshot with a hand made overlay for explanation.

Here it is a overview of my issue:

As you can see my isometric grid is 64px with angle of 30°.
Isometric grid is in blue with guides are in black.

Guides start at the beginning of pixel which is logical. But I would like to understand why isometric grid do not do the same ?. I can understand that it depends on angle and size of the cell. But at least one of the corner (defined by guides) should snap on a corner of grid.

Guides are not precise in Krita, so I do not know if my complete Tile is really 128px by 128px.
In photoshop you have such information (by mesuring it with a dedicated tool, or by simply placing the guide as you want (precisely typing the number of px and the direction - H or V)

Which version are you using? And what is the size of your canvas?

I can believe (or could calculate) that the grid is 30° but it’s not clear that it’s a 64px grid. That 64px is the distance between grid lines at a 0° angle and it changes accordingly as the grid becomes more angular.

The intersections of the 30° grid go to where trigonometric calculations tell them to go which is rarely at a pixel boundary intersection. It’s only at the start of the grid where it will be exactly on a pixel boundary, or a few places further into the canvas where they will be very close to a pixel boundary.

The guides themselves are very precise for position but they can’t match up with isometric grid intersections.
(There are some interesting inaccuracies, even with a 45° grid.)

In Photoshop, can you position a guide line at fractional pixel positions?
The Measure tool would be one way of checking things but all it can do is measure, not help make or adjust anything.

At small sizes with a digital image, you’re limited to integer pixel level precision and the consequences of that.

Edit: Corrected a significant word error.

@tiar I think changes have been made after version 4.4.8 because the Sept 22nd 5.1.0 prealpha has different detailed behaviour compared to 4.4.8.

Krita v 4.4.7
and canvas size is 800px * 800px in this example

Can you please try Krita 5.0.0 beta1 - First Beta for Krita 5.0 released | Krita - and see if it fixes your issue? Some time ago I fixed a very big issue with isometric grids locations, and it seems like maybe 4.4.7 didn’t get that fix.

Note that if you want to check it out, you should first back up your configuration and resources. See here how to do it: Help Krita improve with structured Beta Testing of the new resource system in Krita 5.0

If it turns out that it works better, as I expect since I just checked it and the lines meet in the correct place and not in the middle of the pixel, please pay attention to any new beta version that comes out - it will be safer to keep up with development since there are still bugs there that needs to be fixed before a final release is made. Next beta should be next week. And make extra sure that you update to Krita 5.0 final whenever it comes up.

It would be also awesome if you report issues that you see, at least here on the forum, especially if Krita crashes. That means we’d know about it and we’ll have a chance to fix them if they have high enough priority (but even if not, they will go to the future todo list).

And make sure to be extra safe about saving your files.

(Also I just noticed that Krita 5.0 beta 1 can’t remember the spacing value :frowning: That’s super annoying so I fixed it real quick, and the fix will be in the next beta version and in the next nightly; “next nightly” means: you need to wait ~26h from now, and then download Krita Next from the website).

So i already tried with Krita 5-0-0 in beta and with vertical guides (so based on X), it’s OK, but with with horizontal guides (in Y) the isometric grid is still on half pixel as on the picture below:

So from vector and filling point of view it is better with Krita 5.0.0-beta as you can see:

The filling is more logical and it respect more the isometric grid

Can you share the empty .kra file with me? Like by dropbox or google drive or some temporary file services.

Ok, no problem at all.

Here is the link: Krita files v4.4.7 and 5.0.0-beta

Just to make it clear, here it is a huge difference between v4.4.7 and v5.0.0 beta in isometric grid:

v4.4.7:

v5.0.0-beta:

both have cell spacing: 64px

I’m afraid that if you have 30 degrees angles, then you’re gonna get a sqrt(3) somewhere, so for example, when the x spacing is 64 pixels, then the y would be, let me calculate it, the y spacing is exactly 64/sqrt(3), which means around 36.95, which is not a full pixel and never will be, with such an angle.

If Photoshop tells you that the angle between the lines is 60 degrees or that the lines are in 30 degrees angles, and still shows you perfect pixels, then it’s lying to you, basically :smiley:

For pixel perfect games I guess we should have another isometric grid that would be defined by x and y spacing separately, and not by angles (angle could be shown to inform the user but not editable).

I hope that this at least helped you.

I would suggest doing something else, which is, pick in your mind a nicer value for the vertical spacing - for example I would pick 36 pixels, because it’s much nicer than 36.95 (current with guides) or 37 (the closest value) - and just set up guides for that, and then treat the isometric grid only as a suggestion where the cells are, but actually using only the pixel perfect guides. (Btw you can use Paraller Rules that would snap to the guides, that will allow you to make a grid yourself if you want).

Alternatively, if you’re good at coding, you could take a look at my pixel perfect SeExpr grids: Seexpr pixel perfect grids, hexagonal grids, checkerboard and more! and make your own version for isometric grid with the x and y spacing instead of the angle spacing. SeExpr is a bit like a shader language. It might be a bit of an overkill for this though.


Oh btw, yes, the version in Krita 5.0.0 is different. That’s because it starts painting all of the lines from the top left corner. Previously it would start some lines from the top left corner and some from the top right corner. That caused a lot of trouble. And I could basically do whatever I wanted with grids because… the previous version was actually seriously messed up and in at least some cases, if not all, the lines would move around and change angle if you zoomed in.

PS. That also shows how much (how little) people use Isometric grids, so yeah, I wouldn’t be surprised if there were further issues.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.