ARMA3における車両作成、改造におけるガイドラインを翻訳しましたので作成等にご利用下さい。
専門用語が有るので、日本語、英語共に不自由な人間が翻訳していると言う事をご理解ください。
文章そのままだと日本語的に理解し辛いので、意訳+注釈です。
※実際にmoddingした訳ではなく、読んで意訳しただけなので、実際の意味と違う可能性が
ありますのでご注意ください。
Contents 1 Intro 2 Additional functionality compared to A2/OA 3 Model requirements {p3d} 4 Model config changes {model.cfg} 5 New config parameters {config.cpp} 5.1 Basic parameters 5.1.1 Differential parameters 5.1.2 Engine parameters 5.2 Wheel parameters 5.2.1 General parameters 5.2.2 Wheel PX parameters 5.2.3 Wheel simulation parameters 5.2.4 Suspension parameters 5.2.5 Tire parameters 5.3 Floating and sinking 5.4 PhysX 3 integration 5.4.1 Anti-roll bars 5.4.2 Complex gearbox 5.4.3 Gearbox parameters 5.4.4 Different amount of torque 5.5 IK for hands and legs 5.6 Picture in Picture for screens and mirrors 5.7 Random visual variants 5.7.1 Random variants script 5.8 Reflectors, markerlights and beacons 5.8.1 Reflectors 5.8.2 Markerlights 5.8.3 Beacons 6 Basic config hints 6.1 Diagnostics 6.2 Suspension 6.3 Gearbox 7 Reference |
Intro
初めに
101 - How to set up a car for Arma 3
ARMA3用の車の作り方
Please be aware of our Arma 3 modding license:
http://community.bistudio.com/wiki/Arma_3_Modding_License
ARAM3用MOD作成に関するライセンス規定を確認してください。
Additional functionality compared to A2/OA
ARAM2、OAとの違い
PhysX 3 integration ○PhysX3と統合
IK for hands/legs ○車両乗車時の手足の位置
Picture in Picture - Render to texture ○PiP テクスチャーのレンダー
Random visual variants (textures, accessories, doors)
○ランダムでビジュアルの変化
※テクスチャー、アクセサリー(バリエーション的なもの)、ドアをスポーン時にランダム表示
Floating and sinking ○水上での浮き沈み
Reflectors, markerlights and beacons ○反射板、マーカーライト、ビーコン
Model requirements {p3d}
p3dモデルに関する必須項目
A new PhysX lod ○新しいPhysX LOD
There needs to be a lod (4e13) consisting of convex components as
simple as possible, some 60 faces shall be sufficient for most cars
作成には単純な構造のものが必要です。ただ、大半は60面程あれば車両を作成するには十分です。
※私の知識不足で、LOD(4e13)がexで40trillionなのか、それ以外の「何か」なのか良く解りません。
Current public Oxygen version doesn't support showing correct name
of this lod and displays only Geometry instead. Don't be afraid of having two
geometries, it's going to be fixed with new tools.
Oxygen(BIツール名)では、このLODの名前を表示できません。代わりにジオメトリだけを示します。(使用に問題なし)この問題は新しいツールで解消する予定です。
Just the main body of car should be in this lod, wheels are added by
engine later
車両の基本部分は、上記のLODで構成される必要があります。 作成する順番はエンジン→ホイールの順に追加していきます。
Memory lod
メモリーLOD
There should be an axis for each wheel named wheel_X_Y_axis (X is
position of wheel from front, Y is 1 for left and 2 for right), the name is
defined in selected wheel as center
ホイールの軸(中心)をwheel_X_Y_axisという名前で定義される必要があります。それぞれ(X,Y)でホイールの中心位置を定義します。
車両の正面から見た状態でホイールの位置をXの部分に記入します。Yは左右同じです(じゃないと傾くので)。
There should be a point at the edge of each wheel named wheel_X_Y_bound
which is used to determine wheel radius (distance from wheel axis is used for
this) - there is no other need than placing the point at the edge, even memory
points for tracks could be used for this, the name is defined in selected wheel
as boundary
ホイール(タイヤ含めた)の大きさを測定するのに必要です。何かというと、ホイール外径の一カ所だけ指定すればwheel_X_Y_axisを中心として円を判定してくれます。
wheel_X_Y_boundのX、Yに何処でも良いので、外径部分の座標を指定します。
※公式の解説画像ではホイールの中心から垂直方向の地面を座標定義してます。
○注釈 ホイールの中心から外輪の距離を定義。
・wheel_X_Y_axis ホイールの中心
・wheel_X_Y_bound ホイールの半径(中心からの距離)
※多分、wheel_X_Y_boundの「X または Y」のどちらかをホイールの半径分入力すれば良いと思います。Yが無難ですが。
Mirrors and screens should have their camera position defined in
pipX_pos and direction in pipX_dir - parameters pointPosition and
pointDirection in class RenderTargets
ミラーとスクリーン(車載モニター)はカメラの位置(pipX_pos)と向き(pipX_dir)で定義する必要があります。
※ミラーは実際に反射しているのではなく、カメラ機能を使って擬似的に「反射してる様に」見えるだけ。なので、「ミラー」を使うと当然、左右反転するようです。
Reflectors should have their position defined in LightCarHeadYXX (Y is
a side - R/L, XX is a number) and direction defined in LightCarHeadYXX_end
反射器は LightCarHeadYXXで定義する必要があります。LightCarHeadYXX_end
でその方向を定義します。Yは左右それぞれの横軸、XXは定義した番号です。
Mirrors and screens should have RTT texture:
#(argb,256,512,1)r2t(rendertargetX,1.0) - where X in rendertarget should be a
number
ミラーとスクリーンはRTTテクスチャを:
#(argb,256,512,1)r2t(rendertargetX,1.0)で指定します。Xは定義した番号を記入します。
Randomly generated accessories should have their selections independent on
all other selections (mainly the main body and all the glass selections), glass
as a part of hide-able accessory should be handled as two separate
selections
ランダムに発生するアクセサリーパーツは全て独立した部品である必要があります。
アクセサリの一部分を隠すように扱うには、2つの部分に分割(離れて)する必要があります。
※ここ良く解りません。すいません。多分ですが、車両にオブジェクトを貼り付ける場合、車体に埋めると内部から見える場合があるので、
はみ出てた部分を隠したいなら部分を別パーツとして定義する必要があるという意味かと思われます。
Beacons and markerlights should have their material set to emit light
ビーコンとマーカーライトは、発光させるために設置しなければなりません。
Spare wheel should have defined selections for it, texture underneath and
correct hitpoints like a normal wheel
スペアホイール(予備タイヤ)に交換できるようにするには定義する必要があります。予備タイヤの耐久性(壊れやすさ)は標準タイヤと同じ数値です。
※交換なので、エンジニアの修理とは別です。
Man-held turrets shouldn't be hidden when destroying them without
destroying the whole vehicle - IK issues would crash the game
ターレット(銃座)の乗員が乗っている状態(と定義して)でターレットを隠すように指定した場合、ゲームがクラッシュします(IK定義の関連)
ただし、車両が「完全に破壊(ドカーンって燃えた)」された状態であれば、問題ありません。
※車両がアライブの状態で「見えないターレット」を定義して使うとクラッシュするという事かと思われます。多分。
Model config changes {model.cfg}
model.cfgの変更点
Only the dampers are affected by the changes, best way to set them is to
place an axis with the length of moveable part alongside the damper and set
offsets to +-0.5
ダンパー(サスペンション)は凹凸路面などの影響を受けて可動します。そのため、定義する際に「ダンパーの中心から±0.5ほどオフセットするといいと思います。
{model.cfg}
class Wheel_1_1_Damper
{
type="translation";
source="damper";
selection="wheel_1_1_damper_land";
axis="posun wheel_1_1";
animPeriod = 1;
minValue="0";
maxValue="1";
offset0= "0.5";
offset1= "-0.5";
memory=1;
};
●●●●●●●●●●●●訳 28/Oct/2013●●●●●●●●●●●●●●●●●●●●
Sections for hiddenSelectios[] should be set in model.cfg
hiddenSelectios[]の部分はmodel.cfgで定義する必要があります。
New config parameters {config.cpp}
config.cppの新しい追加パラメータについて
Basic parameters
基本パラメータ
Following parameters are defined in vehicle class.
vehicle classという定義内で以下のパラメーターを使います。
※config.cppの車両に関する定義部分にviecle classという場所があるので、そのクラスを定義する際に使用するという事。
: string
: (required)
simulation = "carx";
: float
: 0.0
dampersBumpCoef = 0.3;
Differential parameters
他と異なるパラメータ
: string; accepable values: "all_open", "all_limited", "front_open",
"front_limited", "rear_open", "rear_limited"
: "all_limited"
differentialType = "all_limited";
: float
: 0.5
frontRearSplit = 0.5
: float
: 1.3
frontBias = 1.3;
: float
: 1.3
rearBias = 1.3
: float
: 1.3
centreBias = 1.3
: float
: 10.0
clutchStrength = 10.0;
: float
: 0.01
switchTime = 1.01;
Engine parameters
エンジンパラメータ
: float
: (required)
enginePower = 600;
: float
: 600 which is cca 6000 rounds per minute.
maxOmega = 600;
: float
: value calculated from enginePower according to
http://en.wikipedia.org/wiki/Horsepower#Relationship_with_torque
peakTorque = 600;
: float, float, float
: 0.08, 2.0, 0.35
dampingRateFullThrottle = 0.08;
dampingRateZeroThrottleClutchEngaged = 2.0;
dampingRateZeroThrottleClutchDisengaged = 0.35;
: Array[i][2] where i = number of samples, maximum 8;
: {{0.0, 0.8}, {0.33, 1.0}, {1.0, 0.8}}
torqueCurve[] = {{0.0, 0.8}, {0.33, 1.0}, {1.0, 0.8}};
Wheel parameters
ホイールパラメータ
This parameters relates to each wheel. In the vehicle class, there has to be
subclass called Wheels, which contains subclass for every wheel the vehicle
has. These are the parameters that could be defined in that subclasses.
このパラメータはそれぞれのホイールに関する項目です。vehicle classはwheelsというサブ(隷下)クラス(viecle
classがメインクラス)が必要です。
要は、車両に付いている全てのホイール(タイヤ)をサブクラスという定義でそれぞれ設定できるパラメータです。
General parameters
一般的なパラメータ
: string
: ""
boneName = "wheel_1_1";
: bool
: (required)
steering = true;
: string
: "right"
side = "left";
Wheel PX parameters
ホイールPXパラメータ
: memory point
: (required)
center = "wheel_1_1_axis";
: memory point
: (required)
boundary = "wheel_1_1_bound";
: float
: 0.3*(raidus of the wheel)
width = "0.2";
: float
: 10.0
mass = 150;
: float
: 0.5 * WheelMass * WheelRadius * WheelRadius
MOI = 40;
: float
: 0.1
'dampingRate = 0.1;
: float
: 2500
maxBrakeTorque = 7500;
: float
: 2*maxBrakeTorque
maxHandBrakeTorque = 0
Wheel simulation parameters
ホイールシミュレーションパラメータ
: Array[3]
: {0, -1, 0}
suspTravelDirection[] = {0, -1, 0};
: memory point
: center
suspForceAppPointOffset = "wheel_1_1_axis";
: memory point
: suspForceAppPointOffset
tireForceAppPointOffset = "wheel_1_1_axis";
Suspension parameters
サスペンションパラメータ
: float
: 0.15
maxCompression = 0.15;
mMaxDroop = 0.15;
: float
: vehicleMass/numberOfWheels
sprungMass = 2066;
: float
: sprungMass*5,0*5,0
springStrength = 51653;
: float
: 0,4*2*sqrt(springStrength*sprungMass)
springDamperRate = 8264;
Tire parameters
タイヤパラメータ
: float
: 10000
longitudinalStiffnessPerUnitGravity = 10000;
: float, float
: 25, 180
latStiffX = 25;
latStiffY = 180;
: Array[3][2]
: {{0, 1}, {0.5, 1}, {1,1}}
frictionVsSlipGraph[] = {{0, 1}, {0.5, 1}, {1,1}};
Floating and sinking
浮き沈み(水で)
WaterLeakiness should be amount of water in liters that goes into selected
object per second. This is set to zero by engine for all vehicles with
simulation of a ship or having canFloat = 1 (unless they are toppled of
destroyed, then config value takes precedence). WaterLeakiness = 10; seems to
be a good value to start with for all kinds of vehicles no matter the size
(which is a bit spooky, but it works).
浸水具合は指定パーツをℓ/secで定義します。浸水具合によってエンジンが止まります。ただ、船又はcanFloat=1と定義されたものは完全にブッ壊されない限り浮いてます。
最初はWaterLeakiness=10と定義して、どのぐらい水に浸かったらエンジンがブッ壊れるかテストすると良いでしょう。
PhysX 3 integration
PhysX3で統合
WheelMask
ホイールマスク
thrustDelay is time in second in which thrust goes from 0 to 1 when
standing still (doesn't affect driving car during change of gears), 0.2 seems
to be a reasonable value. You may want to tweak this to higher values if wheels
slide during initial acceleration.
キー入力をしてから実際に車輪が動作するまでの遅延をthrustDelayで定義します。スラストが0→1になるまでの数値です。0.2位が妥当と思われます。もし1にしたら一瞬で加速します。
brakeIdleSpeed is speed in m/s under which the brakes are automatically
applied to the vehicle. This speed should be reasonably low, higher value would
mean strange breaking of slow cars, too low value would cause inability to stop
the car.
1秒当たりのブレーキの定義です。
brakeIdleSpeedはm/secで定義します。この数値は低めに設定した方が良いです。高めに設定すると不自然な急ブレーキになります。
逆に異常に低すぎると止まれません。
idleRpm sets the idle RPM of engine. Primary use is for sound engine
アイドリング時の回転数をidleRpmで定義します。停車時のエンジン音に関係します。
redRpm sets the maximum for engine RPM, should be according to maxOmega
(see later)
エンジンの最高回転数(レブリミット)をredRpmで定義します。後記のmaxOmegaに関係しています。
Anti-roll bars
アンチロールバー
Anti-roll bars is the system in vehicle that should prevent it to do a
barrel-roll during sharper turns. Using ARB enables us to make center of mass
realistically high and cause cars to roll down the steep slopes if placed
sideways to the slope. It works the same way as the real ones - system computes
difference of applied weight to wheels in pair and tries to compensate
difference by applying opposite forces.
アンチロールバーは急激なターンとか無茶な運転等で横転するのを防ぎます。錘みたいな物です。なので、横転しやすい車両も作れます。以下がそのパラメータ。
antiRollbarForceCoef is a coefficient of applied force, could be taken as
strength of the system. Setting this value to zero disables ARB (and all next
values), which is good for civilian vehicles, higher values reduce not only the
risk of rolling, but effects of suspension.
この数字を0にすると動かなくなります。逆にantiRollbarForceCoefの数字を高くすると横転しやすいどころか止まれません。
antiRollbarForceLimit is the highest strength of ARB applied to vehicle. We
may want to roll the car at certain situations (full van taking sharp
hand-brake turn at high speed), tunning without diag mode is almost impossible
because we are not able to imagine forces needed (values are rather low, 2
should be high enough for most of vehicles)
高速移動中に急ハンドルで横転させたいとか、そういう時に必要になります。
antiRollbarSpeedMin and antiRollbarSpeedMax are limits of applied force
coefficient. Coefficient is 0 at speeds lower than antiRollbarSpeedMin,
interpolates to antiRollbarForceCoef at antiRollbarSpeedMax and is set to
antiRollbarForceCoef for any higher speeds. This allows cars to drive on steep
slopes using their radial speed, falling of the hill once they stop and rolling
over at too high speeds (where coefficient doesn't grow and force is limited by
the limit).
antiRollbarForceCoefの上下限をantiRollbarSpeedMinとantiRollbarSpeedMaxで定義します。
Complex gearbox
複雑なギアボックス
All PhysX 3 vehicles use complex gearbox to give some data to PhysX
gearbox
PhysX3の車両は全部ギアボックスが搭載されてます。
Complex gearbox settings is inside class complexGearbox which is a subclass
of vehicle class
ギアボックスのセッティングはcomplexGearboxというサブクラスで、viecle classの隷下です。
GearboxRatios[] is an array of gear names and gear ratios starting with
reverse gear (with negative ratios), neutral gear (which should have zero
ratio) and forward ratio (eg:
{"R1",-3.231,"N",0,"D1",2.462,"D2",1.870,"D3",1.241,"D4",0.970,"D5",0.711};).
Gear names are not used in retail version, they are just for epevehicle
diagnostics
R1がバックで、Nニュートラル(数字入れたら勝手に前進します)、D1、D2・・・となります。GearboxRatios[]で定義すれば何ギアでも可能ですがギア比が訳解らなくなるので程々に。
TransmissionRatios[] is an array of transmission ratios in the same format
as gearboxRatios. Most of cars have only one transmission ratio, some heavy
trucks may have two. The final ratio of engine is gearboxRatio *
TransmissionRatio, that means transmissionRatios shouldn't be multiplicates of
each other and gearbox ratios to prevent the same final ratio for two different
gears.
普通は1つ定義すれば良いですが、大型トラックは2つ定義が必要でしょう。
※良く解らん・・・・
gearBoxMode is set to full-auto by engine
gearBoxModeはエンジンによってフルオートでセットされます(・・は? イミフ)
moveOffGear defines what gear an automatic or semi-automatic gearbox
will move off from stationary in. 1 by default.
この定義(moveOffGear)はオートマもしくはセミオートでギアボックスが静止状態から発車します。(動作にギア操作を入れるかどうか)標準(普段通りの操作)は1です。
driveString, neutralString and reverseString define displayed strings for
driving forward, neutral and backward.
この3つ(driveString, neutralString,
reverseString)は前進、キー無操作、後進を表示させるために定義を紐づけします。
※これを入れればギアがドライブ(D)、ニュートラル(N)、バック(R)のどの状態かHUDに表示されるようです。
--------------------------------------------------------
{config.cpp}
class complexGearbox
{
GearboxRatios[] =
{"R1",-3.231,"N",0,"D1",2.462,"D2",1.870,"D3",1.241,"D4",0.970,"D5",0.711};
TransmissionRatios[] = {"High",4.111}; // Optional: defines
transmission ratios (for example, High and Low range as commonly found in
offroad vehicles)
moveOffGear = 1; // defines what gear an automatic or
semi-automatic gearbox will move off from stationary in. 1 by default.
driveString = "D"; // string to display in the HUD for
forward gears.
neutralString = "N"; // string to display in the HUD for
neutral gear.
reverseString = "R"; // string to display in the HUD for
reverse gears.
};
--------------------------------------------------------
Gearbox parameters
ギアボックスパラメータ
Some gearbox parameters are defined outside of class complexGearbox, they
are mainly to setup automatic gearbox
幾つかのギアボックスパラメータはcomplexGearboxのクラス外で定義します。サブクラスでは有りません。
通常、オートマ用のギアボックスに使用します。
{config.cpp}
class RenderTargets
{
class LeftMirror
{
renderTarget = "rendertarget0";
class CameraView1
{
pointPosition = "PIP0_pos";
pointDirection = "PIP0_dir";
renderQuality = 2;
renderVisionMode = 0;
fov = 0.7;
};
};
};
{config.cpp}
init event handler should be changed to something like this:init="(_this select 0) execVM ""\pathToCar\scripts\scriptName.sqf""";
{config.cpp}
killed = "_this call (uinamespace getvariable 'BIS_fnc_effectKilled'); _this select 0 animate [""RandomAnimation"",0];
{script.sqf}
if (isLocal) then {_rnd1 = floor random Y; _this setVariable ["BIS_randomSeed1", _rnd1, TRUE]; _this animate ["RandomAnimation", X];};
{script.sqf}
waitUntil {!(isNil {_this getVariable "BIS_randomSeed1"})};
_randomSeed1 = _this getVariable "BIS_randomSeed1";
{script.sqf}
_this setObjectTexture [0, ["\pathToCar\Data\variant_1_co.paa", ...,"\\pathToCar\Data\variant_Y_co.paa"] select _randomSeed1];
{config.cpp}
class UserActions: UserActions
{
class beacons_start
{
userActionID = 50;
displayName = "Beacons start";
displayNameDefault = "";
position = "mph_axis";
radius = 1.8;
animPeriod = 2;
onlyForplayer = false;
condition = "this animationPhase ""BeaconsStart"" < 0.5 AND Alive(this) AND driver this == player";
statement = "this animate [""BeaconsStart"",1];";
};
class beacons_stop: beacons_start
{
userActionID = 51;
displayName = "Beacons stop";
condition = "this animationPhase ""BeaconsStart"" > 0.5 AND Alive(this) AND driver this == player";
statement = "this animate [""BeaconsStart"",0];";
};
};
This page is discussedon the BI forums