Book Image

Panda3D 1.7 Game Developer's Cookbook

Book Image

Panda3D 1.7 Game Developer's Cookbook

Overview of this book

Table of Contents (20 chapters)
Panda3D 1.7 Game Developer's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Improving performance by flattening scenes


While the scene graph and renderer of the Panda3D engine generally do a good job managing and drawing scene data, they are easily overloaded with data. Too many different models consisting of lots of geometry nodes while all being transformed to various positions will quickly push the scene graph to its limits, while the renderer has to wait for the graphics card because all these models in the scene need to be sent one by one to the graphics card for drawing to the screen.

The easiest step to decreased scene complexity, for sure, is to remove objects from the scene graph. This works, but it removes details from our game and may make it look empty and cheap.

Fortunately, there's an alternative solution we can try before starting to cut models from our scenes. Panda3D provides an API for simplifying scenes by precalculating transformations as well as combining scene nodes and their geometry to please the graphics card by sending this data in one big...