14
Creating Instanced Crowds
Welcome to Chapter 14! In the previous chapter, we explored the tech side of inverse kinematics. Using inverse kinematics, constrained movement of models can be made more natural-looking, such as climbing stairs or holding artifacts in their hands.
In this chapter, we will add more virtual people to our virtual world. We’ll start with a brief overview of the right way to add multiple instances of the glTF model, as naive duplication raises a lot of problems.
Next, we’ll split the model class into two parts, one for the shared part of the model data and the other one for the individual data of every instance on the screen. Moving the instance data to a separate class allows full control of every single model instance we draw on the screen.
Then, we’ll extend the code to allow more than one model type and look at a GPU feature to let the graphics card do even more work while drawing instances. At the end of the chapter, we...