...

/

Fundamental Concepts in Computer Graphics

Fundamental Concepts in Computer Graphics

Explore the fundamental concepts of computer graphics and learn about camera and projection.

In this chapter, we will expand on our knowledge of the GAN world by looking at the 3D domain. By the end of this chapter, we will have learned how to create our own 3D objects with GANs.

Representation of 3D objects

It is essential to understand how 3D objects are represented in a computer before we dive into the details of the GAN model for 3D data synthesis. The creation and rendering of 3D objects, environments, and animations is called computer graphics (CG), which two of the major entertainment industries, that is video games and movies, heavily rely on.

The most important task in CG is figuring out how to efficiently render the most convincing images on the screen. Thanks to the hard work of people in the CG field, we are now getting better visual effects in video games and movies.

Attributes of a 3D object

The most basic attributes a 3D object has are its shape and color. The color of each pixel we can see on a screen is affected by many factors, such as the color of its own texture, the light source, and even the other objects in the scene. This is also affected by the relative directions of the light source and our viewpoint of the pixel’s own surface, which are determined by the shape, position, and orientation of the object and the position of the camera. When it comes to shape, a 3D model basically consists of points, lines, and surfaces. An example of the creation of the shape and color of a 3D sports car can be seen in the following image:

Press + to interact
The creation of a sports car in Autodesk Maya shows how lines form surfaces and how textures provide colors in 3D models
The creation of a sports car in Autodesk Maya shows how lines form surfaces and how textures provide colors in 3D models

A surface, either flat or curved, is mostly formed with triangles and quadrangles (which are generally called polygons). A polygon mesh (also called a wireframe) is defined by a set of 3D points and a set of segments connecting those points. Normally, having more polygons means that there will be more details in the 3D models. This can be seen in the following image:

Press + to interact
More polygons mean more details in 3D models. Images captured in Autodesk Maya.
More polygons mean more details in 3D models. Images captured in Autodesk Maya.

Sometimes, a set of points (also known as a point cloud in some applications) is all we need to create 3D objects since there are several widely used methods for automatically creating segments in order to generate a polygon mesh (for example, the Delaunay triangulation method). Point clouds are often used to represent the results that are collected by 3D scanners. A point cloud is a set of three-dimensional vectors representing the spatial coordinates of each point. Here, we are only interested in the generation of the point clouds of certain objects with GANs. A few examples ...