18. IMPORTING 3D MODELS
HOW TO USE YOUR OWN 3D MODELS
This section is for advanced users only. Although the models that come with The 3D Gamemaker are
great, and new ones are provided free of charge on the web site, you will also want to expand your
own games in the future by using your own custom models. The 3D Gamemaker allows for this.
SETTING-UP THE DIRECTORIES
All custom models appear within the "User" section of The 3D Gamemaker. In order for your model to
appear you have to do the following:
Using Windows Explorer, go into the Objects directory within The 3D Gamemaker (typically this is
C:\Program Files\Dark Basic Software\The 3D Gamemaker\Objects – depending on the path selected when
you installed the program).
You will find a folder called "09User". Open this and you’ll find 8 more folders as follows:
In this example we’re going to import the model of an alien into the Enemy section, so open the
folder
"4Enemy".
You have to create a directory with the same name as your model. Our model is called alien.x, so we
use Windows Explorer to create a new folder called "alien".
It is very important to name the folder exactly the same as the filename of the model. Now you are
ready to copy the model into the folder.
ACCEPTABLE OBJECT TYPES
The 3D Gamemaker will only work with DirectX format 3D models (.X models). This means if your
source model is a 3D Studio file for example (.3DS) then it’ll need to be converted to the .X
format before you can import it. There are many great packages on the market that will do this for
you, one of the best and easiest to use is 3D Exploration by X Dimension Software and you can
download a free trial version from their web site at:
http://www.us.righthemisphere.com/3dexploration/
Once you have your model in .X format, you should double check that the filename matches the folder
you’ve just created. If your folder is called "alien" then the model should be called "alien.x".
Copy your model and any associated texture files into the directory. The texture files must be in
BMP or DDS format and are typically generated by the 3D package used to create or convert your
model. The textures are internally referenced by the model itself, so do not have to be renamed
(indeed your model will appear un-textured if you do so).
CREATING A THUMBNAIL
So you’ve got your model in .X format, you’ve created the folder and copied everything across – the
only thing left to do is create a thumbnail to appear within The 3D Gamemaker window. How you
create the thumbnail is up to you, perhaps you might like to render a small version of it or screen
grab from your 3D package. Whatever you decide there are 3 things to bear in mind:
1. The thumbnail must be 110x97 pixels in size.
2. The thumbnail must be a 16-bit BMP file (or higher).
3. The thumbnail file must be called "thumb.bmp"
Once created, copy the thumb.bmp into the folder containing your model. You can now launch The 3D
Gamemaker and when you click on the "Enemy" button and then "User" your thumbnail will appear.
Clicking on the thumbnail will load your object and you can then modify it’s properties just as if
it was any other 3D Gamemaker supplied object.
ADVANCED TECHNIQUES
It is beyond the scope of this manual to cover techniques such as animating your 3D model, please
check the advanced tutorials to be posted onto The 3D Gamemaker web site for further information,
hints and tips.
hope this helps