Disclaimer: This is not an official NxOgre tutorial. However, it has been revised and edited by the creator of NxOgre and BloodyMess, betajaen.
Help: For any problems you encounter while working on these tutorials, as well as for detailed questions and propositions, please visit the NxOgre OgreAddons-Forum.
Table of contents
In this tutorial you will learn where to obtain the latest version of NxOgre, BloodyMess, and how to set it up on your computer. This whole procedure is not that interesting, but like most SDK's and libraries it must be done. But, I can assure you, it won't take that long and you will soon enough be making full use of NxOgre. Let us begin.
As BloodyMess is based upon the nVidia PhysX physics engine, you will need to download the PhysX System Software along with the PhysX -SDK.
The PhysX System Software is required to run any software that makes use of the PhysX physics engine as it contains the runtime DLL's. Anyone who uses an application using PhysX and NxOgre will have to install the System Software.
The PhysX -SDK contains the header and linker files that are required for NxOgre to compile and work, along with the PhysX documentation, development tools, and samples. It is essential to install the PhysX -SDK in order to develop with NxOgre.
Both the -SDK and System Software (if required) can be downloaded from the links at the nVidia PhysX FAQ page. It is recommended that you install the PhysX -SDK to a path that does not contain spaces, such as c:/PhysXSDK/.
In order to download the latest BloodyMess version, go to the NxOgre github.com repository and download the latest commit. Simply decompress the archive to a folder of your choice. It is again recommended that this folder not contain spaces, such as c:/bloodymess.
Older BloodyMess versions can be found on the BloodyMess release page, however the tutorials are likely to not 100%ly comply with these versions anymore due to some minor API breaking changes.
Once you have downloaded and installed the PhysX System Software and -SDK, and decompressed BloodyMess, you can build NxOgre. There are several different build configurations available. The two most important ones are the Debug and Release DLL's, but you can also build them as static.
With BloodyMess, there is also a totally new build configuration available referred to as Minimal. Building NxOgre as Minimal decreases the file sizes and contains some optimizations at the cost of not being able to make use of PhysX's cooking abilities with which you can dynamically create meshes or cloths at runtime.
BloodyMess comes with pre-built Visual Studio 8 and 9 solutions (.sln file) in the build/msvc folder where you extracted BloodyMess. Within the solution file are three projects:
The first is the core NxOgre project. The other two are specialized classes for different render systems. As you are most likely going to be using Ogre for your rendering system you may disregard the GLUTRenderSystem project which uses pure OpenGL.
To begin building NxOgre in Visual Studio simply go to Build->Build Solution or press F7 on your keyboard.
Once you have compiled the NxOgre and OGRE3DRenderSystem projects, you should have the DLL's, libraries, and includes all required to use NxOgre in your /sdk subfolder from where you extracted BloodyMess. That means you are ready to actually start using BloodyMess. Congratulations!
Setting Up Your -IDE
To use NxOgre within a project you must tell your -IDE where to locate the BloodyMess libraries and include files . To do this, point your IDE's include directories as well as its linker directories to the /sdk folder located where you extracted BloodyMess.
Depending on your mode, you will also need to add the following files to your -IDE as linker dependencies (in addition to ones required by Ogre).
For debug mode:
For release mode:
Well, that's it! You just set up everything on your computer in order to step in the great world of physics with BloodyMess and NxOgre. The only thing left for you to do is to go to the next tutorial and learn how to use NxOgre so you didn't go through this rather boring first tutorial for nothing!