Wednesday, June 5, 2013

A Simple Case of Too Flat Textures

My floor and ceiling leave a lot to be desired. No, I'm not talking about my real-life home; the textures of the ceiling and floor in my little Blender-made room simply don't cut it. It's not that they're bad: they just lack enough detail to make them believable.

I'm not particularly fond of this texture anyway.
After days of scouring the internet and finding no free carpet textures that tickled my fancy, I was forced to stick with the one I'd been using since day 1. It's an alright texture, but it just doesn't feel right for the room. I was dead set on finding a replacement texture for it, and I would not rest until the task was complete; I even went as far as to ask people to take high resolution photographs of their non-white carpet, make them seamlessly tileable, and upload them for me to use as a texture. This didn't happen, but I did manage to find some decent carpet textures with the help of someone in an IRC channel.

The reason I didn't want white carpeting in the room was because the walls and ceiling were already light-colored, and a white carpet just wouldn't look right. A darker colored carpet, such as the one I have already been using, creates much needed contrast between the walls, ceiling, and floor, so they don't blend together as one.

This texture looks more like carpet than the last.
The new texture was great and looked a lot like carpet, but it still lacked certain details to make it feel real. The problem is that it was too flat, and the solution to this type of situation is to create a normal map to create the illusion of bumpiness. I used GIMP in conjunction with the downloadable gimp-normalmap plugin to create the appropriate normal map texture by using a copy of the carpet texture, imported it into Unity, changed the floor plane's shader from diffuse to bumped diffuse, and applied the normal map to the floor.

Now with extra bumpiness!
With the normal map applied, the carpet texture looks more bumpy and less flat. Sure, the results aren't spectacular, but you're not going to get super realistic strands of carpet poking up out of the floor unless you want to hurt your game's performance by using extra polygons or something. I might continue to tweak the normal map in GIMP until I find a "perfect" fit for the floor, but this is good enough for now. I also normal mapped the ceiling due to its ugly flatness.

Before applying the normal map.
After applying the normal map.
As you can see, normal mapping the dull, blurry ceiling turned it into a crisp, detailed ceiling. Normal mapping is definitely a great way to add more detail to your game, and it just looks so much better than without.

No comments:

Post a Comment