This is a brief tutorial on exporting meshes from the Blender 3D modeling program into Pseudoform for use as props or levels. All instructions apply to Windows, Mac OS X, and Linux unless otherwise specified.

1. Preparing your computer
Blender is a great free, open-source, multi-platform 3D modeling program. In order to follow this tutorial you'll need a recent version of Blender as well as a recent version of Python for some of Blender's features and the Ogre Exporter that is described below.
This tutorial is written for Blender 2.49 and it won't work like that for 2.5 or later. You should grab the latest version of Python in the 2.x series (Blender 2.49 uses Python 2.x, Blender 2.5 uses 3.x which isn't code compatible).
This tutorial was tested for Blender 2.49a and Python 2.6.2, and everything is worked fine. Once 2.5 is being stable and the Ogre Exporter is available for it, this guide is going to be updated.
For Windows and Mac OS X users:
You can download Blender here:
http://www.blender.org/download/get-blender/
You can download Python here:
http://www.python.org/download/
When installing Blender, remember the chosen location of the user data directory - you'll need that information later.
For Linux users:
Install Blender and Python from your package repository. If you don't know how to do that, refer to the documentation if your Linux distro.
Note: This tutorial covers the basics of exporting models in Blender for use in Pseudoform. Things like modeling, texturing, UV mapping, etc. are not covered here. If you are new to modeling and/or Blender and want to learn more about modeling and using Blender before continuing, I highly recommend you read the Blender 3D: Noob to Pro wikibook found here.
2. Getting the Ogre exporter and OgreXMLConverter
Ogre is the 3D engine Pseudoform uses so we need to export our meshes in its mesh format. To be able to export such meshes with Blender, you'll first need to download the Ogre Meshes Exporter: (Zip | SVN)
Once you've downloaded and extracted it, copy ogremeshesexporter.py and subfolders to the path [user data directory]\blender\.blender\scripts where [user data directory] is the location that you chose during installation.
Note for *nix users: A dot at the beginning of a filename as in .blender indicates on unix-like systems that it should be hidden. You should be able to configure you file browser to show such files. The ls command will show them if you use the -a option.
In addition to the Ogre Meshes Exporter we need an Ogre command line tool, OgreXMLConverter, to convert the XML files produced by the Ogre Meshes Exporter into binary .mesh files that can be used in Pseudoform. If you already have Ogre installed you should have it already. Otherwise, you'll need to download and install it.
Instructions for Windows and Mac OS X users:
Download and extract the Ogre Command-line Tools download: (Win | Mac) Extract/install everything to wherever you want, just remember the location for later.
Instructions for Linux users:
You should be able to obtain an "Ogre Tools" package through your package manager. Remember the location of OgreXMLConverter for use later.
3. Using the exporter
Blender's interface is managed through areas. You can arrange them by pulling their borders and right clicking them:

On the left of every area's header, you can select its type on the buttons marked in the picture. As default there are three areas: The "User Preferences" containing the main menu and the options (enlarge it to see them), the "3D View" and the "Buttons Window".
When you've loaded the project containing the mesh you'd like to export, select the object/mesh that you want to export and then go to File ? Export ? OGRE Meshes.

Once you've done that, you'll see the exporter's interface:

For now, deselect Export Materials. We will be using a material template and manually editing that so we don't need the exporter to generate a material file for us. Also select Fix Up Axis to Y. In Blender the up axis is Z, but in Pseudoform the Y axis is "up." If you don't do this your props and models will come out sideways!
The exporter exports Ogre .xml meshes but we need .mesh files. Click on OgreXMLConverter to activate it and make the exporter automatically convert to .mesh. Then click on Preferences which will bring you to the settings window for the OgreXMLConverter:

Click on Manual and then click on Select to specify the path to the converter. (If you don't have it installed, go back to step 2.) Then click Ok.
To export your mesh, make sure you've selected it, choose a path into which you want it to be placed and then press Export.

You should see a screen with the export log. If there are no errors, you're golden! On to the next step!
4. Getting your mesh into Pseudoform
This can be the tricky part, depending on how complex your object is and what sort of materials you have. To get you started I have prepared a level template that you can use and modify to your needs. Start by downloading and extracting level_template.zip to the /data/levels directory of your Pseudoform installation. Then open level_template.material with the text editor of your choice.
First change level_template_mat to fit the name of your level. So if your level was named "mylevel," you would change it to something like mylevel_mat. Remember this name for use later.
Next, change the diffuseMap path to the path of your diffuse map texture, relative to the Pseudoform data directory. Here, it points to a 512 x 512 wood texture that was UV mapped in Blender. (For reference, texture palettes that you use in your levels should either be 2048 x 2048 or 4096 x 4096, PNG format.)
Finally, change the normalMap path to your normal map texture (if you have one), relative to the Pseudoform directory. If you aren't using a normal map, comment this line out by inserting two forward slashes (//) at the beginning.
We'll leave the aoMap and emissiveMap paths commented out for now because they are still being worked on. If you know what you're doing, go ahead and try them. This tutorial may be updated in the future to cover AO maps and emissive maps.
Using cpp Syntax Highlighting
import normal_map_template from "media/shaders/general.material"
material level_template_mat : normal_map_template
{
set_texture_alias diffuseMap levels/level_template/template_d.png // Your diffuse map texture goes here!
//set_texture_alias aoMap levels/test_ao2/test_ao2_a.png // Pre-baked AO is still a WIP, so we're not going to mess with it for now.
//set_texture_alias emissiveMap media/textures/teapot_e.png
set_texture_alias normalMap media/textures/noisy_n.jpg // Your normal map texture goes here!
}
material level_template_mat : normal_map_template
{
set_texture_alias diffuseMap levels/level_template/template_d.png // Your diffuse map texture goes here!
//set_texture_alias aoMap levels/test_ao2/test_ao2_a.png // Pre-baked AO is still a WIP, so we're not going to mess with it for now.
//set_texture_alias emissiveMap media/textures/teapot_e.png
set_texture_alias normalMap media/textures/noisy_n.jpg // Your normal map texture goes here!
}
Parsed in 0.013 seconds, using GeSHi 1.0.8.4
Save and close the material file and then open up level_template.prop using a text editor. This is very simple. Just change both mesh attributes to point to the path of your .mesh file (relative to the Pseudoform data directory) and change the material attribute to the name of the material you specified earlier.
Using xml Syntax Highlighting
<prop>
<gfx mesh="levels/level_template/level_template.mesh" material="level_template_mat"/> <phys type="tree" mesh="levels/level_template/level_template.mesh" mass="0"/></prop>
<gfx mesh="levels/level_template/level_template.mesh" material="level_template_mat"/> <phys type="tree" mesh="levels/level_template/level_template.mesh" mass="0"/></prop>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
That's it! You're done! Save and close the prop file, then fire up Pseudoform, press F1 to bring up the props menu, and click on the thumbnail of your level to load it. Add more props, portals, lights, triggers, whatever else you need in your level, and then click on the save button to save it as a .lvl file.
Once you're done with that, you're finished. Your level is ready to be shared with the world!
5. Tips
- The exporter will ignore the rotation and transformation of your objects. Use Object ? Clear/Apply ? Apply Size/Rotation in the 3D View or press Ctrl+E to apply it to the vertex data.
- If you've done the above and still have levels that are either way too big or way too small, remember that one Blender Unit (BU) is equal to one meter when exporting into Pseudoform. A medium sized level will be anywhere between 20-75 meters or BU in each dimension.
- By adding more and more window areas, they might not fit their content anymore. For the Buttons Window, you can correct this by moving its contents using the middle mouse button, and/or zooming in and out using the + and - buttons on the numpad.
- If you want to learn more on how to use Blender, take a look at the Blender 3D: Noob to Pro wikibook found here.
Note: If you notice any errors or discrepancies in this tutorial, or would like to suggest improvements, post a repy to this thread. Thanks.
Updates
- 31 Dec. 09, JoR: Blender 2.5 Alpha is released, 2.49 Scripts won't work anymore, The whole UI was rewritten so the guide won't work for it like that. We should update it once it works. Added Updates section.








