IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

14
Page | 1 IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2 This step-by-step guide is the process used to import models built in 3dsmax into Virtual BattleSpace2 (VBS2). These steps can be modified to work with Maya-built models. This guide assumes that the reader is familiar with modeling and UV mapping practices. This is not the definitive guide to model importation, but this is the process that has worked. NOTES : All textures must be .tga and have dimensions with powers of 2 (e.g. 256x256, 1024x1024, etc.) Using 3dsmax version 2011 Using Virtual BattleSpace2 version 1.23 Using Windows 7 STEP 1 : Create a new directory called “vrac_structures” at the following folder path (see figure 1): P: /vbs2/customer/structures/ Virtual Reality Applications Center – Iowa State University

Transcript of IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

Page 1: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 1

IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

This step-by-step guide is the process used to import models built in 3dsmax into Virtual BattleSpace2 (VBS2). These steps can be modified to work with Maya-built models. This guide assumes that the reader is familiar with modeling and UV mapping practices. This is not the definitive guide to model importation, but this is the process that has worked.

NOTES: All textures must be .tga and have dimensions with powers of 2 (e.g. 256x256,

1024x1024, etc.) Using 3dsmax version 2011 Using Virtual BattleSpace2 version 1.23 Using Windows 7

STEP 1: Create a new directory called “vrac_structures” at the following folder path (see figure 1): P: /vbs2/customer/structures/

Figure 1: Folder path for “vrac_structures”STEP 2: You will need to save all of your texture and geometry files (preferably together, in their own properly named folders) to the newly created directory in Step 1. Open 3dsmax (or Maya), create your model, and apply your textures. This guide does not go into the creation of models.

NOTE: Some previously designed models can be found here V:\Applications\LVC\Models (see figure 2).

Figure 2: Folder path for previously designed models

Virtual Reality Applications Center – Iowa State University

Page 2: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 2

STEP 3: Export your model as a .3DS file (see figure 3 for the example model).

Figure 3: ARMY MAN_IOTV ts saved as a .3DS file

STEP 4: Start Oxygen2. If it’s your first time using Oxygen2, you will be prompted to edit the configuration options. Otherwise, select File > Options, see figure 4, and set the following parameters:

Figure 4: Location of options in Oxygen 2

Virtual Reality Applications Center – Iowa State University

Page 3: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 3

External Viewer: p:\tools\buldozer\buldozer.exe –dta=p:\tools\dta –window –noland –buldozer –profiles=P:\tools\buldozer\profiles\oxygenDLL Folder: C:\Bohemia Interactive\VBS2 VTK Developer Suite v1.23\tools\oxygenPath to Textures: P:\(See figure 5 below)

Figure 5: Oxygen2 setting configuration options

NOTE: You may need to restart Oxygen2 and it can take a full minute to start up with Buldozer

running. When you select the Buldozer viewer, it will make your cursor disappear. The easiest

way fix this is to use keyboard command Alt+Tab to “jump” to another program. Once the Buldozer viewer loses focus, the cursor will come back.

STEP 5: Select File > Import > 3D Studio (see figure 6) and select your file to upload. When the Import 3DS window comes up, under the Create Selection tab, check all selections. Make sure the Convert Textures button is unselected and press Import (see figure 7).

Figure 6: Location of 3D Studio import

Virtual Reality Applications Center – Iowa State University

Page 4: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 4

Figure 7: 3DS Import OptionsNOTE:

“Dragging and dropping” the model into Oxygen2 may produce an error message You may need to go back and forth between VBS2 and Oxygen2 to get the scale correct. To check proper scale: In Oxygen2, select Create > Proxy (see figure 8) and navigate to

this directory: p:\vbs2\customer\people\bia_sample_person\bia_rifleman to load in a triangle that gives the approximate size of a human (see figure 9). Scale your model as appropriate using the scale in 3-D button. Delete the proxy model from the window and the list when complete.

The textures probably were not loaded in correctly and you will see only the wireframe.

Figure 8: Location of Proxy Figure 9: Location of “bia_rifleman.p3d”

Virtual Reality Applications Center – Iowa State University

Page 5: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 5

STEP 6: Select Tools > Mass Texture & Material renaming… (see figure 10).

Figure 10: Location of Mass texture & Material renaming

You will need to individually select each texture and give the program the correct file path from the P drive. Buldozer will then automatically convert the files.

Note: Oxygen2 itself may not preview the newly textured model; view the textured model in the Buldozer viewer.

STEP 7: In VBS2, models have different “Levels Of Detail” or LOD’s. The two most important for our applications are view LOD’s (for rendering) and geometry LOD’s (for collision detection, bullet detection, AI view masking, etc.). The other LOD’s provide a more specific model, such as more detailed bullet detection on railings, for example). See the developer’s toolkit for more information regarding LOD’s and their applications.

STEP 8: Save your file to the directory you created in Step 1. The file will now be a .p3d file. Make sure to remember the name you used. Close Oxgyen2.

STEP 9: Create a new file in the directory you created in Step 1 called model.cfg (see figure 11). Within the file add the following code and replace p3d_file_name with the name of the file you created in Step 7 (do not include the file extension).

Figure 11: Location for “model.cfg”class CfgModels {    class vbs2_house;    class p3d_file_name : vbs2_house {}; };

Virtual Reality Applications Center – Iowa State University

Page 6: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 6

Note: When adding more than one model, create more classes with the following syntax:class p3d_file_name1 : vbs2_house {}; class p3d_file_name2 : vbs2_house {}; class p3d_file_name 3: vbs2_house {};

STEP 10: Create a new file in the same directory called Config.cpp (see figure 12). Within the file add the following code and replace p3d_file_name with the name of the file you created in Step 7 (do not include the file extension).

Figure 12: Location for “Config.cpp”

NOTE: The p3d_file_name occurs 3 times; replace it with your file name.

#include "\vbs2\customer\defines.hpp"#define __CurrentDir__ \vbs2\customer\structures\vrac_structuresFOLDER_NAME(vrac_structures);class CfgVehicleClasses{class vrac_structures{          displayname = "VRAC Structures";    //name that is displayed            };};class VBS2_Ruins_Generic;class CfgVehicles{    class vbs2_House;    class BUILD_NAME(p3d_file_name) : vbs2_House      {scope = public;DisplayName =  "File: p3d_file_name";      vehicleClass = vrac_structures;  model =   __CurrentDir__\p3d_file_name; armor =  15; destrType =  DestructNo;          class DestructionEffects: VBS2_Ruins_Generic {};    };

Virtual Reality Applications Center – Iowa State University

Page 7: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 7

};Note: When adding more than one model, create more classes within class CfgVehicles using the following syntax:

class vbs2_House;    class BUILD_NAME(p3d_file_name1) : vbs2_House      {scope = public;DisplayName =  "File: p3d_file_name1";      vehicleClass = vrac_structures;  model =   __CurrentDir__\p3d_file_name1 \armor =  15; destrType =  DestructNo;          class DestructionEffects: VBS2_Ruins_Generic {};    };class vbs2_House;    class BUILD_NAME(p3d_file_name2) : vbs2_House      {scope = public;DisplayName =  "File: p3d_file_name2";      vehicleClass = vrac_structures;  model =   __CurrentDir__\p3d_file_name2; \armor =  15; destrType =  DestructNo;          class DestructionEffects: VBS2_Ruins_Generic {};    };class vbs2_House;    class BUILD_NAME(p3d_file_name3) : vbs2_House      {scope = public;DisplayName =  "File: p3d_file_name3";      vehicleClass = vrac_structures;  model =   __CurrentDir__\p3d_file_name3; \armor =  15; destrType =  DestructNo;          class DestructionEffects: VBS2_Ruins_Generic {};    };

STEP 11:Save the new files. Start PBOPacker (Windows 7): Start > Bohemia Interactive > VBS2 Developer Suite > Terrain Development (see figure 13).

Virtual Reality Applications Center – Iowa State University

Page 8: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 8

Figure 13: Location of “PBOPacker”STEP 12: Select the browse button on the first line to navigate to the following directory:P:\vbs2\customer\structures\vrac_strutures

Select the browse button on the second line and navigate to a directory that is convenient to use, e.g. the desktop (See figure 14).

Figure 14: PBO Packing Utility file pathsSTEP 13: Check “rebinarize” (this optimizes your files for insertion into the game), see above figure. Select the Pack button. Once complete, a new PBO file is created.

Copy this file to the following directory: C:\Bohemia Interactive\VBS2\ca\addons\

Virtual Reality Applications Center – Iowa State University

Page 9: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 9

STEP 14: Start VBS2 and select Mission Editor (see figure 15). Select a terrain file.

Figure 15: VBS2 Mission Editor

STEP 15:Add a new object by selecting the add object icon in the middle right hand corner (figure with a plus sign); select Vehicle (F4). Alternatively, Right click > New Object. From the menu, select VRAC Structures > p3d_file_name.

Figure 16: Add Object

Virtual Reality Applications Center – Iowa State University

Page 10: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 10

FINAL NOTES: You will need to make sure that the vrac_structure.PBO file is placed on all computers that will need the new models. All modifications that VBS2 uses must be on the local drive.

TROUBLESHOOTING: If you have any trouble a good place to start is the include manual located at (Windows 7): Start > Bohemia Interactive > VBS2 Developer Suite > Docs > VBS2 VTK Developer’s Reference (see figure 17). There is little and light documentation on this game. If you can’t find anything you need regarding VBS2, look for information on Bohemia’s modification tools (eg. Oxygen 2). They use a lot of the same modification tools and organization as their other, commercial games (ARMA I, ARMA II, soon ARMA III).

Figure 17: Location of VBS2 VTK Developer’s Reference

Virtual Reality Applications Center – Iowa State University

Page 11: IMPORTING 3DS MODELS INTO VIRTUAL BATTLESPACE2

P a g e | 11

Virtual Reality Applications Center – Iowa State University