123do: Creation of a cube with and without collision box

From Grand Prix Legends Wiki
Revision as of 10:05, 8 April 2009 by Bernd Nowak (Talk | contribs) (Background)

Jump to: navigation, search

One-Two-3DO (also known as 123do)

One-Two-3DO or in short 123do let's you create 3DO objects for GPL. You can get it here: [Link to One-Two-3DO].

It runs fine here for me with Windows Vista 64 bit with an Nvidia 8800GTS. Only thing which had to be changed is to "Disable desktop composition for the OneTwo3DO.exe like you can see in this screenshot

Vista Compability Settings

When you start 123do you will see a window like this:


Now you must understand that you need points (vertices) to attach polygons and lines on them.

The unit measurement 123DO used is in metres. Thanks to Ginetto here's a translation formula:

1 metre = 3.28083 feet = 39.36996 inches

Let's create a simple 3DO cube

Background vertices

First, here's a generic picture of the 3D room and how the vertices are positioned for a cube. This picture shall tell you a bit about the positioning of vertices in GPL.

3DO Room

I have numbered the vertics we need for a cube from 0 to 7. Like a real cube the cube in 3DO has 8 corners. You may ask yourself why I start counting the vertices at 0. 123do and GPL use a different approach for counting. The first element is 0 instead of 1 we're using outside in the real world.

If I want to create a 3DO cube with a dimension of 1 metre for every side of the cube I need to create those 8 vertics:

vertics index	x	y	z

0		1	0	0
1		1	1	0
2		0	1	0
3		0	0	0
4		1	0	1
5		1	1	1
6		0	1	1
7		0	0	1

You need those vertics as points for polygons or lines. Without those vertics you can not assign a polygon or a line to it.

Here's a picture to display an idea how it works for a simple polygon:

Attaching a polygon to vertices

The edges of the polygon are attached to the vertices.

Adding vertices

Now this should be enough for the basics of vertices and polygons. Let's get back to the open 123do program and transfer what you have read above to the real cube.

To add the vertics to 123do open the Create/Add vertices manually from here:

Create/Add vertices

You should then see this window, showing you defined vertices on the left side and the possibilities to add/edit/remove vertices on the right. I have filled in the values of vertic 0. Remember from the background section Background about vertices the matrix about the 8 needed vertices.

Create/Add vertices window

Now in the next image you see I have filled in all needed vertices for our test cube.

8 vertices added

Close the dialog and choose File/Save project. Make it easy and give it the name of the 3DO you wish to have. Please use 8.3 syntax naming the project. In my example I use cube like you can see from the attached picture:

Save project

Adding Textures


Now it's time to think about the cube, vertices, polygones and what we will see in GPL. To the cube in GPL it needs to have some bitmaps painted on the sides. You recall that the sides are build out of polygons. If I only create the polygons in 123do and attach no texture to it you would have an object like this in GPL:

Untextured cube in 3D

A 3D object without any meaning. Not even as an object nice to stop shortcutting.

Here're the textures I made for our cube. Due to display limitation I have uploaded the file File:123docubetextures.zip which contains the follwoing bmp files:


Remember I mentioned that 123do only uses bmp files and a 3DO object in GPL uses mip files. Where's the logic behind this ?

For creating the 3DO object in 123do it's much simpler to use only bmp files because you can reload the textures without the need to edit the picture first and then create/update the mip file every time. When the 3DO will be created only the first part of the 8.3 filename will be stored in the 3DO file.


Use bmp filenames with the 8.3 name schema.

Good filename => "cubebo.bmp" Bad filename => "cubebottom.bmp"

So use only 8.3 name schema and don't use blanks in the filename.

Another limitation is the size of the texture. Read this quote carefully:

Using mips with size, in pixels, which are 512x256 or bigger will not work on 3Dfx graphic cards because they simply don't support textures bigger than 256x256. So keep this in mind.

The size always has to be the power of 2 for a mip to work, here are the most common sizes: 256x256, 256x128, 256x64, 256x32, 256x16,128x256, 128x128, 128x64, 128x32, 128x16, 64x256, 64x128, 64x64...and so on. Any deviation from these sizes, and the mip tools won't work, or if you should manage it anyway, you'll get the dreaded 'Could Not Load Track' error in GPL.

There is a catch - the bigger textures you use, the more energy they suck out of your gfx card, and frame rate drops. For instance, if you're making a wall, try not to use one huge mip, but rater small, repeating ones, using bump-mapped textures. More on this later. But using a small texture will look bad when close-up because it gets pixellated, there is too little detail. This is something we just have to live with in these days. Not quite real-life just yet!

Adding Polygons

Untextured first

BMP File:Cubeba.bmp

Now we come to the hardest part of it. We need to add the polygons. When adding the polygons, the sequenz how you add the vertics will be critical from where your polygon will display an attached texture (bmp in 123do and as a mip in GPL).

If we add the vertices 0,1,2,3 in that sequenz you can see from the picture above that this is the bottom of the cube. Imagine watching from the bottom:

0,1,2,3 would be clockwise. This would result in a plane pointing in your direction which would mean that you can see the image. 3,2,1,0 would be anti-clockwise. This would result in a plane pointing away from you which would mean that you can't see the image.

Please select the Create Polygons button:


I have filled in the values for this polygon as well as the values for the remaining 5 polygons.