AzraelZephyrian
Chieftain
- Joined
- Apr 11, 2019
- Messages
- 73
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:
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:
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).
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
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: