How are digital guages drawn?

Discussion in 'Car Modding' started by Coutie, Aug 1, 2014.

  1. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,779
    Likes Received:
    2,241
    This issue has always been bugging me, how are the guages drawn? It seems that different ones are drawn differently? For instance, look at this picture:
    [​IMG]

    I added the white lines to show the edge of where it should draw. The speed output looks like the text is aligned on the right, where everything else is opposite. All the faces are the exact same(minus the gear face), and the scale in the cockpitinfo.ini is the same, yet the results are almost the exact opposite. So my question is, is there a way to change how the displays are drawn?

    Example from my cockpitinfo.ini
    SpeedFont=car_Font.tga
    SpeedBackground=car_SpeedBG
    SpeedScale=(0.3, 0.5)

    OilTempDigitFont=car_Font.tga
    OilTempDigitBackground=car_OillBG
    OilTempDigitScale=(0.3, 0.5)
     
  2. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    Do the objects of speed, oil..... all have the same mapping (to the whole bg-texture)?

    Maybe playing around with the scaling of the font, even when the objects/textures/fonts are all equal, helps you.
     
  3. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,779
    Likes Received:
    2,241
    Yes, they had the same mapping. Last night I played around with the UV coordinates, and I was able to move the water temp to the middle of it's background texture. The only issue is that only one digit would show, so it said 4 instead of 45, even though there was a lot of room for the 5.
     
  4. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    The object has to be UV-mapped in that way, that it covers the whole texture.
    And what size do your background-textures have?
     
  5. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,779
    Likes Received:
    2,241
    Just 64x64. I've been messing around with the coordinates and it's looking better. Should they be bigger?
     
  6. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    I have taken 32x32 for my "private use"-car for water- and oil-temp and in the cockpitinfo the values: (0.45,1.5) for the scaling.

    But 64x64 should be OK too (the bigger, the better it looks ;)).
     

Share This Page