Monday, 13 January 2014

Other Guages + Texturing the interior

In rFactor you can have other gauges that work like the OIL, TEMP and FUEL etc. But I decided just to leave these and save some time so I can start the 2nd car asap. So I just added them to the interior UV's. This is the texture I made for the other gauges. I made the petty much from scratch accept using a template gauges so all he markings were correct.


As for the rest of the interior I baked the AO and normal maps in xNormal as I always do. Then I began texturing in photoshop. I was originally going to sculpt the foam parts on he roll cage for some extra detail but after looking at reference this was unnecessary. Most of the foam in my reference seemed to be attached with cable ties so I added this detail with nDo2. I also decided to add some welds the the rollcage. I did this by creating some overlapping gradient circles that when converted to a normal look like a weld. For the rest of the interior I mainly left it black as the player wont be looking at the back seats or floor so adding detail there is meaningless. 

Here Is what it looked like in the end.



Wednesday, 8 January 2014

rFactor 2 GIF

I said I post a pic of the dashboard and gauges in game but I decided to make a gif instead so you can actually see them working. You'll notice the shift light turn on also! I currently texturing the outside of the car and ill do a update on that soon.


Monday, 6 January 2014

Dashboard Texturing

I need to spend more time on the interior than the outside as in game that's where the player will spend most their time. So it's nice to get the interior looking as good as possible. As usual I baked the normal and AO maps in xnormal and used ndo2 for some extra normal detail. Here are the diffuse, normal and specular maps I made.


I decided to put a sticker on the glovebox as stickers in Japan are used loads on vehicles. And JDM Legends is a garage that specialize in classic Japanese cars. JDM stands for Japanese Domestic Market. 


Sunday, 5 January 2014

Speedo and RPM Light

The tachometer has a little RPM shift light on it that will illuminate when the revs reach a certain rpm. Mos tracing cars have these. There are several LED's that a car can have in rfactor for various different things but I'm just going to use the shift light. It took a little searching on the ISI forum again to find the right bit of code. Here's the code I used.

RPMLED=LEDYEL00.dds

I needed two textures, one lit and one unlit which I made here..


For the speedo it was a pretty similar process as the tachometer. I just needed to have a different texture and different code. Here's the code and texture I used. It took me a while to get the speedo accurate but by just fiddling around with the values in the code I eventually got it. I think I could of made this easier of I knew what angle each speed. 

SpeedometerRange=(20.0, 220.0, 210.0, 350.0) * *//SpeedometerRange=(<minvalue>, <maxvalue>, <beginangle>, <endangle>)
SpeedometerCenter=(0.50, 0.50) 
SpeedometerNeedle=(1.8, 1.8)
SpeedometerBackground=hakosuka_speedo.tga
SpeedometerNeedleMAP=hakosuka_speedo_SNEEDLE.tga


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.    




Friday, 27 December 2013

Importing to rFactor 2

Once I had exported everything from max all I had to do now was modify the code. I did this using Notepad ++. Here's one of the .gen files I modified. As you can see this is the file that you say what models go where. You can also setup the LOD's in here but I wont be making any lod's at the moment.


Now all the models and textures are in the game dev mode. I had a little bit of a problem with the position of the wheels and figured out I needed to adjust the suspension. I had a look round on the forums to find out what piece of code I needed to modify and found someone had made a suspension editor for the first rfactor which also works with rfactor 2 so I had a play round with that. It took me a while again to find out what did what but i managed to get the wheels in the correct position after some trial and error. Here's some of the code I modified. 


I also had to change the camera position of the cockpit camera which was pretty easy to do, just z,y and x values in the code. One other problem I had was the steering wheel would rotate around an irregular axis. So again I did some searching on the forums and found a piece of code. I needed to get the angle of the steering wheel from max and calculate the COS and SIN to get the correct values for the engine. Here's a little piece of code that I used and now the steering wheel rotates perfectly.


And here are a couple of pics of my car working in engine.




Tuesday, 24 December 2013

Exporting from 3DsMax

I actually started doing this a while ago so this blog post is a little late. I followed the Complete Vehicle modding tutorial pdf that is on the rfactor 2 website and imported the car they provided. I did that in the first few weeks of my project to get familiar with the workflow. I used this as a base for importing my own car. It was really just a matter of changing file names in the code.

All the material setup is done in Max with a plugin they provided. The only problem is this plugin only works with max 2012 so I had to download the student version of that just to do the exporting. My supervisor advised for me to get the car in the engine before I finish off all the texture work. So the only objects I had textured were the wheels and steering wheel. Its Pretty easy to setup the materials in max once you get used to it. I just had to change my wheels textures as the tyres need their own texture sheet. This is because the tyres have an animated texture that blurs when its spinning.
Here are a few pics of the material setups. Its pretty much the same setup for everything accept for things with alpha channels. cube maps or animated materials. 


Then I just needed to apply the textures to each object. The tyres, rims, brake disks, interior etc all need to be separate and have a specified naming convention. For example for the wheels I have test_car_lr_tire
then just change the lr to lf, rr and lr. This is the same for the rims, brakes and calipers. Also the american spelling of tyre needs to be used which gave me some problems earlier. To export the objects I had to use the GMT file exporter which are the file types rfactor 2 uses. Here's what it looks like.