Panda is BambooBasic's 3D modeller, in the spirit of MilkShape 3D. You build low-poly
models out of boxes, spheres, cylinders and your own faces, colour or texture them, and animate
them - with pose frames, or with a skeleton of joints. Then you use them in your program as a
.bb3d mesh, or export them as BambooBasic code so there's no model file at all.
Start it from the IDE with Tools > Panda Modeller..., or run
Panda from the BambooBasic folder.
Full documentation can be found in the Panda application's Help menu: Help > Panda Manual (F1). It explains every tool, menu and option, with walkthroughs and answers to common questions. This page is a short summary.
If you haven't drawn 3D in BambooBasic before, read 3D in 2D first: it explains how a model ends up on the screen.
Panda shows your model in four views: Front, Left, Top and a 3D view you can turn round. The panel on the right has four tabs: Model (the tools), Groups, Materials (texture and colours) and Joints (the skeleton). Under the views is the animation bar.
In any view: the mouse wheel zooms, the right or middle button drags the view along, right-drag in the 3D view turns it, and double-click a view (or press F) to fill the window with it. Home resets the views.
The Front view is the front of your model: in BambooBasic, as in Panda, X goes right, Y up and Z away from you, so a model made facing the Front view faces the camera in your program.
examples\BambooRuntime\26 - 3D in 2D\Media\crate.png, say). A box has
every side mapped to the whole picture already..pan file,
Panda's own, with everything in it (texture included).crate) and a folder - your program's Media folder - and click
Export.examples\BambooRuntime\26 - 3D in 2D\MeshLoad.bam in the
IDE (it draws a textured model), copy crate.bb3d and its texture into the example's
Media folder, change Media/cube.bb3d to Media/crate.bb3d
and run it..bb3d stores them. Everything can be undone with Ctrl+Z..pan, which keeps everything. Save your work as
.pan..bb3d or a .glb
(from Blender and most 3D programs).b2dLoadMesh; animation goes in as frames, with the clips.A model looks the same in all of them: facing the Front view in Panda faces the camera in BambooBasic, and faces front in Blender.
As a .bb3d: load it with b2dLoadMesh, read its faces and vertices
(b2dMeshFaceVert, b2dMeshCopyVertsX/Y/Z ...), and draw each face with the
depth quads. b2dMeshAnimate blends two frames for animation. The examples in
examples\BambooRuntime\26 - 3D in 2D (MeshLoad, MeshAnimate,
MeshGLB) show it all.
As BambooBasic code: Include the exported file and there's nothing to load.
For a model called Panda:
Include "Panda.bam" Panda_Build() ; once, before anything else Panda_SetView(450.0, 350.0, 620.0, 0.5, 50.0) ; screen centre, focal length, near, far ; every frame: Panda_PoseClip(PANDA_CLIP_WAVE, seconds) ; pose it from the skeleton (the clip loops) Panda_TurnJoint(PANDA_J_HEAD, 0.0, 30.0, 0.0) ; and turn the head yourself, on top Panda_Draw(0.0, 0.0, 3.0, yaw, 0.0, 0.0, 1.0) ; x, y, z, yaw, pitch, roll, scale
The top of the exported file lists everything it has. examples\Panda\PandaShow.bam
(and PandaShow_web.bam) shows a model exported this way: a panda that waves and dances,
with its head following the mouse.