Asset generation - Chiv2-Community/ArgonSDK GitHub Wiki
This step is required to use Chivalry assets like Textures and Meshes in your custom maps/mods
Prerequisites
- Unreal engine 4.25 is installed
- ArgonSDK cloned
- UEAssetToolkit-Fixes FBX-only branch cloned
- Assets are un-paked
- These un-paked assets are serialized:
- Texture2d
- Staticmesh
- FontFaces
- Fonts
Installing asset generator
Drag and drop these folders from the UEAssetToolkit-Fixes FBX-Only branch into the plugins folder of the ArgonSDK Unreal project directory
Open unreal engine, and browse to the location of your cloned ArgonSDK. Open the .uproject in that directory.
You will get a popup asking if you want to rebuild several modules (including the asset generator). Click yes and wait for them to build. You may need Visual Studio and it's toolchains installed to do this.
Using the Asset Generator
You should probably at least skim this section in it's entirety before starting. Do not start generating assets before reading the warnings and recommendations.
Open the asset generator tool here.
The asset generator window looks like this:
- Set Dump Root Folder Path to wherever you put your CAS_output folder.
- Set Assets To Generate Per Tick to 32 (the max). If performance is an issue or it's too strenuous on your computer, you can reduce this value.
- Ensure that ALL asset types are selected in the Asset Type Filter section.
- Select the paths you want to generate assets from.
IMPORTANT: You should do this asset generation in batches. Check a few directories for generation, generate those, and then generate the next few directories. Keep an eye on your memory usage, and whenever you feel you don't have enough memory to do the next batch, restart the editor to free up some.
Memory consumed by this process is NOT freed until the unreal editor is closed completely. If you try to do it all at once, you will get an out of memory error or a 100GB page file. If it crashes due to memory, I recommend re-doing the batch in two smaller chunks with the Refresh Assets checkbox in the generator checked in order to re-do any assets in that batch which may have been corrupted by the crash.
Some very large directories are:
- Characters
- Environemnts/Architecture
- Environments/Landscape
- Environments/Props
- UI
- Weapons
Split these directories up into batches, generating assets and then restarting the editor to free memory between batches. This process is long and tedious, and will take hours.
Result
You should have had the following directory structure generated in ArgonSDK's Content folder:
ArgonSDK\Content
├── AI
├── Abilities
├── Animation
├── ArtPipeline
├── Audio
├── Blueprint
├── Characters
├── Cinematics
├── Collections
├── Config
├── Custom_Lens_Flare_VFX
├── Customization
├── Debug
├── Developers
├── Environments
├── FX
├── Game
├── GameModes
├── Gameplay
├── Interactables
├── Inventory
├── Localization
├── Maps
├── MapsTest
├── Materials
├── Meshes
├── Mods
├── Movies
├── Screenshots
├── Trailer_Cinematic
├── UI
└── Weapons
You will also be able to drag in-game assets into your maps, see them in the editor, and have them work when you load your map in-game
Extra generated assets
Any asset types that were visible in the CAS tool in the serializing unpaked assets section that we skipped last time can also be serialized and generated. This takes time, and the end result isn't very big. The majority of these assets (like blueprints) have been serialized and subsequently generated by Nihi. Ask for a copy of these generated assets if you don't want to do them yourself.
editor tips
Unreal will automatically cook these extracted assets when you cook your maps. This will take FOREVER with zero benefit to you. (Chivalry already has them in it's pak!) Mark these extracted directories as "never cook." That way, Unreal Engine will only leave the references to these assets in the map so they will be loaded from Chivalry's pak when needed.