Results 1 to 4 of 4

Thread: Choosing the best card texture size for image quality

  1. #1

    Choosing the best card texture size for image quality

    Let's say I have custom card textures where each card is about 400 x 560 px. The face texture (10 x 7 grid) results in a size of 4000 x 3920 px.

    How is this texture handled by the game?
    Is the face texture rescaled to a width of 4096 or is it used at the exact pixel size it is provided as?
    If I would increase the size of the face texture to let's say 5000 px width, would that increase the card image quality ingame or would that texture be scaled down, e.g. to fit in the next lower power of 2 (4096 in this case)?

    The point of my questions is to find the best possible card size (in terms of image quality) to prevent quality loss or unnecessary texture recompression/rescaling.

    Regards,
    M4he

  2. #2

    Choosing the best card texture size for image quality

    A problem I just encountered might be related:
    I have a custom deck with cards (including back face) sized at exactly 320 x 480 px, resulting in a face image of 3200 x 3360 px.
    Ingame all cards (except those from the first row of the face texture) show a thin part at the top of them which originates from the card which is in the row above them in the face texture. [url="http://i.imgur.com/tT0M6cg.png"]See the screenshot here[/url] (the light brownish line at the top is actually from the card above in the face texture). I double checked all cards sizes and offset within the face texture.
    I can only assume there's some inaccuracy (loss of precision) when the texture coordinates are calculated by dividing the face texture dimensions according to the aspect ratio of the back face image. I'm still playing around with different texture sizes and aspect ratios for those cards to see if I can find a combination that doesn't produce this issue, since the other deck I created as mentioned in the first post is perfectly fine in this regard.

    EDIT:
    Finally found the issue, it seems to be a bug. It wasn't visible on my first deck because the cards had a black area at the bottom. I drew a 1px red line at the bottom of each card and it became visible on the top of other cards as well. Fortunately I also found the source of the issue and a workaround: let's say you have 320 x 480 cards, then the game only reads the first 479 px (original height minus 1) from the top of the face image and then continues with 480 px steps. So right now every card is read 1 px too early from the top.
    Temporary workaround: make the first row in the face image 1px less in height, then continue with the full height for the other rows, leaving a 1px blank line at the bottom of the face texture.

  3. #3
    Join Date
    Apr 2014
    Location
    Florida
    Posts
    164

    Choosing the best card texture size for image quality

    Why dont you just use Deck Building Tool? It requires an older version of java, but it's super easy and comes out good! you can get it here http://www.nexusmods.com/tabletopsimulator/mods/61/?tab=2&navtag=http%3A%2F%2Fwww.nexusmods.com%2Ftab letopsimulator%2Fajax%2Fmodfiles%2F%3Fid%3D61&pUp= 1 make sure you dont get v2-1-1 it's broken. Get 1-6-1 or 1-7. haven't tried the others.

  4. #4

    Choosing the best card texture size for image quality

    madmon121 said

    Why dont you just use Deck Building Tool? It requires an older version of java, but it's super easy and comes out good! you can get it here http://www.nexusmods.com/tabletopsimulator/mods/61/?tab=2&navtag=http%3A%2F%2Fwww.nexusmods.com%2Ftab letopsimulator%2Fajax%2Fmodfiles%2F%3Fid%3D61&pUp= 1 make sure you dont get v2-1-1 it's broken. Get 1-6-1 or 1-7. haven't tried the others.

    I know of the Deck Building Tool but I'm not having problems with building deck textures in general. In fact I've already written a small java tool myself, which assembles the face textures for me. The point of this thread is about maximizing card image quality ingame by using optimal texture sizes. That's why I was asking for some technical insight into the game's texture mapping mechanism so that I can determine appropriate values.
    The bug mentioned in my 2nd post is just something I came across by accident while playing around with different textures.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •