3DS Loader Example

From GameBrew
3DS Loader Example
3dsloadertas.png
General
AuthorTapio Pyrhönen (Tassu)
TypeDemos
Version2006
LicenseMixed
Last Updated2006/03/26
Links
Download
Website
Source

3DS loader + a very simple platform game example.

No keyframe animations supported yet. Only loads vertexes, normals and texture coordinates.

User guide

At this point the 3ds loader is only good for static objects. No animations supported yet. This program just loads a 3ds-files and generates a function that draws them. Its not the best way to load models, but its very easy.

To use the 3DS loader:

  • Copy your 3ds-files to the folder /source/3ds.
  • Write a list of them to 3dsLoader.ini.
  • Run the 3dsConverter.exe. That should output two files. 3dsLoader.h and 3dsData.h.
  • Include the 3dsLoader.h to your project. (#include "3ds/3dsLoader.h")
  • Use the function "void Draw3DS(int obj_id);" to draw your objects.
  • To find out what obj_id is what object, open the file 3dsLoader.h. Theres a list of the id's.

When making the objects, scale them very small. For some reason they turn out as a big mess if the object is too big. Keep them something between about -5 to 5 units high/wide/deep.

External links

Advertising: