Well, moving on then. So I've been working on textures, lately, gearing up to do some actual level design, once we have a better idea of what we're doing. I also made a light map shader that we can use for our levels. Instead of lighting the level in game, we can use that shader - come to think of it, we might need a specular version as well - to substitute for lighting. That way, we can bake all of our lighting in maya, using as many inefficient lights as we could possibly want, and whatever effects we want, and it won't effect performance at all. Part of the hurdle there was getting multiple UV sets to work. This allows us to have the advantages of both tiled textures, and unique UV coordinates. Tiling textures by extending uvs outside the 0 to 1 UV range works great for applying textures because you get way more bang for your buck, so to speak. Each pixel on a texture map can show up on as many faces as you need it to, as many times as you need it to, i.e. the size of your texture doesn't necessarily correspond to its quality. On the other hand, having a separate UV map where everything is in the 0,1 range, and nothing is stacked, means that each pixel on a UV map corresponds to at most 1 point on geometry, which is absolutely necessary for light mapping. You get less density that way, but you don't need as much texture space with light maps as you do with textures. By way of example, I made this object to test with:

The model is comprised of 9 cubes. The diffuse texture is applied 4 times per face, and there's 6 faces per cube. 9*4*6 = 216. So from an efficiency stand point, 21600% of that texture is being used, compared to the lightmap, which, as you might be able to tell, is using maybe 85% of the texture space, but at the same time, that light map would not be possible with the 'more efficient' repeating UVs.
So for the rest of the weekend, I'll be making textures, and maybe some small objects like lamps, or maybe some architectural elements.
No comments:
Post a Comment