Jump to content
  • Advertisement
Sign in to follow this  
CelticSir

Isometric alignment issue

This topic is 2519 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!