Posts Tagged With: Game Development

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

Blog at WordPress.com.