1

I'm trying to develop a rogue-like game in unity. Because of this, I need a tile-based map.

Thanks to this tutorial, I've created a 9x9 square tiled map easily. http://classes.design.ucla.edu/Winter11/157B/wp-content/uploads/2011/01/BoardGameTutorialPart31.pdf

For "too long, didn't read" guys, I basically did those steps;

  1. I draw a 2D 9x9 square tile based map with Adobe Illustrator and saved it as Illustrator 8 file.
  2. I imported that AI file to Autodesk Maya and used Mesh->Seperate tool on it. After that, I unparented all of the tiles and ta-da I've created a 3D tile based map. I exported .FBX file to my unity projects Assets folder
  3. I draged .FBX file from my Assets folder and dropped to my scene. Done.

Now, my problem is, I want to apply a texture on a single tile. Nevertheless, whenever I try to apply a texture to any tile, it behaves like I'm only taking 1 / 81 of the texture (remember, it's a 9x9 map) and applied only that part of the texture to the related tile.

I'm uploading a screenshot for a better understanding.

enter image description here

I've googled my problem and according to my findings, it's happening because I didn't do any UV Mapping. Well, the thing is I have no idea how to do it (this is going to be my first game and I'm a super-duper newbie to 3D modelling). Only examples on the web are about general UV Mapping (how to map a cube or some other generic shapes) I have no idea about how to do UV mapping to a tile based map with Maya.

Actually, even I don't know it's an UV mapping problem or not. I'm so stucked. Please help me.

Thanks in advance!

Chris Tavares
  • 29,165
  • 4
  • 46
  • 63
dhargan
  • 408
  • 1
  • 3
  • 16
  • 1
    Yes, the problem is likely to be UV mapping. Either you need to figure out how to use Maya to UV map, or you could create your board differently. One possible way would be to use default Unity cubes (scale the y axis to 0.01 or something), duplicated as necessary (shift-d, move cube, select both cubes, shift-d, move etc.). – user673679 Dec 16 '12 at 14:41
  • 1
    I set x= 9 and y= 9 for every tile and its fixed. But thanks for the advise anyway!! – dhargan Dec 17 '12 at 01:35

1 Answers1

2

I solved my problem.

I just set X = 9 and Y = 9 under the Tile attribute for every tile. Now it looks perfect!

Thank you anyway!

dhargan
  • 408
  • 1
  • 3
  • 16