One of the most important things that you need to know about the Rage 3D engine is how to load meshes into Rage.
To do this we need to take a step back first.
Rage 3D is split into two seperate types of objects.
- Static Objects
- Dynamic Objects
Static objects are objects that will not move while the player / avatar is in a map. Static objects are ALOT more optimized from a rendering standpoint than their counterparts.
It is preferable to have only one static object in a scene, but the engine allows for more than one.
To load a static object from a 3ds file we use: GStaticMesh := rglImportStatic3DS('Data\FlyingIsland\FlyingIsland.3DS');
GStaticMesh is defined as: GStaticMesh: Pointer;
rglImportStatic3DS returns a reference to the newly created static object, and as arguments take the path to the 3ds file we will load.
Dynamic objects are used for any movable objects, these include avatars / player characters, particle systems, and any potencially movable objects in the scene.
To load a dynamic object from a 3ds file we use: GDynamicMesh := rglImportDynamic3DS('Data\FlyingIsland\FlyingIsland.3DS');
GDynamicMesh is defined as: GDynamicMesh: Pointer;
rglImportDynamic3DS returns a reference to the newly created dynamic object, and as arguments take the path to the 3ds file we will load.
And that wraps it up for 3ds file loading into Rage 3D :)
Download the code
Please note: In order to use and compile any of these tutotrials, you will need to download the latest Binary and Art for the engine.
|