CAIA 070809A: Map & Entity Modeling for L3DGEWorld

Map & Entity Modeling for L3DGEWorld

CAIA Technical Report 070809A

Carl Javier
cjavier@swin.edu.au
August 7th, 2007

Introduction

L3DGEWorld is a network monitoring and control application based on Open Arena, a GPL'd game that makes use of the Quake III Arena (Q3A) game engine. L3DGEWorld allows monitoring and control of a live network to take place from within a virtual world created by the game engine.

L3DGEWorld currently creates a virtual world in which spinning objects represent the rate at which IP packets are heading towards particular, monitored IP addresses on your network. The L3DGEWorld virtual world is not restricted to IP packets. The virtual world and objects (known as entities) can be customised to suit any monitoring purpose. An example of a L3DGEWorld variant is LCMON 1.0 which monitors the Swinburne Supercomputer. L3DGEWorld variants can be achieved by using tools such as GTK Radiant (used to create the virtual world known as maps for many games ) and Milkshape 3d (used to create entity models that interact with the virtual world).

This report outlines the basic steps to create a customised map and entity replacement models for L3DGEWorld.

(note: This guide is predominantly for Windows Users and only covers enough knowledge to get custom maps and replacement models working for the L3DGEWorld environment.)

Installation & Configuration of Software

Overview of software needed:

Installing L3DGEWorld and Open Arena:

Step 1: Download and install a full version of Open Arena 0.60. Default location of installation is 'C:\Program Files\OpenArena'.
Step 2: Download the L3DGEWorld package suited for your OS from L3DGEWorld site. (L3DGEWorld package has minimal Open Arena textures. Thus a full version of Open Arena is needed to obtain additional textures for modelling in step 1.)
Step 3: Extract L3DGEWorld package. (Any unpacking tool that un-packs tarballs can be used. eg 7-Zip File Manager).
Step 4: Within the main l3dgeworld folder, copy the 'l3dgeworld', 'binaries' into the Open Arena folder ('C:\Program Files\OpenArena\')
Step 5: Also from the main l3dgeworld folder, copy the appropriate scripts for your platform as shown in Figure 1. (These scripts launch the modified ioquake3 binary with set flags).
Figure 1: Copy contents from l3dgeworld folder to Open Arena folder.

Step 6: Test L3DGEWorld by executing a script that you copied to the Open Arena folder. (If all instructions were followed, L3DGEWorld should load with stationary pyramids lined up in a grid like fashion.)

Installing and configuring GTK Radiant (for windows) :

New maps/worlds can be created for L3DGEWorld to suit the type of monitoring application. For example, a virtual office could be mapped to represent the real world office filled with computers. (note: For *nix and Mac OSX users, please follow this guide to set up GTKradiant for OpenArena.)

Step 1: Install GTK Radiant from (http://www.qeradiant.com/). The default location would be 'C:\Program Files\GTKRadiant 1.5.0\'

(note: GTKradiant by default is not set up to recognise Open Arena.)

Step 2: For Window users, download this zip file and copy the files and folders from the GTK Radiant folder into where GTK Radiant was initially installed. These files and folders are the 'games/oa.game' file (used to instruct GTK radiant the where abouts of Open Arena on the system) and 'oa.game' folder (used to tell GTK radiant what kind of entities can be used). (note: Open Arena must be installed in "C:/Program Files /OpenArena/" else files from games/oa.game and oa.game/l3dge/entities.def will need to be modified.)

Step 3: Start GtkRadient, and on the global preferences popup select the game "Open Arena". (If GTK start up assertion error occurs, follow these instructions.)

 

Installing Milkshape 3D:

Step 1: Download and Install Milkshape 3D. There is not any special configurations for Milkshape 3D.


Custom Map Modeling

Overview of steps used to create a map:

(note: This report does not go into detail of each step above but highlights the important steps needed to customise a map for the L3DGEWorld application. )

Good beginners and advance guides to mapping and GTK Radiant can be found here and here. It is advised to read these before moving on.

Before mapping, all *.pk3 files in the 'baseoa' and 'l3dgeworld' of Open Arena Folder ('C:\Program Files\OpenArena\') need to be unpacked. This will make it easier to find and view textures instead of GTK Radiant unpacking them on the fly. (note: pk3 files are archived files. Your favourite archiving application eg WinZip, WinRar can be used to open pk3 files.)

Unpack each *.pk3 file to where it originally was. Remove *.pk3 files from the folder by either creating a new folder and placing them in there for safe keeping. (note: the whole purpose of this is because *.pk3 files will take precedence over the unpacked files and folders. We just need to make sure the *.pk3 files cannot be found so the extracted files and folders are used.)


Creation of virtual world using brushes:

In the virtual world, the environment is made up of several basic shapes (squares, rectangles, spheres and so forth) known as brushes. These brushes are textured to give the virtual world a sense of realism and colour.

Step 1: Start GtkRadient, and on the global preferences popup select the game "Open Arena" (Figure 2) .

Figure 2: Select 'Open Arena' at the GTK Radiant global prefence.

(note: If Open Arena is not an option, please refer back to "2. Installing and configuring GTK Radiant (for windows)".)
(note: If GTK start up assertion error occurs, follow instructions to fix the error).

Step 2: Go to "File" -> "Project Settings" and select the mod "L3DGEWorld" (Figure 3).

Figure 3: Select 'L3DGEWorld' for the project settings modification.


Step 3: Create a map as you normally would by using brushes and texturing them. (A good guide to creating your first map/room can be found here). It is suggested starting off with creation of a basic room before moving on from this point.


Entity Placement:

Using the custom 'entities.def' file (Step 3 of 'Installing and configuring GTK Radiant (for windows)' ), L3DGEhosts can be added by using the right-click menu (Figure 4). Their in game number will correlate to the order in which you add them to the map. This means that the first L3DGE host entity that is added will be referenced as 'Entity 1' .

Figure 4: L3DGE host entity placements are added by using the right-click menu.

L3DGE host models can be replaced. For more information please see 'Custom Entity Modeling' a few sections below. Arranging entities is an artform itself. Entities should be arranged in L3DGEWorld so that a quick overview of the system can seen. An example map is the LCMON 'greenmachine' map below which is available here. 'greenmachine' map portrays an amphi-style theatre of cluster-nodes of the Swinburne Supercomputer. Figure 5 show the design of greenmachine in GTK Radiant and Figure 6 shows the end result of the map.

Figure 5: 'greenmachine' map being created with GTK Radiant. Figure 6: 'greenmachine' map loaded in L3DGEWorld engine.

Texturing:

Textures are what are placed on the surface of brushes. They give brushes and models life.
Map textures will be pulled by GTK Radiant from the 'baseoa\textures\' and '\l3dgeworld\textures\' folder. New textures can be placed in these folder and must be saved in JPEG or TGA format. It is advised to place new textures in the l3dgeworld folder.

(note: If these folders do not exist and *.pk3 files are found instead, then the *.pk3 files need to be unpacked using an unpacking application such as WinZip.)

Lighting:

Another essential to map making is lighting. Basic lighting can be added by using the right-click menu and selecting 'light'. The intensity of lighting can be specified at creation. Ensure lighting to be inside the room you have created else at compile time a 'Map leak' error will occur.

(note: The number of lights and complexity of lighting will affect compiling time of the map and possible game engine performance issues.)

Shaders:

Shaders are short scripts which define the property of a surface texture. For example, you may notice in some games the sky moving or a piece of armour glowing bright on a model. These scripts instruct the game engine what kind of effects should be applied to a surface. More information about shaders can be found here.

(note: Applying too many complex shader effects can cause performance degradation on the game engine.)

Compiling your map:

Step 1: Save the map in "C:\Program Files\OpenArena\l3dgeworld\maps".(Maps will be saved using ".map" as an extension.)
Step 2: Maps need to be compiled into .BSP format. To do this, simply click on Build - > Q3Map2: (test) BSP - meta,-vis,-light -fast -filter
Step 3: This action will compile your map. The type and number of lighting and shaders used will determine how long the map takes to compile.
Step 4: To test your map, either create a new shortcut to ioquake3.x86.exe located in the 'binaries' folder of OpenArena with the following flags.

binaries\ioquake3.x86.exe +set fs_game l3dgeworld +set sv_pure 0 +set vm_game 0 +set vm_cgame 0 +set vm_ui 0 +set developer 0 +devmap (name of your map) +set fs_homepath "."

or

Edit the scripts copied in Step 5 of 'Installing L3DGEWorld and Open Arena' to load map.

If a 'Map Leak' error occurs during compile run time, GTK Radiant will advice you on what entity and where the map leak has occured. Ensure all rooms created are closed off and all entities are placed within the room.

Custom entity Modeling

Custom Models can be created and textured to suite the type of monitoring L3DGEWorld will visualise. The follwing instructions can be followed in more detail here. Models/Entities in L3DGEWorld are saved in md3 format. The same format as Quake III models. Example model files for L3DGEWorld can be downloaded here.

Overview of steps to create a custom model:

(note: Custom models are only replacement entity models for current entity models.)

Step 1: Start Milkshape 3D.
Step 2: Create your model using primative shapes in Milkshape 3D.

Tip: Import the pyramid model used as the default model in L3DGEWorld as a guide for size. Go to File -> Import -> Quake III Arena MD3 ...
Locate pyramid.md3 in the 'l3dgeworld\models' folder. If the models folder is not there, it should be unpacked from l3dgeworld_models.pk3 file.
Delete the pyramid model when your custom model is roughly around the same height and width. You can select the pyramid by using the "groups" tab on top right of the GTK Radiant window.
Step 3: Model textures for the model should be placed in the same folder as where the *.md3 file will go or in 'l3dgeworld/textures'.
Step 4: Before creating an MD3 file, a .qc file needs to be created. 'qc' files are control file which embeds instructions into the md3 file about what textures should be placed onto the model. Go to Tools -> Quake III Arena -> Generate Control File as shown in Figure 7. Save this files with the same name you intend to name the model. Edit the *.qc file to specify where the model is and what textures go on it. More info about can be found here

Figure 7: Make sure to save and edit the *.qc file for the model before exporting mode as *.MD3.

Step 5: To export model as MD3: Go to File -> Export -> Quake III MD3 ...
Step 6: Save the md3 file in the same location where the *.qc file was located.
Step 9: To test the newly created model, simply replace an existing model's md3 file and load a L3DGEWorld script.

(Note: Make sure to back up the model being replaced.)

Conclusion

We have given a brief overview on how to map a new environment for L3DGEWorld using GTK radiant. New entities can be modeled using Milkshape 3D. There are numerous monitoring systems that could be enhanced greatly with the versatility of L3DGEWorld.


Last Updated: Thursday 9-Aug-2007 17:49:02 EST | Maintained by: Grenville Armitage (garmitage@swin.edu.au) | Authorised by: Grenville Armitage (garmitage@swin.edu.au)