forked from Eddlm/Handling-Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
guide.html
376 lines (332 loc) · 21.1 KB
/
guide.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="notify.js"></script>
<title>Handling</title>
</head>
<body class="bg-secondary">
<div class="bg-light w-75 mx-auto">
<div>
<small class="float-right px-1 text-muted">0.3.5</small><br>
<div class="text-center">
<span class="display-4">Handling.meta</span><br>
<span class="mt-2">Understand how it all works.</span>
</div>
</div>
<div class="container px-5" style="max-width:1500px">
<div class="py-5 w-50 mx-auto">
<p>In this guide I am going to separate the items into the concepts they tackle and explain how they
work and interact with each other.</p>
<p>If you're only interested in fixing something in your handling, go to the <a
href="https://eddlm.github.io/Handling-Tools/handling">handling editor</a>.</a></h>
</p>
</div>
<section class="container-fluid w-75">
<article>
<p class=" text-center">
<span class="h2">Introduction to GTA V's handling physics</span><br>
</p>
<hr>
<p>Thankfully, Grand Theft Auto V features a surprisingly comprehensive and detailed handling
physics system. While the engine simplifies very complex matters into only sets of two or three
variables, it does allow to make vehicles behave in a sufficiently complex manner that can
mimick IRL to a sufficient degree, allowing for concepts like weight transfer,
understeer/oversteer, wheelspin and per-wheel brake luckup to exist within the car's behavior on
the road.</p>
<p>V accomplishes this by implementing systems in an appropiate but simplified manner. For example
gearing actually modulates the car's acceleration depending on the gear, but torque isn't
actually a thing, as its just power scaled up and down by the gears. Wheels actually push (or
pull) the car forward, but the rim size on the model does not affect acceleration or speed given
the same power.</p>
<p>This guide is appropiate for both vanilla, lore-friendly and real vehicles, because the source of
the vehicle model is irrelevant. What's important is the style of handling you want it to have.
</p>
</article>
<article>
<p class="text-center">
<span class="h2">Keystones of handling</span> <br>
</p>
<p>It is important to understand a few things before embarking on creating/editing handling files to
your liking.</p>
<ul>
<li>No section works isolated. Every thing you edit will partially affect other characteristics
of the car. Think of it as each item being a physical characteristic contributing to the
complete physical behavior of the car.</li>
<li>A good chunk of items do not work the same way their IRL counterparts do, they only
approximate.</li>
</ul>
</article>
<article>
<p>
<span class="h2">Center of Mass</span> <br>
<small class="text-muted">vecCentreOfMassOffset</small>
</p>
<hr>
<p>Starts as the model's center, visible with OpenIV's model viewer. <i>vecCentreOfMassOffset</i>
offsets it around so you can put the CoM wherever you want.</p>
<h4>Must-knows</h4>
<ul>
<li>
Y means ahead/behind, Z means up/down. You don't need to edit X (left/right) most
of the time.
</li>
<li>The car will pivot around the CoM while mid-air, but pivot around fRollCentreHeight while on
the ground.</li>
<li>The most balanced car will have a CoM sitting exactly between the axles.</li>
<li>
CoM is directly tied to fRollCentreHeight(Front/Rear) - together they control weight
transfer. Think of it as a line drawn from the CoM Z down to the fRollCentre. The longer it
is, the more weight transfer. Lowering CoM Z or raising fRollcentre reduces weight transfer,
overdo it and the car will never lean.
</li>
</ul>
<h4>Where to put it</h4>
<p>Usually the CoM can go on the vehicle's center, Y sitting bewteen the axles and Z sitting right
below the engine's height.</p>
<p>Do keep in mind the Center of Mass is a great way to define the vehicle's intrinsic stability, as
you define how
well balanced it is. Think of it as a basic tendency you can put onto the car's chassis. </p>
<p class="text-center">
<img src="https://via.placeholder.com/500x250?text=Low, Centered COM" class="h-75">
</p>
<p>A vehicle with a raised CoM (Z component) will tend to move around more, specially in landings
and mid-air. Here's how it looks:</p>
<p class="text-center">
<img src="https://via.placeholder.com/500x250?text=High, Centered COM" class="h-75">
</p>
<p>You can move the CoM forward or back to destabilize the vehicle in a different way, a bit more
complex than high-low. Front or Rear biased vehicles can react to this fact in a multitude of
ways, in general being more or less prone to understeer or oversteer. A bias front or back bias
can also enhance turn-in ability, and take-off and landing behavior.</p>
<p class="text-center d-flex align-content-center">
<img src="https://via.placeholder.com/500x250?text=Low, front COM" class="px-1">
<img src="https://via.placeholder.com/500x250?text=Low, back COM" class="px-1">
</p>
</article>
<article>
<p>
<span class="h2">Moment of Inertia</span> <br>
<small class="text-muted">vecInertiaMultiplier</small>
</p>
<hr>
<p>To be written.</p>
</article>
<article>
<p>
<span class="h2">Grip & Traction</span> <br>
<small class="text-muted">fTractionCurveMax, fTractionCurveMin, fTractionCurveLateral,
fTractionLossMult</small>
</p>
<hr>
<p>One of the most important aspects of Handling, grip defines how quickly the wheels can make the
car accelerate, decelerate, or change direction.</p>
<h4>Must-knows</h4>
<ul>
<li>Grip is measured in G-Forces, remember 1G is <b>9.8m/s</b> of acceleration.</li>
<li>The car will pivot around the CoM while mid-air, but pivot around fRollCentreHeight while on
the ground.</li>
</ul>
<p>Interestingly, Grip is measured in G-Forces, which translate to how fast the wheels can
accelerate-decelerate the car before starting to skid. This ties in directly with braking and
torque, which also are measured in G-Forces. If there's not enough grip to accomodate torque or
braking, the wheels are overwhelmed and will lose traction.
</p>
<ul>
<li><i>fTractionCurveMax</i>: Defines the base maximum ammount of Gs the vehicle is able to work with.
</li>
<li><i>fTractionCurveMin</i>: Defines the base minimum ammount of Gs the vehicle has when skidding or
losing traction.</li>
<li><i>fTractionCurveLateral</i>: In degrees, acts as the tire slip angle. The tires will get the best
grip at the top half of this value</li>
<li><i>fTractionLossMult</i>: Defines how griploss scales on troublesome surfaces like grass, dirt or
snow. Check materials.meta to know how much grip each surface detracts.</li>
</ul>
</article>
<article>
<p>
<span class="h5">Bodyroll & Suspension Pressure effects on Grip</span>
</p>
<p>Surprisingly, V simulates grip gains (and loses) from suspension pressure. This means that on
whichever tires the car is leaning to, get a significant ammount of traction, while tires on the
other side lose traction.
</p>
<p>This is best seen on FWD vehicles, which have a real hard time getting traction on launch. If you
reduce bodyroll or move the center of gravity forward, the issue is greatly reduced.</p>
</article>
<article>
<p>
<span class="h5">Surfaces and <i>fTractionLossMult</i></span>
</p>
<p>Only roads make the most of the vehicles' grip, and other surfaces like grass, dirt,plastic,
concrete
and snow reduce the overall grip. fTractionLossMult scales how important the effect is.</p>
</article>
<article>
<p>
<span class="h2">Braking</span> <br>
<small class="text-muted">fBrakeForce, fBrakeBiasFront, fHandBrakeForce</small>
</p>
<hr>
<h4>Must-knows</h4>
<ul>
<li><i>fBrakeForce</i> applies <b>per wheel.</b> So don't put it equal to <i>fTractionCurveMax</i>, use about a 1/4 of it. Or 1/X where X is the nº of wheels on your thing.</li>
<li><i>fBrakeBiasFront</i> at 0.5 delivers the same brake pressureto all axles. 1.0 only delivers to the front axles, 0.0 only delivers to the rear.</li>
<li>A well balanced <i>fBrakeBiasFront</i> allows full control of the car under heavy braking, this balance usually is between 0.55 and 0.7. You can produce oversteer by using a lower value, and understeer if using a higher value.</li>
</ul>
</article>
<article>
<p>
<span class="h2">Aero</span> <br>
<small class="text-muted">fInitialDragCoeff, fDownforceModifier</small>
</p>
<hr>
<span class="h5">Air Drag</span>
<p>Air Drag is presented as a force that acts against the car's velocity, and tries to slow it down.
</p>
<p>In V, air drag scales with the square of speed, but fInitialDragCoeff modifies the scaling so air
drag actually scales the way you need it to.</p>
<p>Air Drag can be measured in Gs, which presents how fast you are decelerated at certain speed.</p>
<p>Due to V's vehicle engines outputting "torque" in Gs, both values can be compared easily, which
gives
us more information about the vehicles' performance.
For example, as both the Gs from torque and the Gs from air drag even out, the vehicle stops
accelerating - at that speed, the vehicle can't push through the air anymore. You got your real
top
speed.</p>
<span class="h5">Downforce</span>
<p>This is one of the most arcade systems in V. Downforce translates directly to grip gain on the
wheel,
and can abide to wildly different rulesets depending on your needs.</p>
<p>
The base math goes as follows:<br>
<ul>
<span class="h5">Base</span>
<small class="text-muted">fDownforceModifier set to 1 or less</small>
<li>0.035Gs, double (0.07Gs) if a Spoiler is installed.</li><br>
<span class="h5">Dynamic</span>
<small class="text-muted"> fDownforceModifier between 1.01 and 99.99</small>
<li>0Gs as the car is stopped, which ramps up to 0.035Gs as the car reaches its top speed.
Double
that if a Spoiler is installed.</li>
<li>The value is multiplied by fDownforceModifier, so a modifier of x10 would net you 0.35Gs
gain
per wheel, double that with a Spoiler.</li>
</ul>
<span class="h5">Active Spoilers</span>
<p>Vehicles with active Spoilers ignore fDownforceModifier entirely.<br>There are two types of
active spoilers in V:</p>
<p>Raising type (Like the T20):
<ul>
<li>No gain when the spoiler is down. As the spoiler raises, you get 0.035Gs. When braking,
the
spoiler pitches, and you get 0.07Gs.</li>
</ul>
Dynamic type (Like the X8 Proto):
<ul>
<li>0.035Gs when the spoiler is down. Over certain speed (60mph or so)it raises up to
0.042Gs.
</li>
<li>When cornering or braking, it gets to 0.07Gs.</li>
</p>
</ul>
</p>
</article>
<article>
<p>
<span class="h2">Power</span> <br>
<small class="text-muted">fInitialDriveForce, nInitialDriveGears,
fInitialDriveMaxFlatVel,fClutchChangeRateScaleX</small>
</p>
<hr>
<p>The base power is just a base value on top of which everything else works. Then, gearing
modulates that power simply multiplying it up and down (the ratio), which results in the torque
(also measured in Gs) sent to the wheels.</p>
<p>While the first and last gear's ratios are always the same (3.33 and 0.9) the gears in between
have different ratios depending on how many gears the engine has at its disposal. The more gears
it has, the smoother the torque drops from gear to gear - very few gears will result in an
incredibly high torque drop on the next gear.</p>
<p>Keep in mind the ratios always have to go from 3.33 to 0.9, so the more steps you give them, the
smaller the jump between each gear.</p>
<p>Those gears stretch over the engine's top speed, naturally.</p>
<p>Lastly, while the car is busy switching gears, you have no power. How quick this happens is
defined by fClutchChangeRateScaleX.</p>
</article>
<article>
<p>
<span class="h2">Suspension & Bodyroll</span> <br>
<small class="text-muted">fSuspensionX, fAntiRollBarX</small>
</p>
<hr>
<p>
To be written.
</p>
</article>
<article>
<p>
<span class="h2">Deformation</span> <br>
<small class="text-muted">damageMapScale, damageOffsetScale, fDeformationDamageMult</small>
</p>
<hr>
<p>There are three main players on deformation. </p>
<p>In vehicles.meta:
<li>damageMapScale: How precise the deformation is. Higher - smaller dent radius.</li>
<li>damageOffsetScale: How deep the deformation is. Higher - deeper deformation dents.</li>
</p>
<p>In Handling.meta
<li>fDeformationDamageMult: Scales how much speed affects deformation damage. Higher - higher
deformation damage at the same speed.</li>
</p>
</article>
<article>
<p>
<span class="h2">My Philosophy</span> <br>
</p>
<hr>
<span class="h5">Fun</span>
<p>
If you're not just following IRL stats, specs and quirks (which are fun on their own right if
you achieve them)...
</p>
<p>
To me, a fun handling is a reactive handling. A fun vehicle reacts to the driver and the
terrain. This means vehicles should never fully ignore bumps, slides, jumps, overall rough
driving. Half
the fun in driving is wrestling with the car when pushing it to its limit, or even past it.</p>
<span class="h5">Center of Mass</span>
<p>
Often times, you only need to take care so it sits between the front and rear axles, so the
suspension doesn't lean back or ahead. Then adjust rollcentres until you get the desired base
bodyroll.
</p>
<p>
I personally prefer to get it somewhat right and move it up as much as it makes sense for the
car. This is a bit harder, but pays off when the car ends up tumbling around (This is GTA) and
actually rolls downhill properly. Helps with the personality too.
</p>
<span class="h5">Stability</span>
<p>As hard to work with as it is, vecInertiaMultiplier is very important to make cars heavier or
nimbler, and is responsible for the overall stability of the car. Do try to get it right.</p>
<span class="h5">Grip</span>
<p>Grip numbers are a good base, but vehicle stability is absolutely key to be able to make the
vehicle be able to use that grip. Just adjusting bodyroll, suspension strength and rebound you
can completely change
how much grip the car can actually use. </p>
<span class="h5">Downforce</span>
<p>Downforce is mandatory on almost every vehicle, doesn't matter the type or shape. I would only
avoid downforce in things like a semi</p>
<p>This is because, even at very low levels, downforce can be used</p>
<p>
Dynamic Downforce (>1.0) is great to make cars specialize on high speed cornering.
</p>
<p>Traction loss is more complex than numbers. You can make cars horrible offroading just by making
the suspension stiff or have little travel. fTractionLossMult is not that important.</p>
</article>
</div>
</div>
</section>
</body>