Studying Computer Graphics Part 3: Materials & Textures
- Apr 26, 2020
- 2 min read
Our next topic for Computer Graphics was Materials and Textures. For this topic, we learned about rendering materials, shaders and different kinds of texture maps. Materials for instance, are made up of several different properties including colour, transparency, surface roughness and surface reflection. These properties make up the shape and surface of different objects, which can be used by fragment shaders to render textures and materials, as we saw when completing our next exercise.
Textures can use different methods and pre-computed information to render colour onto 3D objects. Examples of these methods can include ‘Light mapping’ where a scenes lighting information is used, ‘Normal mapping’ where lighting, colour and a tangent basis matrix is used and finally ‘Coloured’ or ‘Greyscale Specular mapping’ where the specular colour is used to darken or colour certain areas of an object based on the surface reflections. Textures can also come in the forms of one, two or three dimensions, each can be used for different purposes and achieved different effects.
For this exercise and the upcoming assessment one of the requirements is to load in and texture objects into a 3D scene. To do this I used the previously implemented Mesh class and updated the project vertex and fragment shaders to load texture files from a specified directory. This was also done using AIE bootstraps shader class. The Mesh class was updated to handle texture coordinates in the vertex buffer using properties defined in a ‘Vertex’ struct. This shader then has to be bound, along with its transform, the textures location and the transforms used for rendering the texture.
Using the pre-existing quad object and its transform in the scene, a provided numbered texture was loaded onto its surface.

The above screenshot was taken of my personal graphics project
Tutorials provided by AIE were used in completing this exercise.
References:
Materials & Textures Lecture
Advanced Texturing Lecture
Materials & Textures Tutorial
Stanford OBJ Models



Comments