NxOgre.org

Flour

Apart from an essential ingredients for cakey goodness. Flour is a multi-purpose Windows command-line tool for converting Ogre Meshes into PhysX ones for use with NxOgre.

Fetching Flour and Install

The installer for Flour (0.3.2) can be downloaded from your local NxOgre website. As this tool is meant for Artists, You don’t need to install Visual Studio, compile Ogre/NxOgre (don’t worry it has them inside it) or even install the PhysX SDK to use it – but you will need the PhysX System Software though, but luckily I made one specially for you.

The Flour installation tool will silently install it to c:/Program Files/ or c:/Program Files (x86)/ depending on if your Windows is 32-bit or 64-bit.

Use

Open a command prompt, and goto the Flour directory, which you’ll find the lonely fat Flour executable in there.

C:\Program Files (x86)\flour>flour

No command given, try one these: convert, make, remotedebugger, test, version or view
If you're in a bit of a pickle, try one of those commands with this "flour what-is <command>"

Tool: Test

The test tool will perform a few stressing tests on the PhysX SDK and the NxOgre within. On failure would mean that PhysX is not installed, or Flour was installed incorrectly.

Syntax

flour test

Example

C:\Program Files (x86)\flour>flour test
---------------------------- NxOgre Single Test ----------------------------
Versions:
  - NxOgre 1.0.22T5 Bleeding Edge
  - Ogre 1.6.0 'Shoggoth'
Results:
  - Core: ........ - PASSED


 All tests were sucessfull!
----------------------------------------------------------------------------
OK

Tool: convert

The convert tool can convert the following files into;

  • An Ogre Mesh (mesh) into a PhysX (nxs) file as a Convex or Triangle Mesh.
  • An Ogre Mesh (mesh) into a NxOgre (xsk) file as a CCD Skeleton.
  • A 8-bit or 16-bit RAW image into a NxOgre (xhf) file as a Heightfield.

Syntax

flour convert params

Params

in
(filename) File to be converted. ex. barrel.mesh
out
(filename) File to be saved to. ex. barrel.nxs
into
(triangle, convex, skeleton or heightfield) Conversion type. ex. triangle

Additional params for heightfields

width
(unsigned integer) Width of the image in pixels ex. 512
height
(unsigned integer) Height of the image in pixels ex. 256
depth
(8 or 16) Image depth ex. 16
signed
(yes or no) Does the image/heightfield have negative height

Example

flour convert in: barrel.mesh, into: convex, out: barrel.nxs

flour convert in: skeleton.mesh, into: skeleton, out: skeleton.xsk

flour convert in: image.raw, into: heightfield, out: heightfield.xhf, width: 512, height: 256,
depth: 8, signed: yes

Limitations and notes.

  • Convex meshes have a vertex limit of 255.
  • Skeleton meshes have a vertex limit of 64.

Heightfield notes

  • When the image is signed and the depth is 8-bit
    - Highest height is RGB or 32768.
    - Lowest height is RGB or -32768.
    - Zero is RGB (127,127,127) or 0.
  • When the image is signed and the depth is 16-bit
    - Highest height is RGB (65535,65535,65535) or 32768.
    - Lowest height is RGB (0,0,0) or -32768.
    - Zero is RGB (32678,32768,32768) or 0.
  • When the image is unsigned and the depth is 8-bit
    - Highest height is RGB (256,256,256) or 65536.
    - Zero/Lowest height is RGB (0,0,0) or 0.
  • When the image is unsigned and the depth is 16-bit
    - Highest height is RGB (65535,65535,65535) or 65536.
    - Lowest height is RGB (0,0,0) or 0.

Accepted file formats

  • Ogre Mesh (Shoggoth format) to PhysX NXS (Triangle Mesh or Convex)
  • Ogre Mesh (Shoggoth format) to NxOgre XSK (Skeleton)
  • 8-bit or 16-bit RAW with no header or additional data to NxOgre XHF (Heightfield)

IndexWhat is NxOgre?Guides and TutorialsDownloadForums