• "Boogity, boogity boogity! Let's go racing boys!" - Darrell Waltrip
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Discuss the 2017 Formula One Australian Grand Prix here.

Digital Gauges on Racer

Discussion in 'Racer' started by sergiogon, May 19, 2010.

  1. Hi guys , i've been trying to make some S2000 gauges, but having a bit of a problem... what I want to make is to make the lights appear instead of having a analog gauge rotating behind the gauge it self.. My question is : How to make a light ( tga ) appear only when for example the revs are higher than 800?

    The S2000 ones : http://www.marklamond.co.uk/products/s2000/media/2000-2.jpg
  2. See the guage tutorial in the download section, there is info on digital gauges in it.
  3. Well , I checked the tutorial, but didn't quite find what I was trying to find... I don't want to make the revs shown in digits ( ex : 6500 ) , I want to make a digital light appear when the revs reach a certain value... Like this :
  4. I know wich sort of gauges you mean, the same of my scénic but for you it will be a bit harder because you've a lot of diodes (in scenic one diode = 250Rpm) while here it seams to be 100rpm.

    So, you'll have to drawn the rev counter with all del one, all of, after draw it rpm by rpm (at 100rpm,200rpm, etc to 9500rpm...)
    Good luck to drawn them ;)
  5. I ll have a look at your gauges! Thank you very much!
  6. Sergiogon already made the gauges, and they look great! They will be released with my S2000s!
  7. Cool, waiting to see them :)
  8. Picture :
  9. ok, looking great. Some in-action screenshots? And which way did you go on the ELTs?
  10. No video yet, the rev counter works on 100 by 100 scale, revlight also works! Speedo is working properly too!
    Lots of them ( 92 :eek:) , angular ones! Bit harsh on loading times!
  11. also a performance-killer. you didn't take a look at those from the repus? Angular is just bad as there's no way you could make 'em semi-transparent for the outside...
  12. Yeah true, but them not being transparent isn't a problem, it would be wierd if these S2000 ones were transparent... I checked the gauges, bit hard to understand... what does the factor_inv really do?
  13. Well, they shouldn't be too hard to understand. There are 2 basic ideas behind it:
    1.) inside the header of an ini-section you can source another section with the "~", like if you had this:
    then racer would interpret it as that:

    That's the sourcing-idea (if you change something in the file, you don't have to scroll so much and if you change a common setting, change it only once).

    2.) Digital elements need not be numbers. Lets have a look at the abs-indicator:
    If it's off, the transparent digit (which, as a digit, would be the "0") is shown. If it's enabled, the abs-sign is displayed (which, as a digit, would be the "1"). Now the only thing you need to make sure is, that the value for the element never gets smaller than 0 and never gets larger than 1. That's what you have the keywords "min" and "max" for.

    If you wanted to make a shifting indicator which lights up at 7500rpm, you'd create a texture with an empty rect and a "indicator"-rect. Then you'd create an element with type=digital, with the settings derived from your texture and with:
    Now I'm getting to explaining factor_inv :) If you read out an rpm and you want it to be in between 0 and 1, you'll have to divide the read-out by a number - here it is 7500, as 7500/7500=1. Any number lower than that would be less than 1 (like 5000/7500=0.666), any number higher than that would be larger than 1 - and by that exceeding our "max", so the value stays "1". Boom, the digital shifting indicator is done ;)

    So actually factor_inv should be called "divisor", as it stands for 1/factor.

    P.S.: I agree on the inside dials - why transparent... But I love it if outside dials don't obscure the track, but still are readable. So that was my primary intention...
  14. Ohh, I think i got it... so declaring a new elt with ~(baseelt), works like calling a pointer to the rpm var right?
    Interesting! Also, why for the "light" for the 0000 rpm you have the factor_inv on 250 and max on 9?

    Thanks for this, will try to get this to work, when I have time to do it !
  15. Well, the first one is kind of a real digital ELT. It counts in steps of 250rpm - that's why factor_inv is 250. Sadly Ruud didn't give me the "value_offset" keyword, so I had to continue with single ELTs for each further step above 2250 rpm (as 9x250 = 2250).

    If we had the value_offset, we could simply continue using factor_inv=250 and just had to add a negative offset to the value, to make the higher-rpm elts complete digitals, also.

    On the honda you could (if we had this keyword) just use one big texture and have the 10 digitals inside it... Hopefully the keyword will appear soon... (P.S.: I guess I explained it wrongly to him. Instead of the offset he gave us the "min_warn_rpm" and "max_warn_rpm" for the car.ini and and the "type=rpm_warning" for the views.)
  16. Hmm I think I got it... im not really a fan of having that kind of gauges, with a digit like .tga ... that for the s2000 would be crazy, counting in steps of 100...
  17. hehe - not really, as it's all constructed by some mathematics, you write a program to create your dial, then you're done.

    I'm really looking forward on the s2000 - wanna see how you did it!
  18. i am doing the body of it...

    splashonda did the ini, cosmo are helping to adjust it perfectly and gauges/dials were made by sergiogon.

    *Yes, it has provisory rims from Civic FD2, but raphael will model the real one.. or me, we are seeing it