OGRE

Configure NxOgre in Ogre3D – Collision Detection


Author : Pubudu Ranathunga (pubudurana@gmail.com)

Here are the basic steps and simple guide for integrating collision detections in Ogre3D using NxOgre. (For Complete Details : Click Here)

Required Software

  1. Physx sdk
  2. NxOgre (Physx wrapper for Ogre)
  3. Critter (Rendering system for NxOgre)
  4. Flour (Bounding box constructer for |NxOgre)

Steps carried out to integrate physics project

  1. Install the Physx SDK to machine and setup Environment variable “PHYSX_DIR” to physx sdk folder path.
  2. Extract Nxogre and  open Nxogre project using VC++.
  3. Link  Physx SDK includes and Lib folder accordingly in VC++ (Tools –> Options –> Projects and Solutions –> VC++ Directories)
  4. Build the project. (If you have successfully configured NxOgre as earlier steps, a separate sdk folder should have been created inside NxOgre folder)
  5. Setup environment variable “NXOGRE_DIR”  and set  path to NxOgre sdk
  6. Extract Critter to a preferred location and open VC++ project.
  7. Link with Nxogre and build the project (If successful, a separate sdk folder should have been created inside Critter folder ).
  8. Include NxOgre and Critter SDK folders to the created project.
  9. Put all the DLL files in Physx,Nxogre and Critter to release or debug folder of the project accordingly.
  10. Put LIB files (Physx,Nxogre,Critter) to a folder and link to the project and Start the project.

Steps to build Flour to create bounding boxes

  1. Extract Flour to a preferred location and link with Nxogre
  2. Build the Project  and put Nxogre and Nxcharacter DLL to use Flour

Steps to build an accurate bounding box

  1. Export  a “.mesh” file from preferd modeling software.
  2. Convert  to “.xml” file using Ogre XML Converter
  3. Then go to exporters/OgerXML  folder in Flour  and  run ogrexmltoflower.rb file using CMD                     ( Machine should have Ruby installed )
  4. Fallow the guidelines on CMD to create  .flower file
  5. Copy that “.flower ” file to the flour release folder and run the command “Flour convert (folwer file name) (folwer file name) .nxs ”

Author : Pubudu Ranathunga (pubudurana@gmail.com)

Categories: Game Development, OGRE, Physics Engines, Virtual Reality | Tags: , , , , , , , | 2 Comments

Install and configure OGRE3D 1.6 with Visual C++ 2008


April 30,2012

NOTE : This post is about install and configure ogre3d version 1.6. Now 1.7 version is released and this book “OGRE 3D 1.7 Beginner’s Guide” will guide you well with new releases and examples. But configurations will guide same as the following post.

July 21, 2010

OGRE3D is the most popular open-source graphics rendering engine and it is used for game developing, simulators, educational software, interactive art, scientific visualization and even in commercial 3D games. Ogre provides a powerful environment for creating C++ programs and it has to be configured for Visual C++ to create projects. Here I mentioned requiring software to be installed and how to configure ogre in Visual C++ 2008 Express Edition for MS windows.

Download and Install
Download following bunch of software and install them as the order

  1. DXSDK_Aug09.exe : Download
  2. Visual C++ 2008 Express Edition : Download
  3. OgreSDKSetup1.6.5_VC90.exe : Download
  4. Ogresdkwizard90_v1_5_1.zip : Download (This tool adds a new type of project to the VC++ interface, so that you can easily create a new Ogre project using a wizard. Double click “VC9_Express_Setup.js” or run it in command  prompt)
Configure ogre in VC++ 2008
After complete the full installation, open VC++ 2008 Express Edition from; Start –> All Programs –> Visual C++ 9.0 Express Edition. Here you have to set paths for configure ogre and DirectX.
Open following window and add new paths (if not exist) for each following options in “show directories for:” tab.
Tools –> Options –> Projects and Solutions –> VC++ Directories
(Paths can be changed as your installation directories.)
  • Executable files…
C:\Program Files\Microsoft DirectX SDK (August 2009)\Utilities\Bin\x86
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
C:\OgreSDK\bin
C:\OgreSDK\bin\debug
C:\OgreSDK\bin\release
  • Include files…
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
C:\Program Files\Microsoft DirectX SDK (August 2009)\Include
C:\OgreSDK\include
C:\OgreSDK\include\opt
C:\OgreSDK\include\CEGUI
C:\OgreSDK\include\WIN32
C:\OgreSDK\include\OIS
C:\OgreSDK\samples\include
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\atl
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc
  • Library files…
C:\Program Files\Microsoft DirectX SDK (August 2009)\Lib\x86
C:\OgreSDK\lib
C:\OgreSDK\lib\opt
C:\OgreSDK\samples\src
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
Your First Program
File –> New –> Project –> Visual C++ –> OGRE SDK Application –> “enter new project name” –> OK –> Next –> (check Application type as Standard application) –> Finish
If correctly configured first program will be run successfully.
Debug –> start Debugging –> select a Rendering subsystem –> OK
OGRE head should be viewed on your screen.

Ogre Rendering Window

Now enjoy your works ! Use Ogre Tutorials and Ogre Forums for more help.

NOTE : This post is about install and configure ogre3d version 1.6. Now 1.7 version is released and this book “OGRE 3D 1.7 Beginner’s Guide” will guide you well with new releases and examples.

Categories: Animations, OGRE, Vidusayura, Virtual Reality | Tags: , , , , , | 3 Comments

Blog at WordPress.com.