Importing Objects Bundles and Lists into 3ds Max

Importing statics objects lists and bundles into 3ds Max

Tools: 3ds Max, BF2 plugin tools for 3ds Max

First of all, there are several reasons you might want to do this:

1. Import static object list in order to create an object bundle. (i.e, the ship complex in Iron Gator)
2. Create an custom AImesh
3. Porting to different game (1942 to BF2, for instance or even a completely new game engine).
4. You want to edit a map in 3ds max instead of the editor.
5. Lightmapping, (of course)

This uses the BF2 lightmapping plugin tool for 3ds Max.

The overview of the sequence is:

- convert the bundle items to static object format and save as staticobject.con

- Swap out a map for the mod with this new staticobject.con file

- start up the map in the editor, create a dummy spawn point and then save. This updates the staticobject.con file the editor info listing the location of each static object in the file.

- import the staticobject.con file into 3dsMax using the BF2 lightmapping tool.

From 3ds Max, select the BF2 plugin and then go to lightmapping. Choose import static objects. Select the static object file for the map you are interested in. Be aware that the objects must be exported to where the import tool can find them.

Where is exactly is that, you ask?

Well, look in the staticobject.con file.

The import plugin actually looks at the first section of the staticobjects.con file to figure out where to go looking for each object. It should look something like this:

if v\_arg1 == BF2Editor

console.allowMultipleFileLoad 0

run /objects/staticobjects/industry/ind\_buildings/lrgfactorybuilding/lrgfactorybuilding.con

run /objects/staticobjects/industry/uniqueobjects/coolingtower/coolingtower\_01/coolingtower\_01.con

run /objects/staticobjects/industry/ind\_buildings/dam\_powerbase/dam\_powerbase.con

run /objects/staticobjects/common/com\_objects/ladder\_10m\_noholders/ladder\_10m\_noholders.con

run /objects/staticobjects/industry/ind\_buildings/lrgstrgbuilding\_03/lrgstrgbuilding\_03.con

run /objects/staticobjects/industry/ind\_buildings/constructhouse\_01/constructhouse\_01.con

run /objects/staticobjects/common/com\_objects/ladder\_construct/ladder\_construct.con

run /objects/staticobjects/common/com\_objects/ladder\_3m/ladder\_3m.con

If it's not loading up, start up the map in the editor, create a spawn point and save. The editor will save staticobject file and update that upper section for you.

But what about an object bundle? Well, that takes a bit more work. Each object in the bundle will need to be converted into a static object format like this:

Object.create coolingtower\_01

Object.absolutePosition -89.381/188.040/-101.707

Object.rotation 0.5/0.0/0.0

Object.layer 1

Don't worry about trying to figure out relative vs actual positions. When you import into 3ds Max it will all be relative.

Here is a script to handle the conversion:

https://drive.google.com/file/d/1zKfRAHVHNgocXkSC4tAZO8J-19uRuBUA/view?usp=sharing

It is a python scrip and you need Python 2.7 installed.

You will need to enter the full path and file name. The script will convert the file and write it out with a \_SO.con at the end of the file name, leaving the original unchanged.

Now, open up the map in the editor with the newly create staticobject.con file. (make a back up of the map first) Create a spawn point and save. Now you have an staticobject.con file that can load up your object bundle in 3ds Max.

There is an issue with inporting object bundles that are set with a rotation for the whole bundle. The objects inside the bundle don't get positioned correctly. The workaround is to import without a rotational setting, and then do the rotation on the all the bundle objects at one time within 3ds Max. So, once you have each bundel rotated, you can export each bundle as FBX and them import them back into the main scene.

You could use these and weld them together to create a new AImesh if that was your purpose, however, these are probably more complex than what you need. Freeze the selection and use as guide to import and position the collision mesh of each part.

You can also clean up the scene. If you open up schematic view, you can select all the objects in green, because all you need are the ones in blue. As shown below: