• Welcome to Kart Racing Pro Official Forum. Please login or sign up.
 
March 19, 2024, 03:01:55 AM

News:

Kart Racing Pro release13e available! :)


Track conversion tutorial rFactor - Kart Racing Pro

Started by Racehard, January 07, 2011, 01:50:19 PM

Previous topic - Next topic

Racehard

January 07, 2011, 01:50:19 PM Last Edit: August 04, 2013, 12:28:56 PM by Racehard
Hello,
I finished the conversion tutorial today, with the great help of vizzz I managed to convert a track, so I decided to write an accurate tutorial for everyone  who has not that much 3ds Max knowledge like myself. So don't thank me thank vizzz ;)

At first you will have to get the textures and 3d gmt files out of the .mas files of your rFactor track.
Therefore you need the gMotor 2.0 MAS Utility
from here:
http://rfactor.net/web/rf1/devcorner/

Open the mas utility and just drag and drop your track's .mas file into the window.
Mark all -> right click -> extract -> now extract it into a folder of your choice.

The next step is to convert all the .dds texture files into .tga files
Therefore you need the dds converter
You get this small tool from here:
http://www.mediafire.com/?9ndsalpfw9krwpl

Note! To avoid any kind of scale problems, after importing the track to 3ds max you have to correct 2 settings in 3ds max:
Go to the top bar --> Customize--> Units setup...  --> set it to Metric and Meters --> then click on the "Sytem Unit Setup" button --> set the system unit scale to meters  and your done, now your track should have the same size like in Bobs Track Builder and forget anything else I wrote about rescaling the track ! ;)


Now you have to bring the track into 3ds Max, so you need the gmt importer plugin and script for 3dsMax and also rF hardwareshaders.
You get the gmt plugin at:
http://rfactor.net/web/rf1/devcorner/     rFactor Max Plugins (32 Bit)
Installation:
Extract the zip file into C:\Program Files\Autodesk\3ds Max\stdplugs\

You get the script from the attachment of reply # 4 http://forum.kartracing-pro.com/index.php?topic=95.0
Installation:
Extract the zip file into C:\Program Files\Autodesk\3ds Max\Scripts\Startup\

You get the hardwareshaders from here:
http://www.mediafire.com/?lebpwmw8l9lq7lb
Installation:
Extract the zip file into C:\Program Files\Autodesk\3ds Max\hardwareshaders


(In the following the marker will show you where to click)
Start 3ds Max

EDIT: You should set the units setup to meters, so that you may avoid the rescaling of your track at the end (I'm not sure if it helps)
Click on Customize (at the very top bar in the middle) -> Units setup... -> select Metric and meters -> OK


Click on the hammer symbol-> MAXScript --> choose gmt2 Importer -->
change the additional texture path to wherever you saved the TGA textures of your track-->
activate No smoothing (my 3ds Max freezed when I had selected proper smoothing) -->
Import a directory--> search for the folder where all your .gmt's of your track are saved





Now it should take a bit time and all the textures should be found automatically (if not, some textures are missing so 3ds max tells you to find them manually, if you can't find them use spare textures you can still replace them later on with some proper textures)
When this process is finished you are going to see the whole track with all textures and also the Material Editor window.

In the Material Editor window you see all the sub materials of the multimaterial.
As a next step you need to change all gMat materials into standard materials.

So press the button grass2 (gMat)
3




--> scroll down in the marked area until u see the textures area at the bottom (now you may see 3 textures, at my track there was the normal colored texture, and 2 others with a similar but bit more specified name which are not of interest // you will understand what I mean during the next steps) -->
Press on the first button Map #76 (gTex)
4





--> At first, note or remember the name of the texture (as you can see it is just named ground_grass003.tga without any _spec or whatever, if you would open this texture from your tracks texture folder you would see that it is just the normal colored one, so exactly the one you need) -->
Now as a second step click on the yellow marked small button in the top row to get back to the area where you have been before (picture above) or you choose grass2 where currently the name Map #76 is shown, both ways bring you back to were you have been before.
5



When you are back at the grass2:
Click on gMat --> Material/Map Browser opens
6



Material/Map Browser:
Choose Standard --> click OK
7



The grass texture turned grey therefore you had to remember the name of the texture ;)
--> click on the small yellow marked button right beside Diffuse --> Material/Map Browser opens again
8



Material/Map Browser:
Double click on Bitmap --> navigate to the folder where all your TGA textures of the track are located and search for the certain texture of which you have had to note/remember the name
IMPORTANT NOTE for textures:If you have tree textures in your scene on which you want the sky above to be transparent, they NEED an alpha channel, so if you convert from dds to tga there should still be the alpha channel, if not you'll have to create it. Therefor I would suggest, that you convert your texture to png and cut away and delete the sky above the trees, afterwards convert it to dds and an alpha channel will be automatically created, then convert it back to tga. Another way to create the alpha channel would be to do it in photoshop directly at the layer menu.
Another important thing is that you should add the prefix CK_ to your tree textures name. (eg. CK_tree.tga ) this will prevent problems with the visibility of trees which are behind each other in the scene.
9



After that you get back to the Material Editor, there you have to press the checked cube button, to make the textures you have just chosen visible at your 3d scene

10
--> now you have to click 2 times on the top right button in the blue circle to get back to the basic Material Editor page where all the other submaterials are shown.



At the basic Material Editor page you now can see that the grass2 submaterial isn't a gMat material anymore but a standard one and that's exactly what you want.
11




That's how you change the gMat materials into standard materials, now do it the same way for all the other submaterials in the list.

(Note: Afterwards you can close the Material Editor you can open it up again with pressing the M-key of your keyboard)




When you finished changing them all into standard materials, your next bigger task is to rename all objects in the scene with proper names.
You find these names in PiBoSo's track creation manual under the category Names.
http://tools.piboso.com/index.php/Track_Creation_Rules

Read completely through that section and you should be able to match the existing objects of your track with the correct names of PiBoSo's guide. If not just ask in this thread ;)

To rename objects in the scene is pretty simple, it works as follows:

(At first you have to get in selection mode of 3ds Max --> press on the marked button in 3ds Max top task bar see picture beneath) 
For example you begin with the main track surface, just select the track surface by clicking on it, for selection of the track surface 3ds Maxs' Top view is advantageous (selected objects appear white, before selection they have any kind of color).
Now you see the objects name at top right position "t0_s0", rename it with the proper name which here is TRK (the prefix), followed by ASPH (for main track surface) so the complete new and correct name is: TRKASPH_object1

12


------> 13


Let me give you another example, for a tyre wall, select it and rename it:
WLLTYRE_object1,2,3....

The parking lot would be:
OFF_TRKCONC_object1  (OFF_ is an additional prefix for asphalt/concrete objects)

Note:You can rename more objects at once, this will make the renaming process way faster, just follow these instructions:
You have to select one group of objects (using ctrl + left click)
Tools (top task bar) --> Rename objects and fill in  "base name", "prefix", "subfix" and "numbered" (starting from 1 always) using Pibosos guide

EXAMPLE:

Base name: ASPH
Prefix: TRK
Subfix: _object
numbered: 1


That's how you rename all objects.
When you finished with renaming them you are almost done with the 3ds Max part.

As a last step in 3ds Max you have to export your scene 2 times.
One file hast to be a collision file .trp and the other one a map file .map.

For exporting you need the EDFexp plugin
http://tools.piboso.com/index.php/Export_Plugin
Install it like PiBoSo explained.


The exporting process:

File --> Export...

Save in your new track folder named like the track

Let us start with the .map file
14

15



Now the .trp file
16

17


If ending log is shown while the converting process it is finished.


That was the whole 3ds Max part of the conversion :)



Next you will have to work with PiBoSo's Track Tools (Track Editor/ TrackED and Map Viewer) software, which you get from here: http://www.kartracing-pro.com/?page=downloads

Which both are pretty good explained here:
Map Viewer: (in Map Viewer you can open your .map file and see if it looks alright)
http://tools.piboso.com/index.php/Map_Viewer

TrackED: (in TrackED you finish your track for KRP)
http://tools.piboso.com/index.php/Track_Editor

Follow PiBoSo's Workflow instructions:
•   Create a centerline
1.   Centerline -> New
2.   ....
If you finished that, you will have to create the Race Data.

Just play around a bit with the values and you will understand how it works.
(save the finsihed Race Data as .rdf file with the same filename as your .trp and .map file into the same folder)



And don't forget to set checkpoints to prevent cutting the track! In top right of the race data window you see the checkpoints, works exactly the same as setting up sectors, so just add as many checkpoints as you need to make the track secure against cheating.



This step is followed by the last part, bring it ingame :)

Right now you have the three files StyriaKarting.map, StyriaKarting.trp and StyriaKarting.rdf all in your track folder (StyriaKarting).

Navigate to the Kart Racing Pro main directory and copy the file tracks.pkz to a place of your choice (desktop or anywhere else), this file is a zip file, so you can open it with winrar or another archive program winzip etc. Inside the tracks file there's tracks\lonato. Extract the lonato folder to
X:\Program Files\Kart Racing Pro\tracks\ 
and rename it into your tracks name (StyriaKarting).

Inside the folder rename all lonato.xxx files into your tracks name (StyriaKarting.xxx)
-->  delete the file bestline.tl  --> copy and overwrite your three track files StyriaKarting.trp, .map and .rdf into it.

Now open the file StyriaKarting.ini (configuration file) with windows editor accessory and type in the correct data of your track)

The very last step before you can enjoy your new track in kart racing is to exchange the TGA pictures with appropriate ones of the same size and name showing your Track ;)


I hope this tutorial helped you enough to manage the conversion by yourselves :)

If you still have a question or something isn't working as expected feel free to ask here.

Note: Don't forget to ask the rF track creator for permissions, if you are allowed to convert it :)

Aritz

woaw :D

I don't read all but this is very usefull for a lot of people here :)

Thank you (you and your mentor of course!)

Eslotes

People Convert the track please do it for the comunnity xD
A smooth race never made a skillful racer.

Diswanio


Racehard

January 07, 2011, 05:57:21 PM #4 Last Edit: January 07, 2011, 06:00:47 PM by Racehard
Thanks :)
__________________________
!!!

I just realized that I have forgotten to write about the hardwareshaders you need before importing with the gmt2 importer.

I added them to the tutorial direct under the gmt2import script instructions.

!!!

Fredrik

Realy good with a detailed walkthrough of the conversion process. Is there anyone out there that use 3DSimED that would know if this tool could simplify the process? And if so could give a hint of what to use 3DSimEd for?

Aritz

First problem for me:

I haven't any .MAS file except sky.mas, but this it isn't mine at all (last modification 2008)

But I can see DDS and other files into "gamedata/locations/my track/" folder, are those the files which I have to convert to TGA?

Thank you again and sorry if this is a stupid question :)

Racehard

Quote from: Aritz on January 07, 2011, 09:33:06 PM
First problem for me:

I haven't any .MAS file except sky.mas, but this it isn't mine at all (last modification 2008)

But I can see DDS and other files into "gamedata/locations/my track/" folder, are those the files which I have to convert to TGA?

Thank you again and sorry if this is a stupid question :)

No problem,
If you have no .mas file, the files you need are already outside in your track folder.
Take all DDS file you find in your track folder and convert them to .TGA (put the converted TGA's into a folder "TGAtextures" (for example) so you can select the path like you see in picture 2 step 4. ) Then picture 2 step 6. select the folder with all the .gmt files of your track (so you could directly select your track folder I guess).
Hope that helps ;)

Aritz

January 08, 2011, 02:24:13 PM #8 Last Edit: January 08, 2011, 02:25:45 PM by Aritz
Your guide is incredible, everything is clear like water! Congratulations :)

I realised that the name change is a looooong work :)

My first extrange thing is this: I can see walls in the middle of the track but there aren't in BTB:





Also I've lost the mix of the background and grass in 3dMax:




When I export to pibosos track editor, I have an issue: The track is very short, the scale is wrong (so wrong). Piboso said that I have to rescale the track using 3dmax but of course, I have no idea how to do this :) Can you help me?

Thank you for helping me, I am sooooo noob in this kind of programs, sorry :(

Aritz

January 08, 2011, 02:30:41 PM #9 Last Edit: January 08, 2011, 02:37:57 PM by Aritz
I could easily delete these walls :) Don't explain me anything about it ;)

And I realised why I can't see the background mixed and walls are black... In rFactor I had the same problem, it didn't load my edited textures (tress, boxes and google earth captured background)

Maybe I have to ask to other people with better BTB use knowledge...

Racehard

January 08, 2011, 03:18:18 PM #10 Last Edit: January 08, 2011, 03:37:18 PM by Racehard
Hello Aritz,

I am happy to see, that you are finding your way through the tutorial :)

I have to add, that you don't necessarily need to rename all objects with correct names. You just need to rename the objects with correct names which the kart should collide with/drive on and only objects with correct names have shadows, if you just leave for example all houses with the standard/wrong name, you will still see them ingame but you candrive through them like if they were ghosts. More shadows also mean nicer optics but lower frames ingame so you have to find a balanced way.

I also had the rescaling problem, but you can fix that easily. At first you have to find out how big your track is in reality, I used the scale of google maps for that, which is not the accuratest way I have to say. For sure there is a more accurate way but at the moment I have no better idea than that.
At first select the rescale tool at the top bar, then select your whole track and make sure to rescale with clicking on the inner part of the triangle, so you scale your track in all three dimensions, otherwise your track will be bigger but flat. At the bottom besides the X: and Y: you see the position of your mouse cursor in meters (the distance to the center is measured).


ps:. don't forget to save your scene more or less often and also make a safety copy if something goes really wrong with the scene ;)

Aritz

THX

I assume that track width rescales will rescale the track long too :)

I've thinking about missing textures. I see red squares when I am changing from gmat to standard (in grass, walls etc) I can see them well in BTB, but rFactor crashes when I load my track with this kind of messages:

"Error loading texture Magescq for material grass0_0" (Magescq is my track and grass0_0 is a default pack texture that I modified with a better one)

Racehard

January 08, 2011, 05:28:05 PM #12 Last Edit: January 08, 2011, 05:29:58 PM by Racehard
Quote from: Aritz on January 08, 2011, 05:22:33 PM
THX

I assume that track width rescales will rescale the track long too :)

I've thinking about missing textures. I see red squares when I am changing from gmat to standard (in grass, walls etc) I can see them well in BTB, but rFactor crashes when I load my track with this kind of messages:

"Error loading texture Magescq for material grass0_0" (Magescq is my track and grass0_0 is a default pack texture that I modified with a better one)

If you do the rescaling like in my picture, It will work in all three dimensions x,y,z so the proportions stay the same.

I am sorry I don't understand your problem with the textures? Pls make some screenshots :)

Aritz

Following your instructions, I have to change from gMat to standard. In most I see this:





I think this other is important to understand it. BTB shows:



BUT 3dmax don't!




Aritz

Aparently you have the extrange issue, the grass walls in the middle of track... WTF?

http://www.abload.de/image.php?img=31h46.jpg