Sunday, November 8, 2009

My Vista OGRE

The classes for my Masters that I am taking right now are definitely difficult. In one class, we have a group project to create a real-time version of YouTube. That one has been fun (after moving quickly away from ffmpeg into the Red5 framework) and educational.

My other class is an individual project to create a 3D driving simulator with a focus not only on the data structures, but on a "collision-avoidance" algorithm. I should add that, like in real life, the requirements have changed slightly each week. However, the project has so far been a fun challenge. The biggest change is that we are to create it from the ground up, whereas initially we were going to be given the underlying model and were to just focus on the avoidance of collisions. This change brings me to the point of this post: OGRE and installing it on Vista.

In order to meet the requirements of this project without digging into my wallet, I decided to use the following:
- OGRE 1.6.4 (for Visual C++.NET 2008) Prebuilt SKD: https://sourceforge.net/projects/ogre/files/ogre/1.6.4/OgreSDKSetup1.6.4_VC90.exe/download
- Google Sketchup 7 (free version): http://sketchup.google.com/download/gsu.html
- Ogremeshexporter:
http://cid-ea0e1d9f19828aa4.skydrive.live.com/self.aspx/.Public/Sketchup%20exporter%20to%20realXtend/ogremeshexporter.msi
- DirectX or OpenGL (personal preference)
- OGRECommandLineTools (needed for OgreXMLConverter, which allows for conversions to the mesh format): https://sourceforge.net/projects/ogre/files/ogre-tools/1.6.3/OgreCommandLineTools_1.6.3.msi/download


The reason I went with the prebuilt instead of building OGRE from source was more of a time concern than anything, although I will say that as of a month ago, the source as downloaded from soureforge was buggy.

The installation of the three products was as easy as double-clicking the installer for each one, in the order I have above, setting/verifying the OGRE_HOME environmental variable is set to "c:\OgreSDK", and restarting (not required, but I prefered). To verify that OGRE was correctly installed, the following folder structure should exist:
[root]\OgreSDK\
----\bin
----\include
----\media
----\docs
----\lib (should have "OgreMain.lib" and "OgreMain_d.lib")
----\samples

Outside of the OGRE examples, Google Sketchup can be used to create a new mesh for OGRE. Sketchup can import directly from 3D Warehouse. Once a model has been imported, it can be exported to OGRE mesh format (tools->Export to Ogre Mesh). The Sketchup exporter will have its own directory ([root]\SketchupExporter) in which the exported .mesh, .material, etc. files will be saved to by defualt.

I intend to keep the OGRE thread going for awhile as I work through it, so I am not going to write directly about creating OGRE projects, as it can be a pain in the rear. There is some excellent information on the OGRE Wiki for this information. The last thing I wanted to add to this is that there are AppWizards for automatically creating a new VC++ project and it can be found here: http://www.jacmoe.dk/forum/index.php?PHPSESSID=5bc2de1bec215099e2d76cba08f9a815&topic=3.0
A lot of the links at this page go back to sourceforge, but apparently (I didn't use the wizard) these tools are good for each IDE for which they were written.