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

Generating model files programmatically


In a perfect world, every content creation tool would be able to import and export in one common format that can easily be converted to the native data representation of a game engine. But because we do not live in such a perfect world, there are literally hundreds to thousands of file formats for storing 3D meshes. What makes things worse is the fact that there might be no import plugin for our engine or content creation tool available, forcing us into writing our own converter, which is very often the case with brand new tools and file formats.

This recipe aims to be an exercise in writing our own custom file format conversion utility. We will be working on an arbitrary set of vertex data, converting it to Panda3D's internal format, and saving the data into a file.

Getting ready

This recipe extends the basic application skeleton described in Setting up the game structure found in Chapter 1. Please set up a new project according to these instructions...