Drivetrain

From UnityCar Wiki

(Difference between revisions)
Jump to: navigation, search
Line 49: Line 49:
== Driveline ==
== Driveline ==
-
The Driveline represents everything needed to transfer the engine torque to the wheels.You can customize the driveline by modifying these parameters:Powered Wheels, where you specify the number and which wheels are used to transfer thepower to the ground. Typical values are the two front wheels (FWD), the two rear wheels(RWD) and all the four wheel (AWD).Gear Ratios, which represents the number and the ratio of the gears. The size valuerepresents the numbers of the gears (included neutral and reverse). The value of eachelement represents the ratio, that is the length of that gear. The smaller the value, the longerthe gear. The first element is the reverse (so its value should be negative), the secondelement is the neutral (so its value should be zero), the third element is the first gear and soon. Anyway you can use as many reverse and as many forward gear, provided that in themiddle there is a neutral gear (that is with value zero).Final Drive Ratio, which represents the ratio of all gears. So if you want to make all gearslonger, just decrease this value, if you want to make all gears shorter, increase this value.Typical values are 3.5 for a medium car, 6.0 for a powerful car.Engage RPM. This value represents the RPM at which the clutch starts engaging (the clutchstarts connecting the engine to the wheel) while starting. Should be higher than the minRPM.Disengage RPM. This value represents the RPM at which the clutch starts disengaging (theclutch starts disconnecting the engine from the wheel) when the RPM is too low for thecurrent gear. Should be higher than the min RPM and lower than Engage RPM.Engine Inertia Min and Max. These values represent the engine inertia at low RPM(Engine Inertia Max) and engine inertia at hi RPM (Engine Inertia Min). Engine inertiaslow down engine revving up. The higher the engine inertia, the slower the engine revs up.
+
The Driveline represents everything needed to transfer the engine torque to the wheels.You can customize the driveline by modifying these parameters:
 +
*'''Powered Wheels''' where you specify the number and which wheels are used to transfer the power to the ground. Values are '''FWD''' (two front wheels), '''RWD''' (two rear wheels) and '''AWD''' (all the four wheel).
 +
*'''Gear Ratios''' which represents the number and the ratio of the gears. The size valuerepresents the numbers of the gears (included neutral and reverse). The value of eachelement represents the ratio, that is the length of that gear. The smaller the value, the longerthe gear. The first element is the reverse (so its value should be negative), the secondelement is the neutral (so its value should be zero), the third element is the first gear and soon. Anyway you can use as many reverse and as many forward gear, provided that in themiddle there is a neutral gear (that is with value zero).Final Drive Ratio, which represents the ratio of all gears. So if you want to make all gearslonger, just decrease this value, if you want to make all gears shorter, increase this value.Typical values are 3.5 for a medium car, 6.0 for a powerful car.Engage RPM. This value represents the RPM at which the clutch starts engaging (the clutchstarts connecting the engine to the wheel) while starting. Should be higher than the minRPM.Disengage RPM. This value represents the RPM at which the clutch starts disengaging (theclutch starts disconnecting the engine from the wheel) when the RPM is too low for thecurrent gear. Should be higher than the min RPM and lower than Engage RPM.Engine Inertia Min and Max. These values represent the engine inertia at low RPM(Engine Inertia Max) and engine inertia at hi RPM (Engine Inertia Min). Engine inertiaslow down engine revving up. The higher the engine inertia, the slower the engine revs up.

Revision as of 01:38, 4 June 2011

This class simulates the engine and the driveline.

Contents

Engine

The engine torque can be simulated using the function CalcEngineTorqueInt or writing an external torque file.


Calculate the torque curve using the function CalcEngineTorqueInt

Remember to uncheck Load External Torque Data checkbox if you want to use this.

In order to use the CalcEngineTorqueInt function you have to set the following 4 values:

  1. min RPM, which represents the minimum RPM value for the engine to work. This is the idle RPM. Typical values are in the range 500 – 1500 RPM;
  2. max RPM, which represents the maximum RPM value for the engine to work. Typical values are in the range 6000 – 10000 RPM;
  3. max Power, which represents the max power (in HP) produced by the engine. Typical value for a medium car is 150 HP, for a powerful car is 450 HP;
  4. max Power RPM, which represents the RPM at which the the power is produced. Typical values are in the range 5000 – 9000 RPM;


Calculate the torque curve using an external torque file

Remember to check Load External Torque Data checkbox if you want to use this.

Using an external torque file means that you specify the torque (and consequently the power) of the engine in a discrete way, specifying a certain numbers of steps (interpolated internally by the script). Each step consists of a couple of value, the torque value and the RPM value at which the torque is expressed. This is an example of a torque file:

[engine]
torque-curve = 500, 240
torque-curve = 700, 408
torque-curve = 1000, 530
torque-curve = 1500, 598
torque-curve = 2000, 650
torque-curve = 3000, 680
torque-curve = 4000, 693
torque-curve = 5000, 466
torque-curve = 6000, 112
torque-curve = 6500, 10

The first value is the RPM value, the second is the torque value. You can specify as many steps as you want. Engine power is calculated from its torque. In order to UnityCar to load the torque file properly, the file must be in the same directory of the unity3d package and must be called with the same name as the car in the inspector (with space character " " substituted with the underscore "_") and must have the extension ".ini". So for example: unity3d_package_directory\Monster_Truck.ini

unity3d_package_directory\Catamount_UM001.ini

unity3d_package_directory\Peugeot_205_T16.ini

Its important to define some steps for the lowest RPMs of the engine in order to obtain smooth starts.

Driveline

The Driveline represents everything needed to transfer the engine torque to the wheels.You can customize the driveline by modifying these parameters:

  • Powered Wheels where you specify the number and which wheels are used to transfer the power to the ground. Values are FWD (two front wheels), RWD (two rear wheels) and AWD (all the four wheel).
  • Gear Ratios which represents the number and the ratio of the gears. The size valuerepresents the numbers of the gears (included neutral and reverse). The value of eachelement represents the ratio, that is the length of that gear. The smaller the value, the longerthe gear. The first element is the reverse (so its value should be negative), the secondelement is the neutral (so its value should be zero), the third element is the first gear and soon. Anyway you can use as many reverse and as many forward gear, provided that in themiddle there is a neutral gear (that is with value zero).Final Drive Ratio, which represents the ratio of all gears. So if you want to make all gearslonger, just decrease this value, if you want to make all gears shorter, increase this value.Typical values are 3.5 for a medium car, 6.0 for a powerful car.Engage RPM. This value represents the RPM at which the clutch starts engaging (the clutchstarts connecting the engine to the wheel) while starting. Should be higher than the minRPM.Disengage RPM. This value represents the RPM at which the clutch starts disengaging (theclutch starts disconnecting the engine from the wheel) when the RPM is too low for thecurrent gear. Should be higher than the min RPM and lower than Engage RPM.Engine Inertia Min and Max. These values represent the engine inertia at low RPM(Engine Inertia Max) and engine inertia at hi RPM (Engine Inertia Min). Engine inertiaslow down engine revving up. The higher the engine inertia, the slower the engine revs up.
Personal tools
Car Tuning
Track Tutorials
Configuration