LoadMesh()

Syntax

Result = LoadMesh(#Mesh, Filename$)
Description
Loads a new #Mesh. If #PB_Any is used as the '#Mesh' parameter, then the new mesh number will be returned as 'Result'. Before loading a mesh, an archive must be specified with Add3DArchive().

Mesh is required to be in the OGRE .mesh format. A command-line tool based on assimp is available to convert many 3d formats into the OGRE mesh, including materials and animations. It can be downloaded here: OgreAssimpConverter.zip (Windows only). Some problems have been reported with shadow and converted meshes, if that happen use OgreMeshUpdater.exe on the newly converted mesh and it should fix it.

It is also possible to use existing exporter for Milkshape, Lightwave, Blender or 3DS Max. More information may be found on the OGRE website.

If Result equals 0, then the Mesh may not be loaded. If the #Mesh already exists, then it is freed and replaced by a new one.

Supported OS

All

<- IsMesh() - Mesh Index - MeshFace() ->