Icon issue

Putmalk

Deity
Joined
Sep 26, 2010
Messages
2,652
Location
New York
Something very weird is happening. I've never seen it before and I'm confused as to why it's happening.

I just put icon atlases in the game with the normal dimensions for buildings, units, etc.

On the tech tree screen, the icons won't show up, but merely appear empty (black). I looked at the lua and it says they need to be size 45, which they are (with correct size/dimension).

When you try to research the tech, on the top left of the screen the tech appears. The icons appear normal there. When you research the tech and the completion screen appears, the icons are normal too.

They appear correct: Civilopedia, tech researched screen, top left research preview, combat preview, and unit stats

Don't appear: Tech tree screen, city build screen, city ui on world map.

For obvious reasons I want the icons to appear everywhere. I am very confused as to why they don't appear in the tech tree. :confused:
 
Hmm, are you using a full 8x8 atlas or less?

For example, if you're using a single portrait atlas for the size 45 icon and you're saving the DDS as one of the DXT options, you would have to reduce the canvas size to 44 (a product of 4), as far as I know. Though, if you're also using the Photoshop DDS Plugin, I think it would've gave you warning and prevented you from saving it, or at least the preview image would've been black.

If you use a full 8x8 or a 4x4 atlas for the 45 size, you'll be okay as 360 and 180 are both products of 4.


Another alternative is to use the 32 bit ARGB which is labeled as 8:8:8:8 with the DDS plugin. You'll have very minor image degradation when converting to DDS (especially with gradients and feathering) compared to the DXT variants which have noticable degradation, and you don't have to worry about the "product-of-4" rule. The catch is that some users may not be able to display the graphic properly if they have inadequate/very-old (8+ years) systems and/or GPU's. Though, in my opinion, those users probably shouldn't have a modern application like Civ 5 installed and sluggishly running on their machine to begin with (a game that's used in benchmarking tests for today's hardware, nonetheless), and are probably better off getting their Civ fix thru earlier games like Civ4 or Civ3 until they upgrade things.
 
I'm using a 5x3 atlas which is supported by the game (Expansion_bw_atlas uses it, for example). It is 225 x 135.
 
Okay, so if you're saving that as one of the DXT1/3/5 options, it's not going to work since it's not a product of 4. :(

The actual atlas itself may not look pretty this way, but if you want to quickly resolve the issue easily, you can just expand the canvas size of the atlas to 360 x 360 and resave it. Again, the canvas size, not the image size, so that it just creates extra transparent space and your existing graphics will be unaffected. The game will still only look to the specified portrait slots in the upper left corner and will also be limited by the values you set in IconsPerRow and IconsPerColumn. 228 x 136 may even work as well since both are products of 4, but I'm just not sure if the entire image needs to be square as well.
 
That didn't fix the issue.

This is the icon working:
Spoiler :

attachment.php



This is the problem I have on the tech tree:


Also my DDS plugin allows compression using DXT3 with non-powers of 2, so I can compress the 45x45 images properly.
 

Attachments

  • success.jpg
    success.jpg
    58.9 KB · Views: 191
  • failed.jpg
    failed.jpg
    5.7 KB · Views: 97
I'd probably have to see the mod files then to get more information and have a chance of figuring it out. Though, you probably don't want to release anything until you publish your mod, which I understand. :)

Another option is that I can try creating the DDS images for you from the original image and you can see if those work instead.

<shrug> I don't know, other than that, I'm stumped... sorry.

Beautiful icon, by the way.
 
Thanks, sukritact made it.

I tried it at 360x360 at no compression, but it doesn't seem to work.

Icon texture atlas:
Spoiler :

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 7/22/2012 1:59:31 PM -->
<GameData>
	<IconTextureAtlases>
		<Row>
			<Atlas>SENGOKU_UNIT_FLAG_ATLAS</Atlas>
			<IconSize>32</IconSize>
			<Filename>unitflagatlaswhite32_sj.dds</Filename>
			<IconsPerRow>4</IconsPerRow>
			<IconsPerColumn>2</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_ALPHA_ATLAS</Atlas>
			<IconSize>128</IconSize>
			<Filename>Civilization_Alpha_Atlas_128.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_ALPHA_ATLAS</Atlas>
			<IconSize>64</IconSize>
			<Filename>Civilization_Alpha_Atlas_64.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_ALPHA_ATLAS</Atlas>
			<IconSize>48</IconSize>
			<Filename>Civilization_Alpha_Atlas_48.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_ALPHA_ATLAS</Atlas>
			<IconSize>32</IconSize>
			<Filename>Civilization_Alpha_Atlas_32.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_ALPHA_ATLAS</Atlas>
			<IconSize>24</IconSize>
			<Filename>Civilization_Alpha_Atlas_24.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_ALPHA_ATLAS</Atlas>
			<IconSize>16</IconSize>
			<Filename>Civilization_Alpha_Atlas_16.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_COLOR_ATLAS</Atlas>
			<IconSize>256</IconSize>
			<Filename>Civilization_Atlas_256.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_COLOR_ATLAS</Atlas>
			<IconSize>128</IconSize>
			<Filename>Civilization_Atlas_128.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_COLOR_ATLAS</Atlas>
			<IconSize>80</IconSize>
			<Filename>Civilization_Atlas_80.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_COLOR_ATLAS</Atlas>
			<IconSize>64</IconSize>
			<Filename>Civilization_Atlas_64.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_COLOR_ATLAS</Atlas>
			<IconSize>45</IconSize>
			<Filename>Civilization_Atlas_45.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_CIV_COLOR_ATLAS</Atlas>
			<IconSize>32</IconSize>
			<Filename>Civilization_Atlas_32.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>8</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_LEADER_ATLAS</Atlas>
			<IconSize>256</IconSize>
			<Filename>Leader_Atlas_256.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_LEADER_ATLAS</Atlas>
			<IconSize>128</IconSize>
			<Filename>Leader_Atlas_128.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_LEADER_ATLAS</Atlas>
			<IconSize>64</IconSize>
			<Filename>Leader_Atlas_64.dds</Filename>
			<IconsPerRow>8</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_BW_ATLAS</Atlas>
			<IconSize>256</IconSize>
			<Filename>Building_Atlas_256.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_BW_ATLAS</Atlas>
			<IconSize>128</IconSize>
			<Filename>Building_Atlas_128.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_BW_ATLAS</Atlas>
			<IconSize>64</IconSize>
			<Filename>Building_Atlas_64.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_BW_ATLAS</Atlas>
			<IconSize>45</IconSize>
			<Filename>Building_Atlas_45.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_TECH_ATLAS</Atlas>
			<IconSize>256</IconSize>
			<Filename>Tech_Atlas_256.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_TECH_ATLAS</Atlas>
			<IconSize>214</IconSize>
			<Filename>Tech_Atlas_214.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_TECH_ATLAS</Atlas>
			<IconSize>128</IconSize>
			<Filename>Tech_Atlas_128.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_TECH_ATLAS</Atlas>
			<IconSize>80</IconSize>
			<Filename>Tech_Atlas_80.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_TECH_ATLAS</Atlas>
			<IconSize>64</IconSize>
			<Filename>Tech_Atlas_64.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_TECH_ATLAS</Atlas>
			<IconSize>45</IconSize>
			<Filename>Tech_Atlas_45.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_UNIT_ATLAS</Atlas>
			<IconSize>256</IconSize>
			<Filename>Unit_Atlas_256.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_UNIT_ATLAS</Atlas>
			<IconSize>128</IconSize>
			<Filename>Unit_Atlas_128.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_UNIT_ATLAS</Atlas>
			<IconSize>80</IconSize>
			<Filename>Unit_Atlas_80.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_UNIT_ATLAS</Atlas>
			<IconSize>64</IconSize>
			<Filename>Unit_Atlas_64.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_UNIT_ATLAS</Atlas>
			<IconSize>45</IconSize>
			<Filename>Unit_Atlas_45.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>SENGOKU_UNIT_ATLAS</Atlas>
			<IconSize>32</IconSize>
			<Filename>Unit_Atlas_32.dds</Filename>
			<IconsPerRow>6</IconsPerRow>
			<IconsPerColumn>3</IconsPerColumn>
		</Row>
	</IconTextureAtlases>
</GameData>
 
False alarm. I got it to work. Turns out it didn't scale to 360 like I had requested it. :mad:

I got the issue fixed though. Many thanks. :)
 

Attachments

  • success1.jpg
    success1.jpg
    5.6 KB · Views: 64
Back
Top Bottom