Digital Gauges on Racer

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 :
 
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 :
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 ;)
 
Picture :
2nlwhn5.jpg
 
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...

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?
 
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:
Code:
the_other_section
{
    other_data=1
}
my_section~the_other_section
{
    data=0
}
then racer would interpret it as that:

Code:
the_other_section
{
    other_data=1
}
my_section
{
    other_data=1
    data=0
}
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:
abs.png
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:
Code:
   var=rpm
   min=0
   max=1
   factor_inv=7500
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...
 
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 !
 
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.)
 
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!
 
i am doing the body of it...
screenshot097copy.jpg

screenshot098copy.jpg


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
 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 143 13.6%
  • < 2 years

    Votes: 105 10.0%
  • < 3 years

    Votes: 97 9.2%
  • < 4 years

    Votes: 75 7.1%
  • < 5 years

    Votes: 145 13.8%
  • < 10 years

    Votes: 138 13.1%
  • < 15 years

    Votes: 88 8.4%
  • < 20 years

    Votes: 64 6.1%
  • < 25 years

    Votes: 49 4.7%
  • Ok, I am a dinosaur

    Votes: 148 14.1%
Back
Top