From Civilization V Wiki
Description of the Nexus Tool goes here with explanation of how it runs Civ5 in the background.
1. Install Sid Meier's Civilization V SDK via Steam.
2. Using Regedit set HKEY_CURRENT_USER/Software/FIRAXIS/Tools/ToolAssetPath to C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v (if using Vista/Windows 7) or C:\Program Files\Steam\steamapps\common\sid meier's civilization v if using XP.
3. Open Nexus - set the asset directory to be C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization as well.
4. In the top menu select Nexus > Script Browser > Extract PAK Files. This will unpack all the assets to the directories ...sid meier's civilization v\resource. There are 3 directories Common, DX9 and dx9_low. The 3d art for units, leaders, terrain and buildings is all in together with no subdivision so you'll have to hunt through to find what you are interested in.
5. Some of the DDS files are compressed and cannot be opened in the common image-editing programs (e.g. Gimp, Paint.NET), but there is a 3rd-party tool which can convert them to PNG for editing. Those can then be saved as regular DDS files which will still work in the game.
6. To look at the 3D assets in Nexus go to Assets/Asset Viewer. Open any *.fxsxml file. The fxsxml is an XML containing the details of the mesh, texture and animation files. You can also explore the contents of the fxsxml in the Asset Viewer. You can see it has a list of the bones which is interesting.
7. A few windows open when you open an fxsxml file. The only ones I've played with so far are the 3D View and Animation Triggers windows. You'll want to have them both side-by-side (widescreen monitors useful here):
The only hotkeys I've figured out for the 3D View are: T - Top View B - Bottom View F or Z - Front View L - Some strange sideways view ?
Switch the drop-down in the top left of the 3D View to EventCode rather than default. Now you can trigger the different animations in the left hand pane of the Animation Triggers view and you should see the unit in the 3D View moving. Sound FX are also triggered as well (this should make syncing sound fx much easier than in Civ4 where you had to edit the KF file in NifSkope and then test in game). You can also set the animation to loop using the Loop button at the top. That's about all I've figured out for now on that.
Skinned units (those with bone animation) such as the Rifleman only tend to have a single material (though this is not necessarily true of all of them). The material is usually named after the unit type and the same as the filename of the model, and uses the UnitShader_Skinned shader.
This shader has 5 textures that can be applied to it:
- Diffuse (_DIFF.dds) the colour texture map.
- Specular Reflection Map (_SREF.dds) (A map containing the intensity of specular reflection on parts of the mesh)
- Irradiance Map (Default: Unit_Irradiance.dds)
- Environment Map (Dull) (Default: Unit_Environment_Dull.dds) and
- Environment Map (Sharp) (Default: Unit_Environment_Sharp.dds) Maps emulating the reflection of the environment in shiny objects.
UnitShader_Skinned has a maximum of 32 bones per mesh, having more than this will produce skinning errors in the Nexus tool on import.
Most if not all of the units use the UnitShader_Skinned shader regardless of whether they appear to be rigid objects, for example the Destroyer unit uses the same system described above.
Wonders generally have at least three meshes within the .gr2 file, not including rocks, trees or other decals.
- <WonderName>: For example 'Pyramid' or 'Colossus'. This is the fully built mesh for the wonder.
- HB<WonderName>: For example 'HBPyramid' or 'HBColossus'. This is the 'half built' version of the mesh for when the wonder is in production.
- Tree Cut: A stencil shape presumed to specify the area to remove trees from if the wonder is placed on a forest tile.
As well as this, Wonders tend to contain the following materials assigned to the equivalently named mesh:
- <WonderName>: Using the BuilderShader shader, a main texture containing both the Diffuse map (main texture) and a BuildingSREF (A specular / reflection map) which is applied to the main mesh.
- HB<WonderName>: The same as above, but for the half-build version of the mesh.
- Tree Cut: A LandmarkShader_Stencil shader which seems to always contain three maps, BaseTextureMap, HeightTextureMap and SpecTextureMap all pointing at the Generic_Grey_8.dds texture.
Poly count: approx 10,000 triangles (unknown what LOD specs for lower graphics settings are at this stage)
Textures: multiple textures per leader but primarily, diffuse map (512x512) and normal map (2048x2048)*
Materials: one texture/shader per mesh, multiple meshes per character
Facial Animation: 20 to 30 facial bones. Very similar in set-up to Civ IV leaderheads.
- note: This is based off image file size so may not be completely accurate
FBX Format Export
Biped is supported through the FBX export / import process, however, the Biped Mixer is not. So you must "Compute Mixdown" and then "Copy Mixdown to Biped" before exporting animations.
Ensure you export using the *2010* version of the FBX exporter. All other versions yield errors in tests.
The test FBX for Nexus was originated from Blender 2.49b
Nexus Art Tool
Unpacking the PAK (*.fpk) files
Load the Nexus Art Tool, select the "Nexus" tab, click "Script Browser", select "Extract PAK (*.fpk) files", click "Run Script", and... wait.
Cannot get textures to display in the Material Editor. Apparently there are some known issues with this tool but it's unclear exactly what these are, and therefore whether the texture issue is related, and whether we can expect these issues to be addressed any time soon ;)
- Initial Nexus Look thread at Civfanatics discusses how to use and activate Nexus. Special thanks to Deliverator.
- Thread on CivFanatics discussing leaderhead development, primarily, with a lot of other info being found about Nexus by experimentation and more arcane means. Special thanks to CaptainBinky, lemmy101, and Wirapuru