Creating a scene with 3D primitives and a texture
In this recipe, we’ll create a simple signpost using an image containing text, as well as a combination of 3D cubes, cylinders, and plane primitives.
While in some cases we’ll use complex 3D models that have been imported from modeling apps or third parties, there are cases where 3D primitives are quick, simple, and sufficient for a game task. Examples of 3D primitives in games include invisible objects with trigger colliders (for example, to open doors or signal a checkpoint), the use of spheres as projectiles, the use of scaled cubes and planes for signposts, and so on. The speed and simplicity of using 3D primitives also make them perfect for fast prototyping, where the objects act as placeholders that can be replaced with more sophisticated models at a later stage in the production of a game. Materials can be quickly created that reference images to textured 3D primitives.
Figure 5.1: A signpost created...