Isometric alignment issue

Started by
3 comments, last by Wyrframe 12 years, 3 months ago
Hey

I recently made a model on an isometric grid yet when i render and place it in my isometric map it doesn't line up properly =/

On the left side of the image it lines up perfect with a 4 by 4 isometric grid (done in blender). So my default grids are 64 by 32. So the image size is 256 by 128.

Yet when i place this image in my engine it doesn't line up =/

Any one done much isometric design to explain my mistake ?


2rfdo5t.jpg
Advertisement
I did some messing around with the image in photoshop and verified that the two projections are the same and the two models are in the same proportions, so that's not the issue. As far as I can tell it looks like an issue with the model's local origin. If you apply an offset of 0.5 * your grid square size in the two axes it should snap back to the grid correctly.
[size="2"]Currently working on an open world survival RPG - For info check out my Development blog:[size="2"] ByteWrangler
What is the cause of this offset though =/ Doesn't it mean I've done something wrong if it is offset by about 50% in the first place :S how do game designers fix this problem normally.
The offset is due to the way the 3d model's coordinate data is exported. Unless you explicitly set the model's local origin, it assumes the model's (0,0,0) point is the centre of the model. In your case, this has caused the model to be be offset by half a grid square because it is 4 units by 4 units and the object's centre falls on the grid lines itself. If it was 5 x 5, you probably wouldn't have noticed any problem.
[size="2"]Currently working on an open world survival RPG - For info check out my Development blog:[size="2"] ByteWrangler
Assuming what we're seeing on the right side of the example screenshot is a rendered image being blitted onto the isometric grid, and not a model being rendered, your problem appears to be that while you rendered the image with its top/left corner at the left/middle edge of a tile, you're drawing it with its top/left corner at the top/left edge of a tile. Shift the image down by half a tile's height, and it'll line up with your grid again.
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.

This topic is closed to new replies.

Advertisement