In order to start texturing the crate, I needed to set up a UV map. To do this I went into Blender's UV edit mode and selected my entire crate. I marked as seam in order to create a face for every face and then unwrapped it.
It didn't turn out great. The red areas indicate stretching that can been seen on textures so I was a little worried but went ahead and tested the UV map with a material and texture.
It turned out okay. The only problem was that one half of a side of the crate was stretched. This could be problematic. I had a look to see if I could fix this but didn't find a strong/permanent solution. I will just make sure that the stretched side of the crate will not be visible to the player in the game.
Here is the test texture with the stretched side:
I then needed to prepare to bake texture maps for the crate. In order to prepare, I created a new image called Crate_NOR for normal map and made it blank black then created an image node for it to represent.
Once I was ready with the settings shown in the image below I could bake the normal map for the crate:
There isn't a lot to see on the normal map but that was expected. As a low detailed and low triangle model there won't be many bumps or cracks on the map.
I then needed to create an ambient occlusion map. This was nice and easy as all I needed to do was create another image and then change the render samples to a slightly higher number and I was done:
The final stage was to export the crate and test the maps in Unity. I exported the model as an FBX file, then imported it and the maps into Unity. I made a new scene in my game project in order to quickly test this.
I had a terrible problem. Some of the faces of the crate were meshed normals that were facing the wrong way. Some were facing outside (correct), and some were facing inside (incorrect) meaning that depending where you looked, you could only see certain faces. I quickly fixed this by going back into Blender and choosing the inside facing meshes and switching them. I then tried testing in Unity again.
Much better!
Comments
Post a Comment