Graphic Atlas Problem

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Graphic Atlas Problem

Post by LordGarth »

I have been having trouble with graphic atlas for icons for items. The atlas does not seem to work properly passed index 4 or 5. It does not seem to call up the right area on the atlas. It pulls up a white spot or index 7 pulls up spot 2. Index 6 pulls up index 1.

anyone else have this problem

I have to make new atlases every 5 icons.

LG
Dungeon Master and DOOM will live forever.
User avatar
Fhizban
Posts: 68
Joined: Sun Oct 21, 2012 2:57 pm
Location: Germany
Contact:

Re: Graphic Atlas Problem

Post by Fhizban »

i had the same problem several days ago. i solved it, but i cannot give a bullet proof answer, as how the atlas works is still a mysterium to me.

i found out that when you use a "selfmade" atlas with alpha - it will only work with a 1024x1024 texture. any other texture size makes the index show only "half" an icon or misplaces the icon completey.

for more information, check out my last posts in the texture atlas settings thread:

http://grimrock.net/forum/viewtopic.php ... 2&start=20

hope this helps at least a little bit.
--
Fhizban's Asset Repository - the place where you find all my LoG contributions:
viewtopic.php?f=14&t=3904
User avatar
LordYig
Posts: 175
Joined: Wed Jul 04, 2012 5:45 pm

Re: Graphic Atlas Problem

Post by LordYig »

LordGarth wrote:I have been having trouble with graphic atlas for icons for items.
Hello there,

From my own test I can tell that the exemple from the creating-custom-assets page is somewhat misleading if not entirely wrong.

Form all the test i have made, I have come to the conclusion that the graphic atlas for icons must be 1024 pixel in width and can be 1024 pixels in height, like the one in the Asset Pack.
You must have 13 icons per line with each icon measuring 75x75 pixel maximum.
The atlas could be less than 1024 pixels in height I guess, that's not sure since I haven't tested this but in theory you could have a graphic atlas of 1024x256 with three lines of 13 icons.
The width of 1024 is mandatory in order to get proper ids.
The atlas files should be saved has : 8.8.8.8 ARGB 32 bpp uncompressed dds files in order to handle the alpha channel properly.

If you use the 512x512 pixels exemple from the "modding wiki" the result is that you get wrong ids.
The id 6 on the second line should be 13, and the id 12 from the third line should be 26.
If you test one of your object with your own graphic atlas and replacing the ids 6 and 12 by 13 or 26 it should display the first icon of the second and third line respectively.

Try it and see for yourself.
I hope this is helpful :)
User avatar
Phitt
Posts: 442
Joined: Tue Aug 14, 2012 9:43 am

Re: Graphic Atlas Problem

Post by Phitt »

I use a 256x256 atlas and my icons work fine. The gfxIndex id relates to a 1024 texture though, so in my case the first row with three icons have index numbers 0, 1 and 2, the next row has 13, 14 and 15 and so on.
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: Graphic Atlas Problem

Post by LordGarth »

Thx very much will try that 1024 by 1024

LG
Dungeon Master and DOOM will live forever.
Post Reply