Tutorial 01: Creating your first room

What you learn in this tutorial

  1. How to create textured room models in 3D Studio Max for Dage
  2. How to export models and textures for Dage
  3. How to do basic Room loading

Introduction

This tutorial assumes you have a copy of 3D Studio Max installed in your system, and you have installed Dage and downloaded Starting Tutorial File and extracted it to Dage folder, which we refer with (Dage)\ . Basic steps should be same in most common 3D modelers that has way to export files to 3DS file.

Also these tutorials assumes you have basic knowledge how to find things in 3D Studio Max, like property editor, material editor, etc.

Making very simple scene

Reset Max.

Go to Customize-Unit Setup and make sure Generic Units is checked. Click OK.

Dage uses same Generic Units as Max does.

From Command Panel's Create tab, click Box and Keyboard Entry change Length=20, Width=20 and Height=-1. And then click Create.

We made the Height to -1, because we want to use Z-axel as our ground. It helps later when we add actors and objects and stuff.

Press M to go into material editor.

Create new Standard Material. Dage only supports Standard materials either their own or in Multi/Sub Object material.

Open Maps roll-out, and choose Diffuse slot the bitmap you want. I will use a default brick texture Yellobrk.JPG from Max.

Make sure that Use Real-World Scale is unchecked and Tiling U&V are 1,0 and 1,0.

Next apply the material to the box. Then go to Modify Panel and where you make sure Real-World Map Size is unchecked and Generate Mapping Coords is checked.

Exporting model to Dage

Go to File - Export. Choose (Dage)\data\ folder from Save in and click Create New Folder. Give this name Room01. Enter to newly created folder.

Make sure Save as type is 3D Studio (*.3DS) and set File name to 'Room01.3ds'. Click OK.

Next 3D Studio Max asks if you want to Preserve MAX's Texture Coordinates, and we want, so click OK.

Then you must copy all textures you used to the same folder as the Room01.3DS file is.

I used Yellobrk.JPG so I must put the Yellobrk.JPG to the same folder.

Dage loads the textures automatically, but only seeks from the same folder.

Now exporting is done, and we are ready to load the model to Dage.

Writing first loading room scripts

Go to the (Dage)\data\scripts\ folder and you see there empty onGameLoad.txt script file. Open it in your favourite text editor.

onGameLoad.txt contains all the scripts we want to execute when player launches Dage.

First we need to tell Dage that we want to create new room.

Write inside textfile following lines:

Camera.SetPosition(20,20,20);
Light.SetPosition(0,10,0);
 
Room01 = TRoom.Create();
Room01.Name = 'Room01';
Room01.Filename = 'Room01/Room01.3ds';
Room01.Load();

First we will position Camera and Light.

Then we tell the Dage that we want to create new room, and we want to call it Room01.

Lastly we make Dage to load the file we just created with 3DS Max.

Save the file and go to the (Dage)\ folder and execute dage.exe.

You should see something similar to this image.

Not much eye candy, eh? You can click the mesh and see the default mousepawn.

Now you know how to export a room model from 3DS Max, and use it in Dage.

Back to top
tutorial01/start.txt · Last modified: 2009/06/27 19:05 (external edit)