Thursday, 1 November 2012

Graphics Programming - Textures

This week i have been playing about with the texturing a little more and getting it so it works with the different  types of light that i have.

Textures and Lights 

Without any light the texture appears on the cube but the cube looks a little rubbish.

This makes the cube look a little better, we have some shading which looks nice but our texture now looks horrible.  
By playing about with the values for the light we can make our texture 'blend' nicely with our cube and our background so it just looks like a tree. 


Mipmaps and Anisotropic Filtering

The next problem was how to handle textures which had to be scaled. To allow this to work we use mipmaps which produces multiple versions of the image at different sizes which allows scaling based on how far away an image is. 
Up close this makes the objects look fantastic but from a distance like in the picture above they just look horrible. To fix this we use anisotropic filtering which helps preserve detail at extreme viewing angles.

Now we can see alot more detail in our texture than we did before and everything looks a lot nicer now.

Blended Textures

Blended textures makes use of alpha maps to determine how our textures blend by using the alpha value to determine the amount of texture that is applied. 

I am still playing about with this at the moment, just now the alpha map gets applied to every texture and object that i have which makes it look like there is a giant patch of grass in space...


Thanks for reading!
Email: 10004794@napier.ac.uk - Please put blog in the subject.
Xbox Gamertag: craigmcmillan01
Twitter: 
steam: craigmcmillan01
add or follow and we can game!

No comments:

Post a Comment