Weird effect on placing background tile

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
taustinoc
Dragon
Posts: 518
Joined: Mon Aug 03, 2015 6:30 pm

Weird effect on placing background tile

Post by taustinoc »

I found this in 1.4.0.0, but get exactly the same thing in 1.3.b98 and 1.3.91.

I have road segment images that I drop on the background. The size is 1250 x 453 pixels. When I drop it on, everything lines up the way it should. If I zoom in to where I can see individual pixels, it lines up perfectly.

https://drive.google.com/open?id=0B8QCC ... V93eXdfSzg

But if I rotate it 90 degrees, the edges are on the middle of the pixels of the background. It's off by half a pixel.

https://drive.google.com/open?id=0B8QCC ... mtaQ1JKaXM

If I do the same thing with a different road segment file that is 5000 x 682 pixels, this does not happen. Everything lines up in both orientations. The one difference I notice is that the one that is weird has an odd number of pixels in one dimension, the other an even number. If I adjust the size of the weird one to an even number of pixels, it lines up correctly when I rotate it (but, of course, is one pixel to large or too small at that point).

If I rotate the CorelDraw original and export it again, I get the same effect, which is to say, when I drop it on the map, it lines up correctly (now vertical instead of horizontal), but if I rotate it, it's off by half a pixel.

Is this normal? How can it be off by half a pixel?

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Weird effect on placing background tile

Post by aliasmask »

Size matters. I recommend resizing the image to be an even number of pixels. Also, if you're worried about centering you can change an image size from free to large and then back to free again to have it centered differently.

So, lets say you have a 50px grid and put down a 200x200 image. You'll notice it's centered on a single grid square, in the middle of it. So, you'll have from the center of the square it coming out 100 in each direction which puts the image unaligned with the grid. By changing the foot print to large and then putting the image back to free then the center of the footprint is on the grid axis and the image lines up with the grid. But that doesn't help you if you have a dimension with an odd value.

taustinoc
Dragon
Posts: 518
Joined: Mon Aug 03, 2015 6:30 pm

Re: Weird effect on placing background tile

Post by taustinoc »

I wouldn't have commented on it not centering on the grid. That's expected on background objects. But it's not centering on the pixels. I'm pretty sure it only does it when the image has dimensions that are an even number one way and an odd number the other way. When it rotates within MT, it centers on the same spot, which puts the edges half a pixel off from the background.

The workaround is easy enough, though; just keep two versions of the image, on vertical and the other horizontal.

Post Reply

Return to “MapTool”