RvS Mapping Tutorials
Odds & Ends
Navigation

Importing Static Meshes into your Raven Shield Map
-by Beckett, last updated May 1, 2003

This tutorial will not deal with static mesh mapping issues such as scale, ambient glow, collision, transparency, or penetration (I promise to cover these in future articles). This tutorial will not teach you how to use 3ds max, Maya, or gmax. This tutorial WILL show you how to get your models from these programs into your Raven Shield map. In fact, I'll offer five possible methods for getting static meshes into your map. In the case of 3ds max and Maya Complete, I will refer you to two excellent tutorials by Gradient and furrycat, who have done a better job explaining the intricacies of these two programs than I ever could have.

If you’ve never modeled a 3d object in your life, this tutorial is for you. If you’ve created static meshes for UT2003 but can’t figure out how to get your models into your Raven Shield map, this tutorial is for you too. If you’re a professional 3d modeler but new to UnrealED, keep reading.

Portions of this tutorial may direct you to install third party programs to your hard drive; do so at your own risk, as I cannot be held responsible for any effect these programs have on your system (I have to say that, you understand).

Intro to Static Meshes

While there are pros and cons to using static meshes in place of BSP geometry, most map-makers agree that the advantages outweigh the disadvantages in most situations and that static meshes are the best choice for many areas of your map. The primary benefit of static meshes is that you can reuse the same static mesh many times in the same map without the engine working much harder than it would if you were only using the model in one spot. With clever scaling, rotating, and retexturing of the same static mesh, you can create a detailed environment (for example, a forest of many trees) at a minimum performance cost. The engine would need to work much harder if these objects were all rendered as BSP brushes. While not necessarily a ‘benefit’, it is worth mentioning that static meshes can be overlapped with BSP brushes without risking the BSP holes which usually result from overlapped BSP geometry.

Static meshes are ideal for furniture, decorative objects, vehicles, and any complex models that are mainly ‘for show’. They can also be used effectively as ladders, stairways, doorframes, and railings. What static meshes should not be used for are walls, ceilings, floors, or terrain. Static meshes are not capable of dividing zones, they do not reflect lighting as well as BSP brushes, and they require more computations to handling lighting and collision.

This tutorial will discuss five alternatives for creating and importing static meshes. I do not consider these alternatives ‘equal’; some are better choices than others. However, my goal is to provide options for those of you who might already be comfortable working with one program or another, as well as for those of you who can’t afford professional 3d modeling software.

UnrealED

Yes, you can create static meshes right from within the RvS editor. This is not the recommended method for creating static meshes--it may result in less optimized models--but I’ve talked to a lot of map makers who use this method exclusively, and I’ve been impressed by the complexity of some of their models. I think most serious 3d modelers would tear their hair out if they had to do all of their modeling in UnrealED, but it’s worked very well for me for simple static meshes.

Create your desired model using basic BSP primitives, clever clipping and deintersecting techniques, and possibly the 2d shape editor (which I’m not going to get into in this tutorial). It’s alright if your model is comprised of more than one brush. Add the appropriate textures (these textures will be retained). Select the object or objects that comprise your model; they can be any combination of brushes and static meshes. Right click and select “Convert | To Static Mesh”. Name the static mesh something like this:

Package: mymapname_SM
Group: Vehicles
Name: Jeep

Immediately click the “Save” button in the static mesh browser to save the “mymapname_SM.usx” package file. Never name your package with the exact same name as your map, always add “_SM” to the end. Avoid modifying the packages that shipped with the game, for obvious reasons. Also, avoid saving static meshes to the built-in “MyLevel” package; it is more stable and better organized to save them to an external package file, as outlined above. If you inspect the properties of your new static mesh in the static mesh browser, you’ll see that the editor has intelligently identified surface materials based on where unique textures were applied.

3ds max

Gradient offers an excellent tutorial on exporting static meshes from 3ds max and importing them into the Unreal engine.

http://www.planetunreal.com/fordy/gradientssmeshtutorials/contents.html

In addition, ArGh from the RvS dev team has recommended the following guidelines when modeling for Raven Shield maps: Setup your 3ds max preferences so that the unit conversion works the same as in the Raven Shield engine. Assign Units Setup to “Metric Centimeters”, and set System Unit Scale to “1 Unit=1.0 Centimeters”. Export static meshes from 3ds max as .ASE (ASCII) files, with the following export settings:

Output Options: select only Mesh Definition and Material.
Object Types: Geometric only
Static Output: 0
Precision: 5
Mesh Options: Mesh Normals and Mapping Coordinates should be selected.

Maya Complete

furrycat has put together a great tutorial on exporting static meshes from Maya 4.5--using the ActorX plug-in--and importing them into the Unreal engine. I believe that his steps will work with versions 4.0 and 5.0 as well, just make sure you download the correct Actor X plug-in.

http://ravenshield.furryclan.net/tutorials/staticmesh/

Gmax

I know there are a lot of you who are interested in modeling custom static meshes for your RvS maps, but do not have the cash for 3ds max or Maya Complete. So I did some research and testing to see if a free solution exists. The challenge is to get the rendered models into a file format that it can be imported into the RvS map editor. First I investigated whether gmax--a free tool provided by Discreet, the makers of 3ds max--could be used to create static meshes for Raven Shield. David Smith from
gmaxsupport.com was an enormous help in finding a file conversion solution. Be warned, this is a work-around solution intended mainly for Quake map-makers who are already comfortable working with gmax, or for 3d modelers who have worked with 3ds max in the past, but no longer have access to the full version. (If you’re an UT2003 map maker or a UT2003 player, I recommend you skip to the next section on Maya Personal Learning Edition instead.)

First, download the following three files:

ftp://ftp1.discreet.com/web/products/gmax/gmax12.exe

http://www.dsmith.gmaxsupport.com/downloaditems/md3exp.zip

http://www.dsmith.gmaxsupport.com/downloaditems/3dexplor1_5.exe

The first file, ‘gmax12.exe’, is gmax itself. Install it to your hard drive. (You will need to obtain a free registration key from Discreet’s web site.) The second file, ‘md3exp.dle’, is a plug-in that will allow you to export from gmax into .md3 format. Place this file in the ‘\gmax\stdplugs\’ directory before you startup gmax. The third file, ‘3dexplor.exe’, is the setup file for 3d Exploration, a graphics program that we are going to use solely to convert our .md3 file to an .asc file. (I warned you that this was a work-around solution.) Install 3d exploration to your hard drive.

Startup gmax. Open the “Customize” menu and choose “Units Setup…”. Make sure “Generic Units” is selected and click the “OK” button. Open the “Customize” menu again and choose “Grid and Snap Settings…”. Select the “Home Grid” tab. Set Grid Spacing to “16” and Major Lines every Nth to “8”. This will match the standard grid configuration in UnrealED. Model your object. (If you’re brand new to the program, just select “Sphere” from the “Object Type” options on the right and left click and drag in any viewport to create a simple model.) Do not assign uv maps or mapping coordinates. Don’t bother assigning textures, because they won’t make it through the import process. With your object or objects selected, open the “File” menu and choose “Export Selected…”. Save the file as “sphere”, making sure that “Save as type:” is set to “Quake III (*.MD3)”, and remember where you save the file to. In the dialog box that appears, set “The Following Frames:” to “0” and uncheck “Show Warning Dialogs”. Click the “Export Now” button. Close gmax (you can save the scene if you wish to).

Launch 3d Exploration. Open the “File” menu and choose “Open…”. Set “Files of type:” to “Quake 3 Model (*.MD3)” and open the “sphere.md3” file. Open the “File” menu again and choose “Save as…”. Set “Save as type:” to “3D Studio ASC file (*asc)” and save the file as “sphere”.

Unfortunately, we still can’t import this file into UnrealED as a static mesh, so we’ll import it as a brush instead. Open the Raven Shield map editor and subtract an area to work in (or open an existing custom map). Open the “Brush” menu and choose “Import…”. Open the “sphere.asc” file. In the dialog box that appears, make sure “Solidity” is set to “Solid mesh” and click the “OK” button. The red builder brush will resize to the imported model. Select a texture and add a geometry brush somewhere in the subtracted area. Move the builder brush out of the way. Select our new brush in one of the 2d viewports, right click, and select “Convert | To Static Mesh”. Enter a package name, group name, and static mesh name. (As always, I recommend naming the package with your map name, followed by “_SM”. Immediately click the “Save” button in the static mesh browser and save your .usx package.

I can’t promise that UnrealED will agree with every .asc file that you try to import. In my testing, I was successful at importing some pretty high-polygon models. The few crashes I experienced occurred when I didn’t have vertices explicitly defined for a model. Thanks again to David Smith for providing most of the information above.

Maya Personal Learning Edition

In looking for a bridge between Maya PLE and the RvS map editor, I ran into one roadblock after another. Maya PLE does not support export to .ASE format, the ActorX plug-ins only work with the full version of Maya, and the UnrealED plug-in that ships with Unreal Tournament 2003 does not work with the Raven Shield editor. What’s more, the RvS version of UnrealED is not capable of opening UT2003 static mesh packages, and no version of UnrealED allows you to export static mesh models. Eventually, I settled upon the following steps, which require that you have installed UT2003 and the version of Maya PLE that bundles with that game (not the version of Maya PLE offered as a free download on Wavefront’s web site). The approach I use will be very familiar to anyone who’s worked with the UT2003 ‘unEditor.mll’ plug-in before.

Be warned, this is a work-around solution at best, intended only for map makers who do not have access to 3ds max or Maya Complete, but who are doing serious enough 3d modeling that the UnrealED geometry tools aren’t getting the job done. If you’re only creating simple static meshes, I recommend you avoid Maya PLE completely, create your models in UnrealED, and then convert them to static meshes right in the editor (as explained above).

First, make sure you have the UT2003 version of UnrealED installed. Next, make sure you have installed Maya Personal Learning Edition from the third UT2003 CD. (You will need to obtain a free registration key from Wavefront’s web site.) If you own an early version of UT2003 (if you bought the game when it first came out) there is a good chance that the version of the 'unEditor.mll' plug-in that was installed from your CD will not work properly. If you experience problems with the export (or if you just want to be preventative), I recommend that you download the following updated version, unzip it, and place the new file into PLE's '\bin\plug-ins\' folder, overwriting the original.

http://unreal.epicgames.com/files/MayaPLE_UnEditorPlugin2.zip

Open your Windows control panel (open the Windows Start Menu and choose “Settings | Control Panel”) then open the “System” settings. Select the “Advanced” tab and click the “Environment Variables” button. In the System Variable list, select “Path” and click “Edit”. At the end of the Variable Value text field, add a semi-colon (;) followed by the path of the Unreal Tournament 2003 system folder (for example, “C:\UT2003\System”); as you do this be VERY careful not to erase the existing Path info. Click the “OK” button” to save your modified path. Click the “OK” button twice to close the Environment Variables and System Properties windows. Launch Maya PLE, open the “Window” menu, and choose “Settings/Preferences | Plug-in Manager”. Find “unEditor.mll” and select the “loaded” checkbox. This will auto-launch the UT2003 version of UnrealED; minimize it (but make sure you keep it running) and return to Maya. (If you accidently close UnrealED, you will need to close and reopen Maya before you can reload the plug-in.) If you want the UT2003 editor to load every time you start Maya, select the “auto load” checkbox as well. Click the “Close” button.

Make sure the dropdown box on the far left of the top toolbar is set to “Modeling”. If you have a saved polygonal model that you’ve previously created in Maya PLE, load that now. Otherwise, you can create a simple model by opening the “Create” menu and choosing “Polygon Primitives | Cone”. (If you clicked on the box icon rather than the word “Cone”, just click the “Create” button in the dialog box that appears). With the object still selected (indicated by a yellow/green outline), open the “Create” menu, choose “Sets”, and click the box icon next to “Set”. Change the name to “myCone” and click the “Apply and Close” button. Note that more than one object can be added to the same set.

Next we’re going to add some attributes to our set that UnrealED will understand. Open the “Window” menu and choose “Outliner”. Select “myCone” from the list. . Open the “Window” menu again and choose “Attribute Editor”. Open the “Attributes” menu and choose “Add Attribute”. Set Attribute Name to “scale”, set the Data Type to “Float”, and click the “Add” button. We’re going to add two more attributes the same way. Set Attribute Name to “package”, set the Data Type to “String”, and click the “Add” button. Set Attribute Name to “group”, set the Data Type to “String”, and click the “Add” button. Click the “Close” button to close the “Add Attribute” window. Now we can assign values to our new attributes. Expand the “Extra Attributes” section in the Attributes Editor. Set Scale to “25”, package to “rvs_export”, and group to “shapes”. The larger scale you enter, the larger the model will initially appear in the unreal editor.

It’s export time. Click in the command line text box in the bottom left corner of the screen, type the following: “unEditor mesh myCone” (this IS case sensitive), and press [Enter]. Pay attention to the message that appears to the right of the command line. It should say “Result: [1] static meshes(s) exported”; if a problem occurs, it will display an error message instead. Switch to the UT2003 editor which should already be running. Open the Static Meshes browser and select the “rvs_export” package. We could choose to texture the static mesh now, or after we get it into the RvS editor. I say we do it now. Open the Textures browser, and click the “Open package” button. Browse from the ‘\UT2003\textures\’ folder to the ‘\RavenShield\textures\’ folder and open any familiar .utx file. Select a texture, then return to the Static Meshes browser. Select the “myCone” static mesh, expand “Materials”, expand “[0]”, select “Material”, and click the “Use” button.

Since UT2003 static mesh packages are incompatible with the RvS editor, and since there is no way to export static meshes from within UnrealED, we’re going to have to export the model as a brush instead. Subtract a medium sized cube in the UT2003 editor. Right click on the floor and choose “Add Static Mesh: ‘rvs_export.shapes.myCone’”. Believe it or not, the editor won’t let you properly convert to a brush at this point, but we can outsmart it by creating a second static mesh based on the first one. Right click on the static mesh we placed and choose “Convert | To Static Mesh”. Set Package to “rvs_export”, Group to “shapes”, and Name to “myCone2”. Click the “OK” button. Select “myCone2” in the Static Meshes browser, right click on the floor again, and choose “Add Static Mesh: ‘rvs_export.shapes.myCone2’”. Right click on the new static mesh and choose “Convert | To Brush”. Open the “Brush” menu and choose “Export…”. Save the file as “myCone” and remember what folder you save it to.

Finally, it’s time to launch the RvS version of UnrealED. Open an existing map, or start a new map and subtract a basic area. Open the “Brush” menu, choose “Import”, and open the “myCone.t3d” file. In the dialog box that appears, make sure “Solidity” is set to “Solid mesh” and click the “OK” button. The red builder brush has now been assigned the shape and textures of the imported model. Position the builder brush and click the “Add” button on the left toolbar. Move the builder brush out of the way. Right click the new geometry brush in one of the 2d views and choose “Convert | To Static Mesh”. Set Package to “mymapname_SM”, Group to “shapes”, and Name to “myCone”. Click the “OK” button. Immediately save the static mesh package as “mymapname_SM.usx”.

Conclusion

I hope this tutorial has at least shown you the big picture, and presented you with some options. If you’re just getting started with 3d modeling, I recommend the following sites:

Keep in mind that you don’t have to be a jack-of-all trades to create high-quality maps. If your skill is in level design and not in 3d modeling, find someone on the other side of the fence and team up. If you are a gifted 3d modeler who detests UnrealED, look around for well designed maps with very little original content and drop that map-maker a line. Concentrate on what you love and what you excel at.

This 3d modeling stuff was a bit out of my comfort zone. If you have any tips or methods that you think I should add to this article, please let me know.
-Beckett
Display a printable version of this article

© 2005, RvSMaps.com, all rights reserved
Send questions, critiques, etc. to http://www.juncmodule.net/rvs/rvsmaps/content/contact.htm