Saturday, March 1, 2008

My first mesh... and a comment from my son

Half a day to create my first mesh it should be a wagon... and I have no idea if this is a good performance or not :D

So that I can remember how I did it, here is a short description of the steps needed to create this image with Ogre, Blender and visualise the result in OGEd:

  1. Launch Blender and try to use it.
  2. Search online Blender tutorial to understand the most basic commands: Blender User Interface Tutorial, Modelling A Cube, Selecting Meshes and Using Textures.
  3. Struggling like hell to select faces, rescaling, subdividing to create more faces, destroy some faces to create doors and windows, ...
  4. Repeating step 3 several times.
  5. Reread 'Using Textures' to understand how to apply textures.
  6. Save and repeat steps 3-5 until you get this wagon. Forget about making a complex multiple windows wagons.
  7. Using the steps on "Blender to Ogre" to determine how to export the mesh:
    1. Copy the Pyhton script from ogrenew/tools/BlenderExport to the blender folder
    2. Read the documentation in BlenderExport/ogrehelp/ogremeshesexporter.html
    3. Realise that Blender must have a version newer than 2.44 (mine is 2.43)
    4. Download Blender, reinstall it, reload the mesh.
    5. Realise that I didn't compile OgreXmlConverter (/ogrenew/tools/XMLConverter)
    6. Install OgreXmlConverter and set up the mesh exporter correctly.
    7. I said correctly.
    8. .... no mesh appear in the exporter.... lose time to understand that you need to select the object and click Update if you want the mesh to be exported.
  8. (Repeat from step 5 because there was no textures on some faces...)
  9. At last the export works and here are:
    1. MyMesh.mesh.xml and
    2. MyMesh.material
  10. Now you must convert it to a .mesh so that Ogre can understand it. So you search the doc to find that you need XMLConverter again.
  11. In a console you type "OgreXmlConverter MyMesh.mesh.xml" and you get MyMesh.xml
  12. You load the mesh, material and texture in a mesh viewer (OGEd for example).
  13. .... and you see that the mesh is turned 90 degree on its x axis.... Bags!
  14. You find that the ogre addons MeshMagick can rotate a mesh.
  15. You try to compile it and stumbles on a compile error...
    1. You check the code and see that this can't compile.
    2. So you make a quick fix (who needs to convert mesh skeleton anyway... humpf... I will need to compile this correctly at one time).
    3. You type a bug report about this skeleton bug.
  16. You rotate it... in the wrong direction... redo it.
  17. Reload all in OGEd and... yes it shows correctly.
That was easy - I will watch a movie now.

Comment from my son (3.5 years old) "Dady doesn't even know how to make wheels!". I will disinherit him...

No comments: