Introducing Roadway Object 3D Models

Let’s face it, what makes the 3D roadway environments that drivers navigate so interesting are all the roadway objects (buildings, signs, vehicles, people, etc.) that the scene is populated with. I mean, no one likes staring at flat, dull surroundings mile after mile.

Luckily the STISIM Drive Scenario Definition Language (SDL) is a scripting language that lets you build a whole new world on the fly. All these roadway objects are simply 3D graphics models that have been previously designed and built and now reside within the STISIM Drive file hierarchy.

Most clients probably don’t care to learn about the specifics; they simply ask for a model and, poof, there it is! However, if you want to become a super user, you really need to have a basic understanding of the STISIM Drive 3D models. (Note: this blog is not going to tell you how to create 3D models or provide details on 3D modeling, it is simply to introduce the 3D models, and their constituent parts, already within the STISIM Drive system.)

The most important thing when understanding STISIM Drive 3D models is that they are comprised of three main components, and, depending on the type of model, there may be some additional files.

#1: MESH Model File & the Structure of the 3D Object

As the name implies, this file contains a polygonal mesh that defines the shape of the 3D model. However, the polygonal structure of the model is not the only thing the MESH file contains; it also contains information on how each part of the model will be rendered (painted). The rendering part is accomplished by laying a material (see point #2) over certain sections of the model giving that section a specific look.

For example, a road sign will generally consist of a pole and the sign. The pole will look different than the front of the sign, which in turn will look different than the back of the sign. There is a polygonal mesh that makes up the structure of the sign, but the post, front, and back of the sign will all use different materials. That way, when they’re rendered, they’ll look realistic.

#2: Material Properties

As discussed in point #1 above, material properties define how different parts of the model will be rendered. A material specifies what art resources will be used, lighting characteristics, along with other pieces of information. Each material must have a unique name, but each material does not have to be unique (how’s that for a mind bender?).

The material name must be unique because if you have two materials with the same name the model could be rendered incorrectly. As an example, if our sign post from above has the material name MATERIAL#123 and references a picture of a sign post, but another model has a material with the same name that references a picture of a football, then the sign might be shown with a football as the post!

However, the material itself does not have to be unique. For example, you could have fifty road signs and each one of them has a sign post. In this case, all fifty models can reference the material named MATERIAL#123. Fifty models, one material. If you then want to change the material properties for the sign post, you only need to make a single change, not fifty changes.

Material properties are stored in MATERIAL files, and these files can have numerous material definitions in them. Plus, they don’t all have to be for a single model: a material file can contain materials for a whole bunch of MESH files.

Using the same example from point #1, each of the three materials mentioned could exist in a file all by themselves so that you have a single MATERIAL file to go with the MESH file. Or, the three materials could be added to an existing MATERIAL file that has material properties for other models in it. The way STISIM Drive handles materials is with a single MATERIAL file for each group of models. That means there’s a MATERIAL file for animals, one for buildings, one for vehicles, etc.

#3: Artwork & Texture Maps

The third component of our 3D models is the artwork (texture maps) that is used to make the models look realistic. These texture maps are stretched across the outside of the polygonal mesh to make the object look realistic. Art resources are specified as part of the material that is associated with a specific part of the 3D model and can be virtually any picture or image.

Bonus #4: Skeleton Files

The final files that are required by some models are the skeleton files. These are included with any 3D model that has moving parts (vehicles, pedestrians, etc.).

To put it all together, take a look at this conceptual representation of a 3D model.

If you ever had the gumption to root around in the STISIM Drive root folder (C:\STISIM3), you probably noted a subfolder named Data that in turn had many subfolders with all kinds of names ranging from Animals to Vehicles.

The Data subfolder contains all 3D models that the simulator uses, which means it’s a vital component for simulator operation. Within these folders you will find examples of MESH, MATERIAL and artwork files.

Dig a little deeper and you may also notice many MKA files. These are MESH files that have been encrypted to protect them from use by other software (it’s a piracy thing). While you may not be able to do anything with the polygonal meshes for these encrypted files, you can go in and tweak their material properties and even their artwork, if desired.

There are a couple of resources that you may find useful when thinking about STISIM Drive models are the model library document (C:\STISIM3\Help\Model_Library_Manual.Pdf), and a tutorial for creating simple 3D road sign models starting with an existing model (C:\STISIM3\Help\Simple Road Sign 3D Model Creation.pdf). Take a look at those when you’re ready to learn more!

Finally, when the rendering engine initializes, it reads through and parses all mesh, material and artwork files that are specified in the C:\STISIM3\Data\OGRE_Resources.Cfg file. This is how the simulator knows which models to care about when it builds the roadway environment.