Feature 8

This feature adds textures to the terrain and other objects. I already had added a texture to my terrain for previous features, so instead of doing nothing I added two more meshes that use textures, A space shuttle (credit to Jafit from blendswap.org for the mesh and texture) and water. The shuttle uses UV mapping to get the correct texture coordinate for a fragment, while the water uses a normal map to affect the lighting.

The only real issue I had was running Chris’s UV map converter on the shuttle file. The file was large enough that the Eclipse console wouldn’t save all of the output for me to copy/paste into a file. It would only keep about a third of the lines ( two ‘vt’ lines and all of the ‘f’ lines). Because I could not get the Eclipse project to run from the command line, I had to dig into Eclipse’s settings to redirect stdout to a file. I found the capability in Run->Run Configurations…->Common. That tab has a setting for directing stdout to the console and/or a file.

Here are two images that show loading the texture into the program and the shaders for the terrain: http://imgur.com/a/cNBDa#0

Here is a video showing the results:
[youtube http://www.youtube.com/watch?v=NznebNATPrE?feature=player_detailpage]


Leave a Reply

Your email address will not be published. Required fields are marked *