Material assigned to the box
PowerVR Exporter settings
Exporting Models (3DSMax)
The Bork3D Game Engine works very well with static models created in 3DSMax. It's a little tricky to get the settings right the first time, but once you have it dialed-in exporting is a cinch.
As of this writing, the PowerVR tools that are compatible with the Bork3D Game Engine only work with 3DSMAX versions 8 and 9.
A Complete Example
If you're just getting started, follow these instructions to create a simple box in 3DSMax and get it displaying in the game.
- Copy the PVRGeoPOD exporter plugin to C:\Program Files\Autodesk\3ds Max 9\plugins\PVRGeoPOD.dle
- Open 3DSMax
- Create a box
- Select the Create tab in the right panel
- Click the Box Object Type button
- Drag a box in the Perspective viewport
- Rename the box M0_box
- Select the Modify tab in the right panel
- Type the new object name into the text edit area
- Bork3D models must begin with M and a single digit
- Under the Parameters menu in the right panel resize the box to 10x10x10
- Assign a material to the box
- Open the Material Editor (press m)
- Drag a texture into a free slot in the Material Editor
- Drag the texture from the Material Editor onto the box
- Close the Material Editor
- Export the model
- Select Export from the File menu
- Select Save as type: PowerVR Exporter
- Save the model as box.POD (POD must be capitalized)
- The following export options should be selected:
- Export geometry
- Export materials
- Coordinate system: OpenGL, Model space
- Vertex colours
- Mapping channels
- Interleave vectors
- Primitive type: Triangle list, Indexed
- Triangle sorting method: PVRTriStrip, Sort verices
- Position: float
- Colour type: RGBA
- UVW0: float
- Click OK to save the model
- Import the model into your project
- Drag the .POD file into the Resources for your project
To render this model in game you'll need to create a RudeObject and assign this model to it. Modifying the example project:
- In RBUITitle.h add a RudeObject member variable, name it m_box
- In the RBUITitle constructor add a call to m_box.LoadMesh("box")
- The mesh loader takes the name you pass in and appends ".POD" to it to find the mesh data
- In RBUITitle::Render() add m_box.Render() after the 3D camera has been set up
RBUITitle::RBUITitle()
{
m_box.LoadMesh("box");
}
void RBUITitle::Render(float aspect)
{
RGL.SetViewport(0, 0, 320, 480);
m_camera.SetView(aspect);
RGL.LoadIdentity();
glCullFace(GL_FRONT);
glFrontFace(GL_CW);
RGL.Enable(kBackfaceCull, true);
RGL.Enable(kDepthTest, true);
m_box.Render();
}
Static Geometry
A large piece of static geometry from Anytime Golf
If your game has large sections of static geometry, follow the same steps as above except do not select "Model space" in the export settings. This will export the geometry with absolute coordinates. (Enabling "Model space" re-centers the model about it's origin).