NxOgre.org

File formats in a nutshell

Instead of building meshes and height-fields during runtime, NxOgre and PhysX uses a number of file-formats to serialise them so they can be loaded, edited and saved to disk. However, PhysX does not provide serialisation facilities for some types of meshes, and it does not allow you to save additional data with the meshes. This documentation is to explain NxOgre’s role with PhysX meshes, and what you can do with them with and without NxOgre.

Convex Meshes

The Convex mesh is a 3D convex point cloud with some optional triangles. Convex meshes are used with the “Convex” shape, for use with Actors (and classes that use Actor as a base), KinematicActors, StaticGeometries and Volumes.

Convex meshes files usually have the NXS extension. NxOgre does not expand on Convex files; so any files created with PhysX tools will work in NxOgre, likewise any convex meshes created from NxOgre based tools will work in PhysX only applications.

Triangle Meshes

The Triangle mesh is list of vertices and indices; sometimes known as a triangle soup. It can only be used with StaticGeometries only thus represented with the TriangleGeometry class. Likewise with Convex meshes, NxOgre does not expand on them.

Heightfields

Heightfields are a list of heights of a terrain arranged in rows and columns. There is no file-format for heightfields in PhysX. NxOgre height-fields commonly use the XHF file extension. The xhf file format is known to NxOgre only, there are no other known tools apart from flour that will create them. You cannot use XHF files in PhysX applications without NxOgre.

Cloth

Cloth is a simplified a triangle mesh to simulate cloth within PhysX. Cloth can be flat, or take upon a 3D shape (with the restriction of been a closed mesh). Cloth uses the file extension nxs. Cloth can be saved and loaded into NxOgre using PhysX tools, likewise NxOgre based tools can produce cloth meshes readable by PhysX.

Extended Cloth

NxOgre can extend the cloth to incorporate texture-coordinates to assist with rendering. Extended cloth files usually have the extension XCL. Extended Cloth files are readable by PhysX, but the texture-coordinates are ignored. The classes functions to use cloth and extended cloth are the same.

Summary

Name Extension Readable by NxOgre Readable by PhysX
Convex nxs yes yes
Triangle Mesh nxs yes yes
HeightField xhf yes no
Cloth nxs yes yes
Cloth (with texture coordinates) xcl yes yes1

1 Texture coordinates are not read with PhysX.

IndexWhat is NxOgre?Guides and TutorialsDownloadForums