Question

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!

Was it helpful?

Solution

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!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top