Wednesday 1 January 2014

Mirrors and Tachometer

Firstly for the mirrors they have to be exported separately. So i separated the two side mirrors and the rear-view mirror. But just the geometry that I want to be a mirror, not the mirror outer bits. I attached these so they were all the same object and unwrapped them. This bit is important because it specifies which mirror is which. Here's what that looked like.


Then one line of code needed to be added to the .gen file. So adding the mirrors was pretty easy, I just had a problem where the view in the mirror was squished so i just adjusted the unwrap and that fixed that.

Now for the Tachometer. For my car I've added an aftermarket tacho which is made by autometer. So I just needed to seperate the tacho's face just like the mirrors and unwrap it. But this time I actually needed to texture it which is what I did here.


The rmp gauge has two textures, one for the backface and one for the rpm needle. The needle was already provided. Once I had exported the tacho I just needed to add some code. So this is what I added to the cockpitinfo.ini file.

TachometerRange=(100, 10000, 323, 420)
TachometerBackground=rter_rpm.tga
TachometerNeedle=(1.5,1.5)
TachometerNeedlemap=rter_SNEEDLE.tga
RelativeTachometer=0

It worked ingame straight away and it seemed to be displaying the correct RPM.
I'll post a pic of it in game at a later date.