Gamasutra: The Art & Business of Making Gamesspacer
An Environmental Pipeline in MaxScript
View All     RSS
December 14, 2017
arrowPress Releases
December 14, 2017
Games Press
View All     RSS






If you enjoy reading this site, you might also want to check out these UBM Tech sites:


 

An Environmental Pipeline in MaxScript


December 9, 2008 Article Start Previous Page 3 of 3
 

Model Database

At first, I intended to simply use 3ds Max files and make the scripted tool control how they were saved and organized. However, I soon realized that I was going to need direct access to the information within the files in order to make certain parts of the process work effectively.

Additionally, file size and access speed became a problem, and after a few tests I found that saving basic data to a customized format and reconstructing the models in the current scene was both efficient with disk space and could be accessed very quickly.

This method also avoided a problem with the merge function in earlier versions of 3ds Max. Usage of the function required user input in a number of different situations and the whole point was to automate as much as possible. A "quiet mode" parameter was later added to MaxScript in order to address the problem.

I needed to create a custom format, but I wanted to make it something generic that could easily be changed to suit any kind of data that exists in the 3ds Max application. As I learned more about MaxScript, I found that it makes use of a generic struct data type that was perfectly suited to do just that.

After quite a few late nights, I managed to create a tool that acted as a game model database. Adding a new model involved setting it up according to a few rules, including the linking of untextured geometry that represented either portals or collisions or attached effects, and then pressing a button that would automatically categorize the model, generate a thumbnail image, and save its data to a generic, intermediate format.

Multiple copies of each model were kept and could be retrieved if necessary, providing a rudimentary form of source control. I gave the scripted tool a silly name, BlockHead, for its use of building blocks for construction.

Over several months, BlockHead functionality was my focus and I added nearly all of the features I had envisioned, thanks to 3ds Max's powerful scripting language. I contacted the programmer that had developed Luminaire and he graciously obliged me on a number of feature requests, including MaxScript support.

It would have been impossible to automate the lighting process otherwise. Automatic renaming of objects according to our convention and calling an external export application to get the data in final game format became part of the save procedure.

Over the length of two expansions of PlanetSide, BlockHead was given several overhauls and a complete rewrite and renamed ConMan, short for Content Manager (pictured below). The rudimentary source control was replaced with direct support for Perforce through a proprietary 3ds Max plugin.

A search function with wildcard support was added for navigating the database, as was more robust lighting functionality, including a feature for mixing a weathering pattern into the light maps for models on the terrain.

In 2008, I officially released a library of 3d Studio Max script functions to the public. The unwrap functions and a sample tool are part of the release, as are the math functions used in the portal linking procedure, but without an example. The functions for loading and saving generic struct data as well as the functions for rendering light maps are provided along with sample tools for both.

You can download the library directly from Gamasutra here, or visit the author's site to download it here


Article Start Previous Page 3 of 3

Related Jobs

2K
2K — Novato, California, United States
[12.13.17]

LEAD RENDERING ENGINEER
Titan IM
Titan IM — Port Stephens, New South Wales, Australia
[12.13.17]

Senior Game/Software Programmer
Insomniac Games
Insomniac Games — Burbank, California, United States
[12.13.17]

Director, Core
Insomniac Games
Insomniac Games — Burbank, California, United States
[12.13.17]

Director, Gameplay Programming





Loading Comments

loader image