Creating or loading your own objects

If you wish to use your own models in this example, you shall need to create one in the correct format; pi3d supports obj (wavefront object files) and egg (Panda3D).

An excellent, free, 3D modeling program is called Blender (available at http://www.blender.org). There are lots of examples and tutorials on their website to get you started with basic modeling (http://www.blender.org/education-help/tutorials).

The pi3d model support is limited and will not support all the features that Blender can embed in an exported model, for example, deformable meshes. Therefore, only basic multipart models are supported. There are a few steps required to simplify the model so it can be loaded by pi3d.

To convert an ...

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.