Tuesday, November 11, 2014

Engineering II - Assignment 8 - Texture Addition



Assignment 8 - Texture Addition

ZIP Link

Assignment8.zip

Write-Up
The basics of this assignment were to create a builder class to load all of the needed texture files, and then have a texture added to a material, which will show up in the current build.

Technical Write-Up

The first portion of the file is to have textures in one format saved into your data assets in the DDS format. This is done by creating a build class to focus on building texture files. I added the needed file statements inside the assets to be built,

I would place a texture of the image on my cube and plane, and show it here, but I am still implementing a needed value for them, the UVs. The UVs are setup inside of the vertex information. The texture information is then handled via DirectX calls.

Here is a image of it, without the texture on it, but with a smiley face I drew using MS Paint.




Once the UVs are setup you can create the texture to a variable using the DirectX function CreateTextureFromFile. This function specifically requires DDS textures, which is why forced the textures into that format.

The UV texture are available to the fragment shader. From this point on, the texture color is sampled and applied to the final image when rendered.
Realized Learning Moments

I didn't prepare enough time for this assignment. Rewriting the lua information for UVs is taking longer than expected. I will update the blog with another post, showing those changes.

Time Used

Reading: 1.5 hours
Write-Up: 0.25 hour
Technical Write-Up: 0.25 hour
Coding: 3 hours

No comments:

Post a Comment