[REFERENCE] A Guide to Civ5 3D Modeling/Modding

AzraelZephyrian

Chieftain
Joined
Apr 11, 2019
Messages
72
You probably came here because you want to make a new unit, building, tile improvement, wonder (I need to try this out, not sure it works yet), or leader for Civ5--or maybe you want to use one unit's visual FX on another unit. We'll cover the tools and processes you'll need to know for all of the above over the course of a few posts. I'll start with units/tile improvements, and expand as I figure out how to do the other items.

The goal of this post is to provide the community with a 1-stop, up-to-date POST (not thread, as that requires a lot of browsing) to refer to when trying to create and implement new 3D models in civ 5. Most of the processes are transferable to Beyond Earth as well.

Caffeine. Check. Music. Check. Way too much time invested....check. Alright, looks like we're good to go.

Let's jump right in.

You'll need a few programs:
  • Modbuddy (available through steam library, if you have purchased Civ 5; just go to library>tools>search:[SDK] and select the Civ 5 SDK. Download, install and run it, then select modbuddy.
  • The latest generation of Nexusbuddy (NB2), made by our very own Deliverator. That's his username, not his title.
  • Dragon Unpacker
  • Deliverator's Blender scripts
  • Blender--the newest version supported by Deliverator's scripts
  • GIMP
  • .dds plugin for GIMP
Getting Nexus Buddy Running:

Nexus Buddy should work without a hitch, if you use the latest version (anything 2.5.3 or greater). Prior versions refused to open, though, so I'll include this section just in case anyone has trouble/needs to use an older version for whatever reason.

Most of the recent issues opening NB2 came from a few things missing from the file "NexusBuddy2.exe.config". Just open the relevant file and replace the extant text with this:

Code:
<?xml version="1.0"?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>

  <runtime>
    <loadFromRemoteSources enabled="true"/>
  </runtime>
</configuration>

Setting Up Blender Addons:

Ignore the blender scripts; 2.49 is not necessary for modelling anymore. Just grab the file entitled "addons", extract it to wherever. Pull up Blender, hit Ctrl+Alt+U, then navigate to the "addons" tab. Select "Install Add-on From File", then select (in the popup file browser) the addons. Check all the boxes, and save as your default user preferences.

Unpacking your Civ 5 Resource Files:

Open Dragon UnPACKer. Click the folder icon in the upper left. Navigate to your Civ 5 root folder. Sort by type, and select all the ....uh....well truth be told, I forgot the extension, and all mine have been extracted. Anyway, I believe they are .pak files. Select all of them, and, as I recall, right-click>"extract all".

You should now be able to access all your Civ 5 resources--database-related files, model files, textures, etc.

Using Your Newfound Powers:

You should, in theory, have a working NB2, Blender and Modbuddy now. You should also have a bunch of unpacked files.

Most of the following is transferable between improvements and units.

Unless you're an animation veteran, you'll want to grab a .gr2 file to use as a template for your unit--at least for the skeleton, which is a series of mathematical object which tell a rendering engine (e.g. Civ 5) where vertices need to move. You'll also want to grab the relevant .ftsxml and .fxsxml files, as well as any animations. To speed things up, just search a few letters of the unit name (to find the files), then type the name firaxis uses, and copy everything into a folder wherever you are going to be doing your work.

Snag some artdefines (for reference) from here, and .xml files from here

Pull up NB2 and open the ".gr2" 3D model file you want to edit. Save it (you can rename it if you wish). Go to the "additional actions" tab and click "export to .nb2".

Open Blender, click import>.nb2. Do the thing. Then, do whatever to the mesh (3D model). When you're done modeling, unwrap it. There's a load of information on how to make a quality blender model, and on how to unwrap a mesh properly. Keep your polygon-count sane, and don't go overboard on texture sizes; Civ 5 is a very zoomed-out game.

Once you have it unwrapped, you can texture paint it (unless you're using a pre-existing texture). I recommend using Cycles render/node editor, as it tends to have fewer hiccups and be more powerful than Blender Render. I suggest finding a tutorial on the matter of texture painting in Cycles, unless you have relevant experience--there are a couple ducks to line up in rows before you can start.

Once you have your model painted, SAVE THE IMAGE.

Now, if you want to make a modification to your skeleton (e.g. move a turret to the location in custom tank), select the skeleton, then enter edit mode. Right click the bone one level closer to the root bone than the bone you want to move, duplicate it (and name it), then parent the bone you want to move to the bone you just made. Go into pose mode, move the bone to its new position, then press Ctrl+A, and set as rest pose.

When you're done with your modeling and painting, import a copy of the base model. Move it right on top of your model, select it, then select your model (while holding shift). Go into weight paint mode, then weight-paint>transfer-weights, and in the left hand panel, "transfer by name". If your model isn't animated properly, it may be a matter of weight painting; if this is the case, there are tutorials on the specifics of weight painting.

Select your model in edit mode, (the A key), then press ctrl+F>triangulate-faces (otherwise, the mesh may not export, or will have numerous holes).

Finally, make sure your mesh is parented to the skeleton and that you have an armature modifier specifying the skeleton. Again, there are tutorials on this elsewhere, on Blender-related forums.

You may also want to bake your texture; this transfers lighting (as seen in the "rendered" view mode) to the texture, saving hours on shading.

You may also want to press Ctrl+A with the skeleton and mesh selected in object mode, then select "rotation and scale". Also check the location box (appears on the left) for good measure.

Export your file as a .br2, and open>save with NB2.

If you want to scale a bone, you can do so in NB2, using the "insert scaled FX bone and save" tool. Just select the bone one level closer to the root bone, change the scale parameter in the box above, and click the "insert scaled FX bone and save" button.

If you want to view your model with relevant animations, use NB2's "resave all .gr2 in directory" function to save the .gr2 animations in a compatible format, then open the viewer. You can then load animations and view them in the animations tab.

From here, you can save your file as a .gr2--a file format accessible to Civ 5.

I'll write some more sometime this week, regarding getting your 3D model in game and transferring VFX from one unit to another (e.g. making a scout shoot plasma at people).
 
Last edited:
Nice work! I would mention that Nexus itself isn't really necessary for 3D modelling work. The only value I've ever found in it is the 3D Viewer for:

1) Testing textured models outside of Civ V.
2) Testing animations outside of Civ V.

Generally I find it simpler to do that using Granny Viewer (for testing animations with un-textured models) or just testing in game.

To be able to use 3D Viewer you have to use the older version of it available here, as the 3D Viewer was broken in the most recent releases of the Civ V SDK.
 
Nice work! I would mention that Nexus itself isn't really necessary for 3D modelling work. The only value I've ever found in it is the 3D Viewer for:

1) Testing textured models outside of Civ V.
2) Testing animations outside of Civ V.

Generally I find it simpler to do that using Granny Viewer (for testing animations with un-textured models) or just testing in game.

To be able to use 3D Viewer you have to use the older version of it available here, as the 3D Viewer was broken in the most recent releases of the Civ V SDK.

Oh, I thought one needed a functioning Nexus for NB2 to work. Must be bad info from an old tutorial. I'll fix that when I get home.

Photoshop recently decided it was gonna produce massive brush lag for me. At this point, I use it primarily for filtering and masking applications, since the brush feature got bricked. Maybe it's different for most people... but yeah, thanks for linking alternatives.
 
Oh, I thought one needed a functioning Nexus for NB2 to work. Must be bad info from an old tutorial. I'll fix that when I get home.

Yeah Nexus is not required for Nexus Buddy 2 to run at all. In fact you don't even need the Civ V SDK installed.
 
Fair point, but I think most of us would go mad trying to write out own .modinfos! Especially for large projects with 20-500 items imported into VFS or acted upon (xml).
 
Fair point, but I think most of us would go mad trying to write out own .modinfos! Especially for large projects with 20-500 items imported into VFS or acted upon (xml).

I was talking about Nexus - not Modbuddy. Modbuddy is necessary.
 
Just wanted to jump in here to say I really appreciate this thread. Thanks Azrael!

No problem! I need to get around to adding the sections I promised! I'll do that sometime this week. Just got done with a very tiring 3D modelling competition.
 
Have you had any success with 3d leaders? I was trying to follow Ekmek's and Deliverator's tutorials a while back, but kept running into problems.
 
Have you had any success with 3d leaders? I was trying to follow Ekmek's and Deliverator's tutorials a while back, but kept running into problems.

I haven't tried yet. I've got a modified model of Bismarck that I'm gonna test out for a steampunk scenario when I have some free time and am not as ill as I am at the moment. It's very possible though; Deliverator has some relevant video tutorials somewhere, and also uploaded all the texture assets so that you don't need to use... I forget the name of the program...to gain access to them.
 
Deliverator has some relevant video tutorials somewhere, and also uploaded all the texture assets so that you don't need to use... I forget the name of the program...to gain access to them.

I actually still in the process of uploading them - it's quite a manual process but should be done within a couple of weeks. There are currently 24 out of 43 done in this Google Drive folder.

If you want some more examples of 3D Leaders in Civ 5 this guy has been converting Civ 6 leaders into Civ 5.
 
Holy crap, those look incredible! ...but unfortunately he mentions some DLL changes but doesn't have a source. Although one of the commenters claims that the mod is working fine with the CP.
 
Holy crap, those look incredible! ...but unfortunately he mentions some DLL changes but doesn't have a source. Although one of the commenters claims that the mod is working fine with the CP.
IIRC that's because he's using it to make the civ6 abilities in civ5 (by hardcoding them in the DLL, just like Firaxis did).
Moreover, we don't have access to the graphics engine source code at all, which leads me to believe the 3D models will work even outside a modified DLL. Then again, I'm not 100% sure.
 
Moreover, we don't have access to the graphics engine source code at all, which leads me to believe the 3D models will work even outside a modified DLL. Then again, I'm not 100% sure.

Yeah I'm sure aa0905766k's 3D Leaders will work without a modified DLL.
 
Top Bottom