Skip to content

LoadMesh

Claude edited this page Oct 27, 2026 · 11 revisions

LoadMesh

Command Index · Blitz3D · Meshes

LoadMesh file$, parent%=0  ; returns Int

Works in: Blitz3D

Loads a model from a file as one mesh entity. Any hierarchy and animation in the file is thrown away and the whole model is merged into a single mesh, which is what you want for scenery and props. The original reads .b3d, .x and .3ds; here .b3d and .3ds files work. The mesh is made at the origin even with a parent. If the file cannot be found the result is 0, so check it.

Use LoadAnimMesh when the model has bones or parts that need to move on their own.

Parameter Type Default Description
file String required Path of the model file.
parent Int 0 Entity the mesh follows, or 0 for none. Defaults to 0.

Returns: The handle of the mesh, or 0 if the file could not be loaded.

Differences and known gaps:

  • Only .b3d and .3ds files can be loaded. .x files are not read, so the result is 0. The 3D Studio loader is described in 3D Studio models.

Related commands

Command Index · Blitz3D · Meshes

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally