Updating Tire Compound's Views to RFE Plugin Series ... –

Transcription

Updating Tire Compound's Views to RFE Plugin Series ... –
Updating Tire Compound's Views to RFE Plugin Series – “How to” advices
The intention of this tutorial is giving practical basic advices to quickly update the
mod to show the tread of a “new” compound using RFE Plugin Series or stand
alone using the RFETires Model Component only and it can be followed like a
quick guide to perform better results.
It is highly probable this “basic” tutorial will be updated several times in the near
future due to the variations and new features that will be available in developing
RFE Plugin Series; take in mind that RFE Plugin Series is an evolving project!
To be able to follow the changes, please review the version of this tutorial on the
document’s footer section and/or the specific session of the RFE forum.
It is also very important understanding that making the following changes
will not damage in any case the mod; it can be used with confidence running
rFactor without RFE Plugin Series as well as with the Plugins, enhancing
rFactor itself.
Here we do not go into highly technical details but we show step by step how to
update a compound's view.
First important point is: we can add new compound's views to the mod, but we
must manage gmt(s) and dds(s) files that are parts of the car. Anyone can
technically update it, but we highly recommend to have in advance the
authorization by the author(s) of the mod.
NOTE: this tutorial is intended as an integration of the RFE Mod Basic Tutorial.
Which files must we add?
 all .GMT files related to each tire
 the .DDS files of the tread
Which files must we update?
 the .GEN file of the mod
 all vehicle’s .VEH files of the mod
Updating Tires Compounds View to RFE Plugin Series
page 1 of 11
November 17th, 2012 version 1.6
Step One: analyzing the .GEN file
Since there are several different ways to place and structure the .GMT files into
the instances of the tires, we have to follow the one chosen by the author of the
mod.
Here we cannot document any of them, so we show one of the most used.
First of all we have to localize the instances related to the tires and they are
usually shown as:
//////////////////////////////////////////TIRES///////////////////////////////////////////////
/////////////////////////LEFT FRONT TIRE AND SPINDLE///////////////////////////////
Instance=LFTIRE
{
Moveable=True
MeshFile=FR_LFTIRE.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid, 128,
128) LODIn=(0.00) LODOut=(10.0) ShadowReceiver=True
MeshFile=FR_LFTIRE_MED.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(10.00) LODOut=(30.0) ShadowReceiver=True
MeshFile=FR_LFTIRE_LOW.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(30.00) LODOut=(500.0)
}
Instance=LFSPINDLE
{
Moveable=True
MeshFile=FR_LFSPINDLE.gmt
LODIn=(0.00) LODOut=(50.0)
}
CollTarget=False
HATTarget=False
ShadowCaster=False
/////////////////////////////////RIGHT FRONT TIRE AND SPINDLE///////////////////////////////
Instance=RFTIRE
{
Moveable=True
MeshFile=FR_RFTIRE.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid, 128,
128) LODIn=(0.00) LODOut=(10.0) ShadowReceiver=True
MeshFile=FR_RFTIRE_MED.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(10.00) LODOut=(30.0) ShadowReceiver=True
MeshFile=FR_RFTIRE_LOW.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(30.00) LODOut=(500.0)
}
Instance=RFSPINDLE
{
Moveable=True
MeshFile=FR_RFSPINDLE.gmt
LODIn=(0.00) LODOut=(50.0)
}
CollTarget=False
HATTarget=False
ShadowCaster=False
/////////////////////////////////LEFT REAR TIRE//////////////////////////////////////
Instance=LRTIRE
{
Moveable=True
MeshFile=FR_LRTIRE.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid, 128,
Updating Tires Compounds View to RFE Plugin Series
page 2 of 11
November 17th, 2012 version 1.6
128) LODIn=(0.00) LODOut=(10.0) ShadowReceiver=True
MeshFile=FR_LRTIRE_MED.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(10.00) LODOut=(30.0) ShadowReceiver=True
MeshFile=FR_LRTIRE_LOW.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(30.00) LODOut=(500.0)
}
Instance=LRSPINDLE
{
Moveable=True
MeshFile=FR_LRSPINDLE.gmt
LODIn=(0.00) LODOut=(50.0)
}
CollTarget=False
HATTarget=False
ShadowCaster=False
/////////////////////////////////RIGHT REAR TIRE///////////////////////////////////////////
Instance=RRTIRE
{
Moveable=True
MeshFile=FR_RRTIRE.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid, 128,
128) LODIn=(0.00) LODOut=(10.0) ShadowReceiver=True
MeshFile=FR_RRTIRE_MED.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(10.00) LODOut=(30.0) ShadowReceiver=True
MeshFile=FR_RRTIRE_LOW.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(30.00) LODOut=(500.0)
}
Instance=RRSPINDLE
{
Moveable=True
MeshFile=FR_RRSPINDLE.gmt
LODIn=(0.00) LODOut=(50.0)
}
CollTarget=False
HATTarget=False
ShadowCaster=False
Now we know that the .GMT files that are showing the tires (the ones in bold) are
named “FR_xxTIRE_yy.GMT” where xx = LF / RF / LR / RR to identify the tire itself
and, in case yy = MED / LOW to identify the resolution of the file itself.
This mod uses 3 .GMT files for the compound of the 4 tires = 12 .GMT files.
Assuming that we want to follow the same way of the author of the mod, now we
know that we'll must create the same numbers of .GMT files for any new
compound.
Step Two: creating the .GMT files
 first of all, we must extract the .GMT files we have identified from the mas
file of the mod
 then we must duplicate and rename those 12 .GMT files adding the
abbreviation of the compound we want to add to the mod, like “INT” for
Intermediate and “WET” for Wet Compound. E.g. : “FR_LFTIRE_WET.GMT”
 we must also extract the textures of the original compound to understand
how the author created them. Also here there are several possibilities, like
Updating Tires Compounds View to RFE Plugin Series
page 3 of 11
November 17th, 2012 version 1.6
the use of the diffuse shader only or the diffuse + specular + bump + cube
maps and/or the use of the animation event. According to the author's
choice we have to manage few files only or several ones.
Please note: the feature of showing more than one compound can work also if we
create an easier .GMT structure for the new compounds, so it is not mandatory to
create the most complex level of shader.
 now we must create the texture(s) of the tread for the new compounds.
Textures are saved as .DDS files and can be few or several depending the
author's choice in the original mod. Assuming also here, that we want to
replicate the same structure, we must create the same number of textures
for diffuse, specular, bump, cube map if present and save them exporting
as .DDS format. To manage .DDS we need the plugin released by NVIDIA for
photo-editing software...
 obviously these .DDS files will show the new tread we have chosen to
create!
 is now time to load the new .DDS files into the .GMT files that we have
duplicated and renamed in advance. To perform this action we suggest to
use the 3DSimEd software by Dave Noonan.
 it is very important to change the name of the “material name” according to
the new tread used like “treadw” for wet compound and so on. Also to
perform this action we suggest to use the 3DSimEd software by Dave
Noonan.
 last action is to add the new .DDS and .GMT files to the original .MAS file of
the mod.
Step Three: changes to the .GEN file
We have now to add the new lines that will identify the new .GMT files paying
attention to few key points:
 the MeshFile(s) on the new compound(s) must be written at the bottom of
all original ones for each tire
 we must changes the value of LODIn for each new .GMT files to 10000
leaving the LODOut value like the corresponding original .GMT file
 other values must be unchanged
Here an example that shows the Left Tire ready for the RFETire Model Component:
MeshFile=FR_LFTIRE.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid, 128,
128) LODIn=(0.00) LODOut=(10.0) ShadowReceiver=True
MeshFile=FR_LFTIRE_MED.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(10.00) LODOut=(30.0) ShadowReceiver=True
MeshFile=FR_LFTIRE_LOW.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(30.00) LODOut=(500.0)
MeshFile=FR_LFTIRE_WET.gmt CollTarget=true HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(10000.00) LODOut=(10.0) ShadowReceiver=True
MeshFile=FR_LFTIRE_WET_MED.gmt CollTarget=true HATTarget=False ShadowCaster=(True,
Solid, 128, 128) LODIn=(10000.00) LODOut=(30.0) ShadowReceiver=True
Updating Tires Compounds View to RFE Plugin Series
page 4 of 11
November 17th, 2012 version 1.6
MeshFile=FR_LFTIRE_WET_LOW.gmt CollTarget=true HATTarget=False ShadowCaster=(True,
Solid, 128, 128) LODIn=(10000.00) LODOut=(500.0)
IMPORTANT NOTE: due to the structure of the plugin it is very important that the
“MeshFile(s)” related to the tires MUST BE THE VERY FIRST ONES into their Instance
and that the new ones must follow the original ones.
If other MeshFile(s) is/are loaded into the same instance, they must go below the
tires!
See the following example, where “disc” is below “tire”
Instance=LFTIRE
{
Moveable=True
MeshFile=FBMW_tr_lf_a.gmt CollTarget=False HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(0.00) LODOut=(350.00) ShadowReceiver=True
MeshFile=FBMW_tr_lfw_a.gmt CollTarget=False HATTarget=False ShadowCaster=(True, Solid,
128, 128) LODIn=(10000.0) LODOut=(350.0) ShadowReceiver=True
MeshFile=fbmw_lf_bdisc_a.gmt
LODOut=(50.00) ShadowReceiver=True
}
CollTarget=False
HATTarget=False
LODIn=(0.0)
In case of more than one .GEN file into the mod folder, we must identify which
one is used on track and we need to modify only that file. Sometimes we can find
a “modname.GEN” + a “modnameupgrade.GEN” + a “modnamespinner.GEN” files:
in this case the file to be updated is the first one. Other times we can find a
“modnameupgrade.GEN” + a “modnamespinner.GEN” files: in this case the file to
be updated is the “modnameupgrade.GEN”. But these are only examples... the
better thing to do is to identify the .GEN file that is used on track taking a look at
the .VEH file of the mod, where the right .GEN file to be updated is listed as
“Graphics=”.
Step Four: changes to the .VEH files
Every mod has a certain number of vehicles and we must add several lines at the
end of each .VEH file.
This step is very easy at the basic level we are working. Here are the lines we must
add:
/ Added by ilo, to support current WIP of RFETire
[RFETire]
RFETireCompat = 1 // Enable RFETire visual changes for this vehicle.
RFETireGMTCount = 3 // Every compound will have xxx GMT files.
RFETireGMTLOD0 = 0.0f // LODIN of first gmt.
RFETireGMTLOD1 = 10.0f // LODOUT of first gmt AND LODIN of second gmt.
RFETireGMTLOD2 = 30.0f // LODOUT of second gmt AND LODIN of third gmt.
RFETireGMTLOD3 = 500.0f // LODOUT of the third gmt, LODIN not used as there are not 4 GMT files.
RFETireGMTLODOut = 10000.0f // LODIN for GMT files of non-selected compounds.
As commented next to each line, we must pay attention to the bold values
following these rules:
Updating Tires Compounds View to RFE Plugin Series
page 5 of 11
November 17th, 2012 version 1.6
 RFETireGMTCount = we must inform the plugin how many GMT files must use
for every compound. The plugin allows up to 5 .GMT files for a single
compound. As we are using 3 .GMT files per compound, this value must be
3
 RFETireGMTLOD0= we must inform the plugin about the LODIN values to SHOW
the .GMT files. This value will be used as LODIN for the .GMT that must be
shown depending on the selected compound. We must repeat the line
increasing the “counter” (RFETireGMTLOD0 – RFETireGMTLOD1 – RFETireGMTLOD2 –
etc...) changing for each one the value, according to the one into the .GEN
file. In other words RFETireGMTLODn parameters are used for LODIN
and LODOUT of the .GMT chain, when a compound has more than
one .GMT file and we must add the lines we need
 RFETireGMTLOD3= we must inform the plugin about the LODOUT value of the
last .GMT of the first compound
Understood these concepts we are ready to add these lines into the .VEH files of
the mod we are updating, according with the values shown into the .GEN file of
the mod itself.
Note:
 please refer to the incoming RFETire Model Component advice that will
come with the plugin to understand its setting.
 Other advanced technical notes can be released into the Official RFE
Forum.
IMPORTANT NOTICE:
Due to the structure of rFactor and the way it allocates the memory using lots of
compounds and their .GMT files (e.g. the 6 compounds of the F1 in their low,
medium, high and max resolutions) can cause a disconnection / crash of some
clients after a variable number of participants to a session.
From several tests we did, usually with a F1 mod (6 compounds in 4 resolutions),
exceeding a number of 20 participants can cause the problem.
Currently, to increase the number of participants that rFactor can manages, you
can decrease the number of resolutions used by each compound, modifying the
mod itself.
Obviously a mod with less compounds allows rFactor to manage a higher number
of participants.
Updating Tires Compounds View to RFE Plugin Series
page 6 of 11
November 17th, 2012 version 1.6
APPENDIX
We would remark that the basic upgrade of a mod to RFE Plugin Series doesn't
cover the different ways any modeler has chosen for developing the mod itself
and also how to show all tires or part of them into the showroom as well as how
to manage tires into the upgrade session of the showroom.
The mod was intended to work in game where you can drive it enjoying the new
features of RFE Plugin Series and on track (as well as into the garage) where you
need to have all compounds available for both physical and visual appearance.
Due to the several ways the modelers created their own mods can happen that
original tires added into the "upgrades.ini" file of the mod can lock the use of
other compounds in game.
Despite we understand that the visualization of the compounds into the
showroom could be pleasant, we cannot explain something that is strictly related
to the modeler's job. For us is important that the mod updated to RFE Plugin
Series working correctly entering the garage and the track, without crashes of
rFactor due to a wrong update.
To take it easy we suggest to test the mod updated to its mandatory features
before to add any other option like the visualization of more compounds in the
showroom.
In case the original mod has few different compounds, some of them original
ones can lock the right use of the other new compounds that you added. The
easiest way to solve the problem is to "delete" the upgrade option. In this way
everything will work nice in the garage and on the track. Later, you will try to
update the “upgrades.ini” and in case the “spinner.gen” files of the mod to have it
working also showing all the available compounds, but we cannot help you in this
job.
The file that could be involved into the problem are:
“upgrades.ini” of the mod
“spinner.gen” of the mod
To have the mod working in garage and on track we can say: edit the
“upgades.ini” of the mod and REMOVE all lines related to the tires!
And, in effect, this is correct and also very easy to do!
Updating Tires Compounds View to RFE Plugin Series
page 7 of 11
November 17th, 2012 version 1.6
But in few cases can happen that in the showroom any vehicle of the mod is no
longer showing itself or it is shown without the tires. Despite it is only a wrong
visualization in the showroom and going in game the mod works perfectly and
finally with all compounds available, we understand that is not the best result we
would achieve.
In this case you have to work on the “spinner.gen” of the mod. The concept is to
give the right info to see tires and mod in the showroom, replacing the variable
that links this file to the “upgrades.ini” with a fixed value. Here we are speaking of
one .GMT file...
The best way to understand what you must do is showing the contents of these
files related to a specific mod, remembering not all the modelers made it at the
same way.
This is part of the ORIGINAL “upgrades.ini” file of the F1 2012 by SandroX with
several not relevant lines omitted (look at the string in bold blue):
BaseVehiclePrice=0
...
UpgradeType="Tire Compounds Preview"
{
Instance="TIRES"
Instance="LFTIRE"
Instance="LRTIRE"
Instance="RfTIRE"
Instance="RRTIRE"
UpgradeLevel="Soft"
{
Description="Soft"
IconLevel=0
GEN=<TIRES>=_tire_sof_spin.gmt
...
We must keep track of this line GEN=<TIRES>=_tire_sof_spin.gmt we'll use later.
The NEW “upgrades.ini” file of the F1 2012 by SandroX will be (this time all
shown):
BaseVehiclePrice=0
UnlockExperience=0
UpgradeType="FFB Strength"
{
Incremental=0
UpgradeLevel="FFB Mult level 2 (Default)"
{
Description="FFB Mult level 2 (Default)"
}
Updating Tires Compounds View to RFE Plugin Series
page 8 of 11
November 17th, 2012 version 1.6
UpgradeLevel="FFB Mult level 1"
{
Description="FFB Mult level 1 (Lightest)"
HDV=[CONTROLS]
HDV=SteeringFFBMult=1.0
}
UpgradeLevel="FFB Mult level 1.5"
{
Description="FFB Mult level 1.5"
HDV=[CONTROLS]
HDV=SteeringFFBMult=1.5
}
UpgradeLevel="FFB Mult level 2"
{
Description="FFB Mult level 2"
HDV=[CONTROLS]
HDV=SteeringFFBMult=2.0
}
UpgradeLevel="FFB Mult level 2.5"
{
Description="FFB Mult level 2.5"
HDV=[CONTROLS]
HDV=SteeringFFBMult=2.5
}
UpgradeLevel="FFB Mult level 3"
{
Description="FFB Mult level 3 "
HDV=[CONTROLS]
HDV=SteeringFFBMult=3.0
}
UpgradeLevel="FFB Mult level 3.5"
{
Description="FFB Mult level 3.5"
HDV=[CONTROLS]
HDV=SteeringFFBMult=3.5
}
UpgradeLevel="FFB Mult level 4.5"
{
Description="FFB Mult level 4.5"
HDV=[CONTROLS]
HDV=SteeringFFBMult=4.5
}
UpgradeLevel="FFB Mult level 5"
{
Description="FFB Mult level 5"
HDV=[CONTROLS]
HDV=SteeringFFBMult=5.0
}
UpgradeLevel="FFB Mult level 5.5"
{
Description="FFB Mult level 5.5"
HDV=[CONTROLS]
HDV=SteeringFFBMult=5.5
}
UpgradeLevel="FFB Mult level 6"
{
Description="FFB Mult level 6 (Hardest)"
HDV=[CONTROLS]
HDV=SteeringFFBMult=6.0
}
UpgradeLevel="RealFeel FFB Mult level 0"
{
Description="FFB Mult level 0 (RealFeel)"
HDV=[CONTROLS]
HDV=SteeringFFBMult=0.0
}
}
Updating Tires Compounds View to RFE Plugin Series
page 9 of 11
November 17th, 2012 version 1.6
As you can see it is like the original but WITHOUT the part related to the tires. To
create this new file is easy: make a copy in advance of the original one for future
purposes and then save the file without any info related to the tires.
Now you must edit the “spinner.gen” file. Also in this case make a copy of the
original one before editing it.
Here is the ORIGINAL “spinner.gen” file of the F1 2012 by SandroX (pay attention
to the bold blue string):
//---------------------------------------SearchPath=<VEHDIR>
MASFile=rF1_2012/Update1.mas
MASFile=rF1_2012/Form.mas
MASFile=rF1_2012/Spinner.mas
//---------------------------------------SearchPath=<TEAMDIR>
MASFile=Form.mas
ReflectPlane=(0.0, -1.0, 0.0, 0.0)
//-------------------------------------------------------------------------------Instance=SLOT<ID>
{
Moveable=True
MeshFile=<1234>_body_spin.gmt CollTarget=False HATTarget=False LODIn=(0.0) LODOut=(100.0) Reflect=True
MeshFile=<12>_shadow.gmt CollTarget=False HATTarget=False LODIn=(0.0) LODOut=(100.0)
<STARTUPGRADES>
Instance=TIRES<UPNUMBER>
{
Moveable=True
MeshFile=<12><TIRES> CollTarget=False HATTarget=False LODIn=(0.0) LODOut=(100.0) Reflect=True
}
<STOPUPGRADES>
}
Do you remember? We have already seen this <TIRES> variable into the original
“upgrades.ini” file: GEN=<TIRES>=_tire_sof_spin.gmt
where GEN means that the line is related to the “spinner.gen” file and <TIRES>
identifies the name of the GMT that is used (in this case this is the one related to
the “soft” compound).
Well, another easy step to have the vehicle visible also into the showroom:
REPLACE the “<TIRES>” with “_tire_sof_spin.gmt”, save the file and enjoy the mod:
Updating Tires Compounds View to RFE Plugin Series
page 10 of 11
November 17th, 2012 version 1.6
//---------------------------------------SearchPath=<VEHDIR>
MASFile=rF1_2012/Update1.mas
MASFile=rF1_2012/Form.mas
MASFile=rF1_2012/Spinner.mas
//---------------------------------------SearchPath=<TEAMDIR>
MASFile=Form.mas
ReflectPlane=(0.0, -1.0, 0.0, 0.0)
//-------------------------------------------------------------------------------Instance=SLOT<ID>
{
Moveable=True
MeshFile=<1234>_body_spin.gmt CollTarget=False HATTarget=False LODIn=(0.0) LODOut=(100.0) Reflect=True
MeshFile=<12>_shadow.gmt CollTarget=False HATTarget=False LODIn=(0.0) LODOut=(100.0)
<STARTUPGRADES>
Instance=TIRES<UPNUMBER>
{
Moveable=True
MeshFile=<12>_tire_sof_spin.gmt CollTarget=False HATTarget=False LODIn=(0.0) LODOut=(100.0) Reflect=True
}
<STOPUPGRADES>
}
Last, but not least, remember that you could find more than one variable used
into the part of the original “upgrades.ini” file related to the tires. In this case you
must update also this / these other variables.
Updating Tires Compounds View to RFE Plugin Series
page 11 of 11
November 17th, 2012 version 1.6