Difference between revisions of "Adding New Icons"
From Divinity Engine Wiki
m |
m |
||
Line 1: | Line 1: | ||
− | Adding new icons requires a bit of preparation | + | Adding new icons requires a bit of preparation, but once the initial setup is complete, adding additional icons is quick and easy. |
== Preparing the Texture File == | == Preparing the Texture File == |
Revision as of 17:52, 8 October 2017
Adding new icons requires a bit of preparation, but once the initial setup is complete, adding additional icons is quick and easy.
Contents
Preparing the Texture File
- Pack a collection of images (64x64) into a single image file using power of 2 constraints (512x512, 1024x1024, etc.). Make sure to have the images sorted by name. Also, keep the location of these images handy, as you'll need the individual images later.
- Convert the image to DDS, with alpha and BC3 compression.
- Create a directory for your texture inside your mod's directory (inside the data directory). Example: "Data/Public/MyModName_GUID/Assets/Textures".
- In the Resource Manager, create a package to add your texture to later.
- Wait before you move your texture file in, as to avoid a current bug.
Preparing the Texture Atlas file:
- Open the Texture Atlas Editor.
- Click File -> New.
- Select "Public/MyModName_GUID/GUI" as the location for your .lsx file (create the GUI folder if it doesn't exist).
- Name the texture file the same as your texture from before, and save it in the same location we prepared (i.e. "Data/Public/MyModName_GUID/Assets/Textures").
- Select the size of the individual icons and the size of the image.
- Select the package you created previously, then click Save.
- This is where we hit a bug - The Texture Atlas Editor appears have tried to create the DDS texture file we specified, but nothing is actually created (see the error in the message log).
- To workaround the error, move your actual texture file in to the directory we specified ("Data/Public/MyModName_GUID/Assets/Textures").
- Reload your .lsx atlas file in the Texture Atlas Editor. Your texture should now be visible, and the "Add Entries" button should no longer be greyed out.
Adding Atlas Entries:
- Click Edit -> Add Entries.
- Navigate to where your collection images reside (the ones you packed into the texture file).
- Select all the icons you packed and add them. If you packed your texture right (alphabetically), all of the new atlas entries should match up with the image.
- Save.
Notes:
- This same process can be used to add custom portraits.
Software Used In This Tutorial
- TexturePacker for packaging the icons. Here's my settings: TexturePacker Settings
- nvidia-texture-tools to convert the packed texture to DDS format. This is a command-line tool.
Optional
- For Photoshop users, Nvidia has a plugin to work with the DDS format: NVIDIA Texture Tools for Adobe Photoshop