Posted: 25 Apr 2014, 20:54
First of all, great thanks to Nyx100 (at RVZ) who actually discovered the possibility of making things truly fly and made Cop-ter. I only dissected that vehicle to see why it works and what else could be made of it
...
And sorry, guys, nothing perfect can be made of it. Thing are so-so possible, but not perfectly. I wanted to make the Cop-ter lean in curves, and it cannot happen. I wanted to make bikes lean with working weapons, and it is imperfect as well (mind you, the bikes are sort-of possible, but not perfectly). Read more at the end of this post if you want – the Deep Technical notes are there (they also explain why Cop-ter works).
Also, there are some links to examples at the end.
But now, on to the meat of this tutorial: how to make anything fly like Cop-ter does, i.e. actually lift off in turns and truly fly in Re-Volt, in 10 easy steps. Buy the DVD now (ahem, I got carried away, sorry... )
This requires some calculations, therefore I present you another spreadsheet to make this easier: input some values from your original vehicle and automagically get the values needed to make it fly.
The spreadsheet is in xls (MS Office / Google Docs) and odt (Open Office) format.
The 10 Easy Steps:
1) Select the vehicle so that its shape is a bit round at the bottom, to slide better. Kikizana’s Blue Falcon (link below) is actually a bad example of this – it’s totally flat and thus shakes somewhat when scraping along the ground before lift-off.
2) Use “Class 2” and “;)Flying TRUE”. Please use both, so the vehicle will fly both in WolfR4 and in V1.2.
Note: in WolfR4, the option “Allow special effects for user cars” should be checked.
3) Flying uses hard-coded UFO DownForceMod, so you will need to reduce the vehicle’s Mass, generally to be in the range of 0.3 to 0.6.
Note: find what you feel comfortable with. Mass 0.3 stays in air almost too easily, but you’ll have to wait to drop down in front of low overheads. 0.5 is more of a challenge to keep in air, but you don’t have to stop completely to drop lower.
4) Different Mass needs different Inertias, so here is your first need for the spreadsheet. Flying Inertias are calculated according to flying Mass, but multiplied: X Inertia by 10, Z Inertia by 2 and Fly Inetia by 2. The spreadsheet linked above calculates this automatically for you.
Note: Flying Inertias need to be proportional to your vehicle’s original Inertias, because the originals (and thus the original handling) are usually different from the Inertia formula’s results. Again, the spreadsheet takes care of this, after you input the original Inertias.
5) EngineRatio can remain as-is, because true-flying uses hard-coded UFO EngineRatio.
6) Keep the wheels (WolfR4 needs them to exist), but make them invisible (“ModelNum -1”) and raise them up from the ground (inside body, so the vehicle lies with belly on the ground), otherwise the wheels will snag during ground-runs.
7) CoM (Centre of Mass) may need raising, because the body lies flat on ground e.g. is lower and the CoM may go below ground.
Note: CoM has to be above ground, for in-air turning and working weapons. Just adjust the AngRes parameter then, because turning speed also changes with CoM height.
8) AngRes must also be calculated proportional to flying Mass, otherwise the vehicle will spin like crazy. Like all calculations, use the spreadsheet.
9) Resistance (air resistance) must be made higher, to keep the same top speed (it’s mega-fast initially). Adjust this by hand, because I haven’t had the flash of inspiration yet for the correct formula
Note: in-air speed and ground speed will differ somewhat, because ground friction applies on ground-runs
10) ResMod needs to be 25, to be stable in air.
There are also two reference values (marked “ref” in the spreadsheet) that can be changed for different overall effects and handling.
• You can play around with ref_inertia (700) for different inertia feel. For example, 2100 (i.e. 3 x 700) gives RL inertias and 400 (almost halved) gives Hot Wheels like inertia.
• You can also play around with Lift_inertia_coeff (0.85) which is the ratio from Z Inertia to Fly Inertia. It affects the rolling intensity and thus the lifting behaviour.
And now the Deep Technical notes, for those interested in “why’s” and “how’s”.
Re-Volt uses a quaternion matrix for Inertia. That’s why it has nine values. Wikipedia explains quaternions better than I ever could, and deeper than even I want to go, so I’ll only explain the simplified situation apparent in Re-Volt.
The source code bits (found via Internet) show that Re-Volt uses the matrix internally like this:
XX / XY / XZ
YX / YY / YZ
ZX / ZY / ZZ
and translates it into rotation axes like this:
XfromX / XfromY / XfromZ
YfromX / YfromY / YfromZ
ZfromX / ZfromY / ZfromZ
where e.g. ZfromY means that movement around Y (turning) axis causes simultaneous movement around Z axis (rolling), with the intensity depending on the value in that spot and the direction depending on the direction of Y axis movement (which can be globally reversed with a negative value there).
This is why Cop-ter lifts off in turns: it’s like in the old game Elite – apparent pitch (nose lift) comes simply from rolling (leaning outwards) and then slicing diagonally up with yaw (turn).
And as you can see, only two axes ever interact with each other. This is why Cop-ter (and other, future true-fliers) cannot lean inwards in curves and why the only usable value is ZfromY.
• A value in any the six spots outside the diagonal means that you have two opposite results for two opposite causes: XfromY means that left turns cause nose to pitch up and right turns cause it to pitch down (or vice versa, depending on the value’s +/– sign). So even a combination of ZfromY (lean inwards from turning) and XfromY (push nose up from turning) works in only one direction of curves. Turning to the other side pushes the nose down. (The diagonal is exceptional, because it essentially has the relevant axis influencing only itself, so no side effects occur.)
• The only reason why ZfromY even works is that its opposite reaction to turning (Y) is symmetrical to the vehicle’s turning direction – lean _relatively_ outwards, while its _absolute_ reaction is still two opposites, either clockwise or counter-clockwise roll.
• And even any attempt at indirect cause-and-effect of, say, XfromZ also cannot help because it is still two opposite reactions – pitch nose up with clockwise roll (when leaning to one side) and pitch nose down in counter-clockwise roll (when leaning to the other side).
Now, I said above that nothing perfect can be made of the Inertia matrix, but you may think (like I initially did) that a negative value in ZfromY spot still makes e.g. bikes lean towards inside in curves, while having CoM above ground. Hey, rockets would work with leaning, right? Right?!
...
Yes, rockets would work with leaning, but with several limitations.
1) CoM still needs to be below the mounting points of wheels (centre points of wheels), so that the bike actually straightens up. Otherwise it will just fall to its side. Depending on the wheel size, this may be pretty low, too near the ground for rockets to work.
2) The ZfromY effect (and other side effects) of the Inertia matrix depend also on travelling direction – a weapons-leaning bike would lean outside when reversing.
3) The most unexpected (for me, at least) and at the same time the most wonderfully realistic (eh ) limitation comes from the physics of Re-Volt. Make a bike weapons-lean and you’ll see that it leans _less_ in speedy curves. In extreme cases it may even still fall over towards outside. Why? Centrifugal force applies, dragging the CoM outwards above the wheels-to-ground contact points, while poor ZfromY Inertia tries to roll (lean) the bike inwards in the curve. With real bikes, you shift your weight to lean more in high-speed curves. In Re-Volt you cannot shift the weight. The correctly proportional leaning action of underground-CoM bikes comes from the same centrifugal force, it’s just that the bike is then a reverse pendulum balancing on its wheels, its top part leaning to the opposite of where the underground CoM is pulled in curves.
So – sorry, no perfect weapons-lean, perfect is still fundamentally impossible in Re-Volt.
And to conclude the tutorial, here are links to two examples of true-flying vehicles:
Nyx100’s Cop-ter at RVZ, the first ever true-flying vehicle in Re-Volt,
and Fly Blue Falcon, based on Kikizana’s Blue Falcon.
Well, if you want, you can also try these two aboveground-CoM leaning bikes, but they are not perfect, for reasons mentioned above:
Weapons-lean Yamaha YZR 500 (original bike was by UrbanRocker),
And just for fun: Wheelie bike Yamaha YZR 500 (again, original bike was by UrbanRocker).
Btw, with the Wheelie bike I had to mess with ordinary Inertias and wheel frictions to make it steer again – a wheelie bike has too little force on front wheel. Do Not Throttle In Curves. (And the steering is still messy, I didn’t have time to perfect it, so maybe someone else can do it if they want.)
Thanks for reading, and happy parametering!
...
And sorry, guys, nothing perfect can be made of it. Thing are so-so possible, but not perfectly. I wanted to make the Cop-ter lean in curves, and it cannot happen. I wanted to make bikes lean with working weapons, and it is imperfect as well (mind you, the bikes are sort-of possible, but not perfectly). Read more at the end of this post if you want – the Deep Technical notes are there (they also explain why Cop-ter works).
Also, there are some links to examples at the end.
But now, on to the meat of this tutorial: how to make anything fly like Cop-ter does, i.e. actually lift off in turns and truly fly in Re-Volt, in 10 easy steps. Buy the DVD now (ahem, I got carried away, sorry... )
This requires some calculations, therefore I present you another spreadsheet to make this easier: input some values from your original vehicle and automagically get the values needed to make it fly.
The spreadsheet is in xls (MS Office / Google Docs) and odt (Open Office) format.
The 10 Easy Steps:
1) Select the vehicle so that its shape is a bit round at the bottom, to slide better. Kikizana’s Blue Falcon (link below) is actually a bad example of this – it’s totally flat and thus shakes somewhat when scraping along the ground before lift-off.
2) Use “Class 2” and “;)Flying TRUE”. Please use both, so the vehicle will fly both in WolfR4 and in V1.2.
Note: in WolfR4, the option “Allow special effects for user cars” should be checked.
3) Flying uses hard-coded UFO DownForceMod, so you will need to reduce the vehicle’s Mass, generally to be in the range of 0.3 to 0.6.
Note: find what you feel comfortable with. Mass 0.3 stays in air almost too easily, but you’ll have to wait to drop down in front of low overheads. 0.5 is more of a challenge to keep in air, but you don’t have to stop completely to drop lower.
4) Different Mass needs different Inertias, so here is your first need for the spreadsheet. Flying Inertias are calculated according to flying Mass, but multiplied: X Inertia by 10, Z Inertia by 2 and Fly Inetia by 2. The spreadsheet linked above calculates this automatically for you.
Note: Flying Inertias need to be proportional to your vehicle’s original Inertias, because the originals (and thus the original handling) are usually different from the Inertia formula’s results. Again, the spreadsheet takes care of this, after you input the original Inertias.
5) EngineRatio can remain as-is, because true-flying uses hard-coded UFO EngineRatio.
6) Keep the wheels (WolfR4 needs them to exist), but make them invisible (“ModelNum -1”) and raise them up from the ground (inside body, so the vehicle lies with belly on the ground), otherwise the wheels will snag during ground-runs.
7) CoM (Centre of Mass) may need raising, because the body lies flat on ground e.g. is lower and the CoM may go below ground.
Note: CoM has to be above ground, for in-air turning and working weapons. Just adjust the AngRes parameter then, because turning speed also changes with CoM height.
8) AngRes must also be calculated proportional to flying Mass, otherwise the vehicle will spin like crazy. Like all calculations, use the spreadsheet.
9) Resistance (air resistance) must be made higher, to keep the same top speed (it’s mega-fast initially). Adjust this by hand, because I haven’t had the flash of inspiration yet for the correct formula
Note: in-air speed and ground speed will differ somewhat, because ground friction applies on ground-runs
10) ResMod needs to be 25, to be stable in air.
There are also two reference values (marked “ref” in the spreadsheet) that can be changed for different overall effects and handling.
• You can play around with ref_inertia (700) for different inertia feel. For example, 2100 (i.e. 3 x 700) gives RL inertias and 400 (almost halved) gives Hot Wheels like inertia.
• You can also play around with Lift_inertia_coeff (0.85) which is the ratio from Z Inertia to Fly Inertia. It affects the rolling intensity and thus the lifting behaviour.
And now the Deep Technical notes, for those interested in “why’s” and “how’s”.
Re-Volt uses a quaternion matrix for Inertia. That’s why it has nine values. Wikipedia explains quaternions better than I ever could, and deeper than even I want to go, so I’ll only explain the simplified situation apparent in Re-Volt.
The source code bits (found via Internet) show that Re-Volt uses the matrix internally like this:
XX / XY / XZ
YX / YY / YZ
ZX / ZY / ZZ
and translates it into rotation axes like this:
XfromX / XfromY / XfromZ
YfromX / YfromY / YfromZ
ZfromX / ZfromY / ZfromZ
where e.g. ZfromY means that movement around Y (turning) axis causes simultaneous movement around Z axis (rolling), with the intensity depending on the value in that spot and the direction depending on the direction of Y axis movement (which can be globally reversed with a negative value there).
This is why Cop-ter lifts off in turns: it’s like in the old game Elite – apparent pitch (nose lift) comes simply from rolling (leaning outwards) and then slicing diagonally up with yaw (turn).
And as you can see, only two axes ever interact with each other. This is why Cop-ter (and other, future true-fliers) cannot lean inwards in curves and why the only usable value is ZfromY.
• A value in any the six spots outside the diagonal means that you have two opposite results for two opposite causes: XfromY means that left turns cause nose to pitch up and right turns cause it to pitch down (or vice versa, depending on the value’s +/– sign). So even a combination of ZfromY (lean inwards from turning) and XfromY (push nose up from turning) works in only one direction of curves. Turning to the other side pushes the nose down. (The diagonal is exceptional, because it essentially has the relevant axis influencing only itself, so no side effects occur.)
• The only reason why ZfromY even works is that its opposite reaction to turning (Y) is symmetrical to the vehicle’s turning direction – lean _relatively_ outwards, while its _absolute_ reaction is still two opposites, either clockwise or counter-clockwise roll.
• And even any attempt at indirect cause-and-effect of, say, XfromZ also cannot help because it is still two opposite reactions – pitch nose up with clockwise roll (when leaning to one side) and pitch nose down in counter-clockwise roll (when leaning to the other side).
Now, I said above that nothing perfect can be made of the Inertia matrix, but you may think (like I initially did) that a negative value in ZfromY spot still makes e.g. bikes lean towards inside in curves, while having CoM above ground. Hey, rockets would work with leaning, right? Right?!
...
Yes, rockets would work with leaning, but with several limitations.
1) CoM still needs to be below the mounting points of wheels (centre points of wheels), so that the bike actually straightens up. Otherwise it will just fall to its side. Depending on the wheel size, this may be pretty low, too near the ground for rockets to work.
2) The ZfromY effect (and other side effects) of the Inertia matrix depend also on travelling direction – a weapons-leaning bike would lean outside when reversing.
3) The most unexpected (for me, at least) and at the same time the most wonderfully realistic (eh ) limitation comes from the physics of Re-Volt. Make a bike weapons-lean and you’ll see that it leans _less_ in speedy curves. In extreme cases it may even still fall over towards outside. Why? Centrifugal force applies, dragging the CoM outwards above the wheels-to-ground contact points, while poor ZfromY Inertia tries to roll (lean) the bike inwards in the curve. With real bikes, you shift your weight to lean more in high-speed curves. In Re-Volt you cannot shift the weight. The correctly proportional leaning action of underground-CoM bikes comes from the same centrifugal force, it’s just that the bike is then a reverse pendulum balancing on its wheels, its top part leaning to the opposite of where the underground CoM is pulled in curves.
So – sorry, no perfect weapons-lean, perfect is still fundamentally impossible in Re-Volt.
And to conclude the tutorial, here are links to two examples of true-flying vehicles:
Nyx100’s Cop-ter at RVZ, the first ever true-flying vehicle in Re-Volt,
and Fly Blue Falcon, based on Kikizana’s Blue Falcon.
Well, if you want, you can also try these two aboveground-CoM leaning bikes, but they are not perfect, for reasons mentioned above:
Weapons-lean Yamaha YZR 500 (original bike was by UrbanRocker),
And just for fun: Wheelie bike Yamaha YZR 500 (again, original bike was by UrbanRocker).
Btw, with the Wheelie bike I had to mess with ordinary Inertias and wheel frictions to make it steer again – a wheelie bike has too little force on front wheel. Do Not Throttle In Curves. (And the steering is still messy, I didn’t have time to perfect it, so maybe someone else can do it if they want.)
Thanks for reading, and happy parametering!