0このページについて
0About this page
このマニュアルが扱うのは車の「見た目」だけです。Blender でメッシュを作り、書き出し、ゲームの中で自分の車として表示させるところまでを通しで説明します。
This manual covers the look of the car and nothing else: building a mesh in Blender, exporting it, and getting it to show up in game as your own vehicle.
加速や曲がりかたを決める諸元(走り)は扱いません。そちらは examples/carpack/README-ja.md(カーパックの作り方)にあります。見た目と諸元はファイルの置き場所からして別で、混ぜてはいけない決まりになっています(9 章)。
It does not cover the specs that decide how the car accelerates and corners — those live in examples/carpack/README.md (how to build a car pack). Looks and specs are kept in separate folders on purpose, and mixing them is not allowed (chapter 9).
要るもの
What you need
| Blender | 5.2.0 以降を想定。それより前の版でも通るはずです(書き出し画面の項目名が少し違うことがあります)。無料。blender.org |
|---|---|
| テキストエディタ | JSON を 1 つ書きます。メモ帳でも構いません |
| Minecraft | KurumaMod が入っていること。確認しながら作ります |
| 絵を描くもの | テクスチャを貼りたい場合のみ。貼らなくても走ります |
| Blender | Written against 5.2.0. Earlier versions should work too — a few labels in the export dialog differ. Free, from blender.org |
|---|---|
| Text editor | You will write one JSON file. Notepad is fine |
| Minecraft | With KurumaMod installed. You will check your work as you go |
| Paint program | Only if you want a texture. The car drives without one |
できるようになること
What you will end up with
- 自作の車体とホイールで走る
- ヘッドライト・テールランプ・バックランプが点く
- 窓が透ける
- ミラーに後ろの景色が実際に映る
- Your own body and wheels, driving
- Headlights, tail lights and reverse lights that come on
- Windows you can see through
- Mirrors that genuinely reflect what is behind you
寸法をぴったり合わせる必要はありません。「このメッシュは何 m で作ってある」と JSON に書けば、ゲーム側がその比で自動的に拡大・縮小します。5.2m で作ってしまった車も、そう書けば正しい大きさで走ります。
作り直しのたびに Minecraft を再起動する必要もありません。ゲーム内で F3+T を押せばモデルもテクスチャも読み直されます。
You do not have to hit exact dimensions. Write "this mesh was built at N metres" in the JSON and the game scales it by that ratio. A car you accidentally built 5.2 m long will drive at the right size once you say so.
You do not have to restart Minecraft after every edit. Press F3+T in game and the model and texture are reloaded.
1全体像
1The whole picture
やることは 5 つです。ここから先の章は、この 5 つを順に開いたものです。
There are five steps. Every chapter from here on is one of them, opened up.
③〜⑤ は 1 分もかかりません。時間を使うのはほとんど ① です。だからこそ、はじめのうちは粗い箱のような車で ①→⑤ を一周してしまうことを勧めます。置き場所と JSON の書き方さえ通ってしまえば、あとは Blender の中の作業に集中できます。
Steps 3 to 5 take under a minute. Almost all of the time goes into step 1. Which is exactly why you should push a crude box of a car all the way through 1→5 first. Once the folders and the JSON are working, everything after that is just Blender.
2Blender はこれだけ覚える
2Just enough Blender
Blender を触ったことがない人向けです。使える人は 3 章へ。
For readers who have never opened Blender. If you know it already, skip to chapter 3.
画面の 3 か所
Three places on screen
- 3D ビューポート … 真ん中の広いところ。ここに車を作ります
- アウトライナー … 右上の一覧。オブジェクトの名前はここで変えます(ダブルクリック)
- 上のタブ …
LayoutやScriptingの並び。ゲージを置くときScriptingを使います
- 3D viewport — the big area in the middle. This is where you build the car
- Outliner — the list at the top right. This is where you rename objects (double-click)
- Tabs along the top —
Layout,Scriptingand so on. You will needScriptingto place the gauge
オブジェクトと、その名前
Objects, and their names
Blender では、車体・ボンネット・窓のように分けたかたまり 1 つ 1 つをオブジェクトと呼びます。
In Blender each separate lump — body, bonnet, window — is an object.
オブジェクトの名前が、ゲーム内での機能を決めます。light_head という名前を付けたオブジェクトはヘッドライトとして点灯し、glass で始まる名前は透けます。名前は飾りではなく設定そのものです(5 章)。
An object's name decides what it does in game. An object called light_head lights up as a headlight; anything starting with glass becomes see-through. Names are not decoration here, they are the configuration (chapter 5).
ワールド原点(0, 0, 0)
The world origin (0, 0, 0)
3D ビューポートの真ん中、赤い線と緑の線が交わっているところがワールド原点です。ゲーム側はここを基準に車を置きます。
Where the red and green lines cross in the middle of the viewport is the world origin. The game positions your car relative to this point.
オブジェクトを選ぶと出てくるオレンジ色の点(オブジェクト原点)は関係ありません。書き出されるのは各頂点のワールド座標なので、合わせるのはワールド原点だけです。オレンジの点がどこにあっても構いません。
The orange dot that appears when you select an object — the object origin — does not matter. The exporter writes world coordinates, so the only thing to line up is the world origin. The orange dot can sit anywhere.
単位と向き
Units and orientation
- 単位はメートル。既定のままで、床のマス目 1 つが 1m です
- 前は −Y、上は +Z。テンキーの 1 を押すと「車を正面から見た」向きになります
- 結果として +X が車の左側になります
- Units are metres. Leave the default; one floor square is 1 m
- Front is −Y, up is +Z. Numpad 1 gives you the view from directly in front of the car
- Which means +X is the car's left-hand side
モディファイア(ミラー)
The mirror modifier
車は左右対称なので、半分だけ作ってミラーモディファイアで反対側を作るのが普通です。書き出しのときに自動で適用されるので、「適用」を押しておく必要はありません(ただし鏡としてのミラーだけは例外)。
Cars are symmetric, so the usual approach is to model half of it and let the mirror modifier make the other half. The exporter applies modifiers for you, so you do not need to hit "Apply" (with one exception: actual rear-view mirrors).
Scripting タブ
The Scripting tab
次の章でゲージを置くのに一度だけ使います。手順は「上部の Scripting タブ → 新規 → 貼り付け → Alt+P(または ▶ 実行)」だけです。
You need it once, in the next chapter, to place the gauge: Scripting tab at the top → New → paste → Alt+P (or the ▶ Run button).
3ゲージを置く
3Drop in the gauge
いきなり車を作り始める前に、基準となる枠(ゲージ)を置きます。タイヤ 4 つと地面とシャシー基準面がワイヤーフレームで現れるので、これに合わせて車体を作れば、あとで JSON の数字をいじる必要がなくなります。
Before modelling anything, place the reference frame — the gauge. Four wheels, the ground and the chassis plane appear as wireframes. Build to those and you will not have to touch the numbers in the JSON at all.
手順
Steps
- Blender 上部の
Scriptingタブを開く 新規(New)を押すtools/blender_gauge.pyの中身を全部コピーして貼り付ける- ▶ 実行(Alt+P)
- Open the
Scriptingtab at the top of Blender - Press
New - Copy the whole of
tools/blender_gauge.pyand paste it in - Run it (▶ or Alt+P)
Scripting タブ(左上)を開き、New を押してから貼り付けますScripting tab (top left), press New, then paste.何度実行しても構いません(前に置いたゲージは消してから置き直されます)。ゲージは掴めないようにしてあるので、作業中に間違って動かすことはありません。
Run it as often as you like — it clears the previous gauge before placing a new one. The gauge objects are not selectable, so you cannot nudge them by accident while working.
置かれるもの
What it places
| 名前 | 意味 |
|---|---|
gauge_wheel_FL ほか 4 つ | タイヤの位置と大きさ。ここにフェンダー(タイヤハウス)が来るように車体を作ります |
gauge_ground | 地面(Z = 0)。ワールド原点はここの高さ |
gauge_chassis_plane | シャシー基準面(Z = 0.602m)。ゲーム内で車の「位置」が来る高さ。4 隅がちょうど車軸の真上にある長方形 |
| Name | What it is |
|---|---|
gauge_wheel_FL and 3 more | Where the wheels sit and how big they are. Cut your wheel arches to these |
gauge_ground | The ground (Z = 0). The world origin sits at this height |
gauge_chassis_plane | The chassis plane (Z = 0.602 m) — the height the game treats as the car's position. Its four corners sit directly above the axles |
既定の車格
Default proportions
| ホイールベース | 3.12 m(前後輪の距離) |
|---|---|
| トレッド | 1.80 m(左右輪の距離) |
| タイヤ半径 | 0.45 m(直径 90cm) |
| シャシー基準面 | 0.602 m |
| Wheelbase | 3.12 m (front axle to rear axle) |
|---|---|
| Track | 1.80 m (left wheel to right wheel) |
| Wheel radius | 0.45 m (90 cm diameter) |
| Chassis plane | 0.602 m |
スクリプト先頭の SCALE = 1.2 がこの車格を作っています。実車より 2 割大きいのは、Minecraft のプレイヤーがずんぐりしているので実寸どおりだと車が小さく見えるためです。1.0 にすれば実車相当になりますが、そのときはゲーム側の諸元(ホイールベース・トレッド・タイヤ半径)も揃えないとタイヤだけが元の位置に出ます。はじめのうちは触らないでください。
SCALE = 1.2 at the top of the script is what produces these numbers. They are 20% larger than a real car because Minecraft players are stocky, and a true-to-life car looks small next to them. Set it to 1.0 for real-world proportions — but then you must also match the game-side specs (wheelbase, track, wheel radius), or the wheels will still appear at the old positions. Leave it alone for your first car.
ゲージにぴったり合わせて作れば、9 章の JSON は designWheelBase / designWheelRadius / designRideHeight をすべて既定のままにできます。合わせられなくても、実際に作った寸法をそこに書けば済みます。どちらでも動きます。
Build exactly to the gauge and you can leave designWheelBase, designWheelRadius and designRideHeight at their defaults in chapter 9. If you cannot, just write down the sizes you actually used. Either way it works.
タイヤは車体とは別ファイルで作るので、専用のゲージ(tools/blender_wheel_gauge.py)が別にあります。6 章で使います。
Wheels are built in a separate file, so they have their own gauge: tools/blender_wheel_gauge.py. You will use it in chapter 6.
4車体を作る
4Build the body
守るのは原点の位置と向きだけです。大きさや形に決まりはありません。
The only rules are where the origin is and which way the car faces. Size and shape are up to you.
原点の 3 条件
The three conditions
| 高さ | 地面(Z = 0)。車体の底ではありません |
|---|---|
| 前後 | 前輪と後輪のちょうど中間。車の全長の中心とは限りません |
| 左右 | 中央 |
| Height | Ground level (Z = 0) — not the underside of the body |
|---|---|
| Front–rear | Exactly halfway between the axles — not necessarily the middle of the car's overall length |
| Left–right | On the centreline |
ずれていたら、車体を全部選んで G で動かすだけで直ります(ゲージは掴めないので巻き込まれません)。
If it is off, select the whole body and move it with G. The gauge cannot be selected, so it will not come along.
形を作るときに気にすること
While you model
- フェンダーはゲージのタイヤに合わせて切る。ここが合っていないと、走ったときにタイヤがボディを突き抜けます
- 大きさは自由。全長・全幅・全高に決まりはありません。ゲージのタイヤさえ収まっていれば、あとは好みです
- 内装は作らなくてよい。車体の裏面がそのまま見えるので、いまはそれを内装として使っています
- ポリゴン数は気にしなくてよい。目安として、同梱の車体は 671 面、タイヤは 344 面です
- 左右対称ならミラーモディファイアで半分だけ作れば済みます
- Cut the wheel arches to the gauge wheels. Get this wrong and the tyres will clip through the bodywork once it drives
- Size is free. There is no rule about length, width or height. As long as the gauge wheels fit inside the arches, the rest is taste
- You do not need an interior. The back faces of the body show through, and that is what currently serves as the cabin
- Do not worry about polygon count. For reference, the bundled body is 671 faces and the wheel is 344
- If it is symmetric, model half and let the mirror modifier do the rest
オブジェクトを分ける/分けない
Splitting into objects
ボンネット・バンパー・トランクのように分けても分けなくても構いません。同梱の車体は body / hood / trunk / bumper_f / bumper_r に分かれていますが、これは作業しやすさのためで、ゲーム側は区別していません。
Bonnet, bumpers, boot — split them or don't, it makes no difference. The bundled body happens to be body / hood / trunk / bumper_f / bumper_r, purely for convenience while modelling. The game does not distinguish between them.
ただし次の章の名前だけは別です。これらは名前で機能が決まるので、必ず独立したオブジェクトにします。
The names in the next chapter are the exception. Those carry meaning, so each one has to be its own object.
5名前で決まる機能
5Names that mean something
オブジェクト名の頭が次のいずれかなら、車体ではなく特別な部品として扱われます。それ以外の名前は全部まとめて車体です。
If an object's name starts with one of these, it is treated as a special part rather than bodywork. Every other name, whatever it is, is body.
| 名前 | 扱い |
|---|---|
light_head | ヘッドライト。L で点灯。光の筋の起点にもなります |
light_tail | テールランプ。常時うっすら、ブレーキで最大 |
light_reverse | バックランプ。ギアが R のとき |
glass で始まる | 半透明のガラス |
mirror_rear | ルームミラー。実際に後ろが映ります |
mirror_left / mirror_right | ドアミラー |
gauge_ で始まる | 捨てられます(ゲージが混ざっても描かれない) |
| それ以外 | 車体 |
| Name | What it becomes |
|---|---|
light_head | Headlight. Toggled with L. Also the origin of the light beam |
light_tail | Tail light. Dim at all times, full under braking |
light_reverse | Reverse light. On when the gear is R |
starts with glass | Translucent glass |
mirror_rear | Rear-view mirror. Genuinely reflects what is behind |
mirror_left / mirror_right | Door mirrors |
starts with gauge_ | Discarded, so a stray gauge is never drawn |
| anything else | Body |
mirror_rear)は室内なのでこの図には出ていませんmirror_rear) is inside the cabin, so it is not shown.この見本から読み取れることが 3 つあります。
Three things worth reading off that screenshot.
glass.frontのように.で続けてもガラスとして扱われます。窓をglass.front/glass.front_side/glass.rear/glass.rear_sideと分けても、4 つとも透けます- ミラーの筐体は
body_mirror_leftと、車体側の名前で作ってあります。鏡として映るのはmirror_leftのほうだけです。下記のとおり筐体ごとmirror_にしても構いませんが、こうして分けておくと反射面がどれになるか迷う余地がありません seatは特別な名前ではありません。light_やglassと並んでいますが、ただの車体として描かれるだけです(座席の位置はJSON で決めます)。この見本では内装の一部として作ってあります
- A
.separator counts too. Splitting the windows intoglass.front,glass.front_side,glass.rearandglass.rear_sideleaves all four see-through - The mirror housings are named
body_mirror_left— body names. Onlymirror_leftreflects. You may name the whole housingmirror_instead, but splitting them like this removes any doubt about which face becomes the mirror seatis not a special name. It sits in the list next tolight_andglass, but it is drawn as ordinary bodywork — the seating position comes from the JSON. Here it is simply part of the interior
灯火(light_head / light_tail / light_reverse)
Lights (light_head / light_tail / light_reverse)
- 役割ごとに 1 オブジェクトで構いません。左右に分ける必要はありません — ミラーモディファイアをそのまま使えます。光の筋を出す位置も照らす向きもメッシュから読むので、JSON に座標を書く必要はありません
- レンズ面は車体から 1〜2mm 浮かせてください。ぴったり同じ面だとチラつきます
- 点いているときの明るさ/消えているときの暗さはゲーム側が持ちます。テクスチャで暗く塗っておく必要はありません
- One object per role is enough — you do not need to split left from right. A mirror modifier is fine. The beam's position and direction are read from the mesh, so no coordinates go into the JSON
- Float the lens 1–2 mm proud of the body. Coplanar faces flicker
- How bright it is when lit, and how dim when off, is handled by the game. Do not bake that into the texture
レンズの色は、UV を展開したかどうかで決まる側が変わる
Who decides the lens colour depends on whether you unwrapped it
| レンズの UV | 色を決めるのは | 使い方 |
|---|---|---|
| 1 点に潰れている | ゲーム側 | ヘッドは電球色、テールは赤、バックは白。テクスチャの白い画素を 1 つ指すだけでよく、UV 空間を使いません |
| 展開されている | テクスチャ | Blender で塗った色がそのまま出ます |
| Lens UV | Colour comes from | Why you'd choose it |
|---|---|---|
| collapsed to a point | the game | Warm white for the headlight, red for the tail, white for reverse. Point it at one white pixel of the texture; it costs no UV space |
| properly unwrapped | the texture | Whatever you painted in Blender comes through |
二重に色が掛かることはありません(展開されているレンズには白が掛かります)。
The two never multiply together — an unwrapped lens is tinted white.
light_ で始まる名前を勝手に増やさないこと
車体を描くときは light_ で始まるオブジェクトすべてが除外されますが、実際に描かれるのは上の 3 つだけです。light_fog のような名前を付けるとそこが穴になって何も描かれません。フォグランプが欲しければ light_head に含めるか、ただの車体として作ってください。
light_ NAMES
The body pass excludes everything beginning with light_, but only the three above are ever drawn. Call something light_fog and you get a hole where nothing is rendered. If you want fog lights, either fold them into light_head or model them as plain bodywork.
ガラス(glass で始まる名前)
Glass (names starting with glass)
glass / glass_side / glass.001 が当たります(Blender は名前が重なると .001 を足すので、そこも拾います)。glasshouse のように区切りなしで続く名前は当たりません。
glass, glass_side and glass.001 all match — Blender appends .001 on a name collision, so that case is covered. A name that runs straight on, like glasshouse, does not match.
濃さの決まり方
How the tint is decided
| 条件 | 濃さ |
|---|---|
| マテリアルの Alpha を下げてある | その値がそのまま出ます。コードもテクスチャも触らずに濃さを決められるので、これが基本 |
| マテリアルを割り当てていない | 0.35(既定)。名前だけで透かせる逃げ道 |
| Case | Opacity |
|---|---|
| Material Alpha turned down | Exactly that value. You set the tint without touching code or texture, so this is the normal route |
| No material assigned | 0.35 (the default). An escape hatch: the name alone makes it transparent |
light_ と違い、増やしても穴は開きません
glass_quarter のような名前を新しく作っても大丈夫です。車体のパスから外れたぶんは必ず半透明のパスが拾うので、描かれないということが起きません。
light_, NEW NAMES HERE ARE SAFE
Adding glass_quarter is fine. Anything dropped from the body pass is always picked up by the translucent pass, so nothing can go undrawn.
ミラー(mirror_rear / mirror_left / mirror_right)
Mirrors (mirror_rear / mirror_left / mirror_right)
名前を付けるだけで実際に後ろの景色が映ります(世界をもう一度描いています)。ゲーム側の既定は「切」なので、確認するときは H のメニューで入れてください。
Name it and the scene behind really is reflected — the world is rendered a second time. It is off by default, so switch it on from the H menu before checking your work.
- 筐体ごと 1 つの箱で構いません。反射面はコードが選びます(そのオブジェクトの中でいちばん広い平面)。選ばれなかった面は普通に車体として描かれるので、鏡のガワが消えることはありません
- 反射面を運転者のほうへ向けてください。その面がどこに映像を貼るかを決めます
- 角度を合わせ込む必要はありません。何を映すかは車体基準で決め打ちしています(ルームミラーは真後ろ、ドアミラーは外へ 13 度・下へ 7 度)。実車で乗った人がミラーを調整するのと同じで、板の角度は「調整前の姿」でしかありません
- UV は要りません。面内の位置がそのまま使われます
- 映る範囲は鏡の大きさと位置で決まります。大きく作れば広く映り、遠ざければ狭く映ります
- A single box for the whole housing is fine. The code picks the reflective face itself — the largest flat face in the object. The faces it does not pick are drawn as ordinary body, so the housing never disappears
- Face the reflective surface towards the driver. That face is what the image gets pasted onto
- You do not need to aim it. What each mirror looks at is fixed relative to the car (rear-view: straight back; door mirrors: 13° out and 7° down). Just as a real driver adjusts the glass after getting in, the angle you model is only the "before adjustment" pose
- No UVs needed. Position within the face is used directly
- Field of view follows the size and position of the glass. Model it bigger and you see more; put it further away and you see less
1 枚ごとに自分の視点から描き直すので、ミラーモディファイアで 1 つにまとめると左右で同じ景色が映ります。灯火が「1 オブジェクトのままでよい」のとはここが違います。左右を別々に作るか、ミラーモディファイアを適用してから分離してください。
なお名前の left / right は識別子でしかなく、どちらが映るかはその面の位置で決まります。入れ替わっていても正しく映ります。
Each one is rendered from its own viewpoint, so merging them with a mirror modifier makes both show the same view. This is where mirrors differ from lights, which are happy as one object. Model them separately, or apply the modifier and then split.
The left / right in the name is only an identifier — what a mirror shows is decided by where the face is. Swap the names and it still reflects correctly.
6タイヤを作る
6Build the wheel
タイヤは車体とは別のファイル(wheel.obj)で作ります。KurumaMod 付属のタイヤを借りることもできる(9 章)ので、車体を先に仕上げたい場合はこの章を飛ばしても構いません。
Wheels live in a separate file (wheel.obj). You can also borrow KurumaMod's own wheel (chapter 9), so skip this chapter if you would rather finish the body first.
専用のゲージがあります。Scripting タブで tools/blender_wheel_gauge.py を実行してください(車体とは別のファイルで作業します)。
There is a gauge for it: run tools/blender_wheel_gauge.py from the Scripting tab, in a fresh file.
守ること
The rules
- 原点は車軸の中心。タイヤの底ではありません
- 回転軸は左右方向(X)。Blender の既定の円柱は軸が Z を向いているので、R Y 9 0 で 90 度回してから作ってください
- 左側用を 1 つだけ作る。右側は MOD が鏡像にして描きます。2 つ作ってはいけません
- ホイールの表(デザイン面)を +X へ向ける。ゲージの矢印が指している側です
- The origin is the centre of the axle, not the bottom of the tyre
- The spin axis runs left–right (X). Blender's default cylinder points along Z, so rotate it 90° first: R Y 9 0
- Build the left-hand wheel only. The mod mirrors it for the right side. Do not model two
- Point the face of the wheel towards +X — the direction the gauge arrow indicates
作った半径を JSON の designWheelRadius に書きます。こう書いておくと、ゲーム内の調整画面でタイヤ半径を変えたときに見た目もそのまま追従します(車高が上がり、タイヤは接地したままリフトアップします)。
Write the radius you built at into designWheelRadius in the JSON. Do that and the model follows when you change the tyre radius in the in-game tuning screen — ride height rises and the car lifts while the tyres stay on the ground.
7色とテクスチャ
7Colour and texture
テクスチャ(PNG)を貼らなくても走ります。まずは形だけ作って、あとから貼るのでも構いません。
The car drives without a texture. Build the shape first and paint it later if you prefer.
Blender のマテリアルの既定色は 0.8 のグレーで、これがそのまま色として掛かるため、テクスチャを貼っても暗く出ます。マテリアルを使うなら Base Color を白(1.0)にしてください。マテリアルを 1 つも割り当てなければ全体が白になり、テクスチャがそのまま出ます。
Blender's default material is 0.8 grey, and that value is multiplied over your texture, so a textured car comes out dark. If you use materials at all, set Base Color to white (1.0). Assign no material and everything is white, letting the texture through untouched.
UV を張らない場合
Without UVs
UV 展開していないメッシュは、テクスチャの 1 点の色で塗りつぶされます。形を確かめる段階ではこれで十分です。灯火のレンズについては、UV を展開しないほうが都合がよい場合があります(5 章)。
An unwrapped mesh is filled with the colour of a single texel — plenty while you are still checking the shape. For light lenses, leaving them unwrapped is often the better choice (chapter 5).
テクスチャのファイル
The texture file
- 形式は PNG。大きさに決まりはありません
- 車体用とタイヤ用で別々に指定できます
- 置き場所とパスの書き方は 9 章
- PNG, any resolution
- Body and wheel can point at different files
- Where it goes and how to write the path: chapter 9
8書き出す
8Export
いちばん間違えやすいところです。チェックを 2 つ入れて、2 つは触らないと覚えてください。
This is the easiest place to go wrong. Remember it as tick two boxes, leave two alone.
手順
Steps
- 車体を全部選択(A)。ゲージは掴めない設定なので選択されません
ファイル→エクスポート→Wavefront (.obj)- 右側のパネルで下の 4 項目を確認
- ファイル名を付けて書き出す
- Select everything (A). The gauge is unselectable, so it will not be included
File→Export→Wavefront (.obj)- Check the four settings below in the panel on the right
- Name the file and export
| 項目 | どうする | なぜ |
|---|---|---|
| Selected Only (古い版では Selection Only) | 入れる | ゲージを書き出さないため |
| Triangulated Mesh (古い版では Triangulate Faces) | 入れる | 5 角形以上の凹んだ面は形が破綻します |
| Forward Axis / Up Axis | 触らない(−Z / Y のまま) | 下記 |
| Apply Modifiers | 触らない(入ったまま) | ミラーモディファイアがこれで適用されます |
| Setting | Do this | Why |
|---|---|---|
| Selected Only (older versions: Selection Only) | Tick it | Keeps the gauge out of the file |
| Triangulated Mesh (older versions: Triangulate Faces) | Tick it | Concave n-gons fall apart otherwise |
| Forward Axis / Up Axis | Leave alone (−Z / Y) | See below |
| Apply Modifiers | Leave alone (on) | This is what applies the mirror modifier |
−Z Forward と書いてありますが、これを選んでも Blender の前方 −Y が OBJ の −Z になるわけではありません(実際は +Z になります)。読み替えは MOD 側が済ませているので、既定のままで正しく前を向きます。
Forward Axis を変えると前後と左右がセットで裏返ります。車体は左右対称なので鏡像になっても気づけず、「なぜかタイヤの向きだけおかしい」という形で後から表に出ます。触らないでください。
It says −Z Forward, but choosing that does not make Blender's front (−Y) come out as −Z in the OBJ — it comes out as +Z. The mod already handles the conversion, so the defaults give you a car facing the right way.
Changing Forward Axis flips front–back and left–right together. A symmetric body gives you no clue that it has been mirrored; it surfaces much later as "for some reason only the wheels point the wrong way". Leave it alone.
書き出すファイル
What comes out
- 車体とタイヤは別々に書き出します(
car.objとwheel.obj) - 同じ場所に
.mtlも一緒に出ます。マテリアルの色とガラスの濃さはこのファイルが運ぶので、一緒に置いてください。要らなければ消しても構いません(全体が白になります)
- Export body and wheel separately (
car.objandwheel.obj) - An
.mtlis written alongside. It carries the material colours and the glass opacity, so keep it with the OBJ. Delete it if you do not need it and everything turns white
9置き場所と JSON
9Where files go, and the JSON
道は 2 つあります。まずは A で確かめて、人に配る段になったら B にするのが楽です。
There are two routes. Use A while you iterate, and switch to B when you want to hand the car to someone else.
A. リソースパックで既定の車を差し替える(いちばん短い道)
A. Replace the built-in car with a resource pack (the short route)
KurumaMod 付属の車を自分のモデルで上書きします。jar を作る必要がなく、F3+T で何度でも入れ直せます。
Override KurumaMod's own car with your model. No jar to build, and F3+T reloads it as often as you like.
.minecraft/resourcepacks/MyCar/
├── pack.mcmeta
└── assets/kurumamod/
├── models/entity/car.obj ← 自分の車体(.mtl も一緒に)
├── models/entity/wheel.obj ← 自分のタイヤ
├── textures/entity/car.png
└── vehicles/car.json ← 下記
.minecraft/resourcepacks/MyCar/
├── pack.mcmeta
└── assets/kurumamod/
├── models/entity/car.obj <- your body (keep the .mtl with it)
├── models/entity/wheel.obj <- your wheel
├── textures/entity/car.png
└── vehicles/car.json <- see below
pack.mcmeta の中身はこれだけです。
pack.mcmeta only needs this:
{
"pack": { "description": "MyCar", "pack_format": 15 }
}
開発環境で試している場合は run/resourcepacks/ に置きます。ゲーム内の設定でリソースパックを有効にするのを忘れずに。
In a development environment it goes in run/resourcepacks/ instead. Remember to actually enable the pack in the game's settings.
B. カーパック(新しい車種として増やす)
B. A car pack (adding a new vehicle)
mods/ に入れるだけで車種が増える jar を作ります。見た目と諸元でファイルの置き場所が分かれるのが要点です。
A jar that adds a vehicle just by being dropped into mods/. The key point is that looks and specs live in different folders.
mypack.jar
├── META-INF/mods.toml
├── pack.mcmeta
├── assets/mypack/
│ ├── models/entity/ae86.obj ← 見た目(クライアントだけが読む)
│ ├── textures/entity/ae86.png
│ ├── vehicles/ae86.json ← 見た目の定義。この章の話
│ └── lang/ja_jp.json ← 表示名 car.mypack.ae86
└── data/mypack/
└── cars/ae86.json ← 諸元(サーバーが読む。別文書)
mypack.jar
├── META-INF/mods.toml
├── pack.mcmeta
├── assets/mypack/
│ ├── models/entity/ae86.obj <- looks (client only)
│ ├── textures/entity/ae86.png
│ ├── vehicles/ae86.json <- the look definition; this chapter
│ └── lang/en_us.json <- display name car.mypack.ae86
└── data/mypack/
└── cars/ae86.json <- specs (server reads these; separate doc)
作り方の全体は examples/carpack/README-ja.md にあります。見本一式が examples/carpack/ にそのまま入っているので、コピーして名前を変えるのがいちばん確実です。
The full procedure is in examples/carpack/README.md, and a complete working example sits in examples/carpack/. Copying it and renaming things is the surest way.
assets/ に諸元を書いてはいけない
サーバーは assets/ を読みません。ここに走りを決める値を置くと、誰も乗っていない車の動きが各プレイヤーのリソースパック次第になってしまいます。この章の JSON に書けるのは見た目だけです。
assets/
The server does not read assets/. Put handling values there and how a driverless car behaves would depend on each player's resource pack. The JSON in this chapter can only describe appearance.
見た目の定義(vehicles/<車>.json)
The look definition (vehicles/<car>.json)
書かなかった項目は既定値になります。全部書く必要はありません。最小構成はこれだけです。
Anything you leave out falls back to a default, so you do not have to write all of it. This is the minimum:
{
"body": { "model": "mypack:models/entity/ae86.obj",
"texture": "mypack:textures/entity/ae86.png" },
"wheel": { "model": "kurumamod:models/entity/wheel.obj",
"texture": "kurumamod:textures/entity/wheel.png" },
"designWheelBase": 3.12,
"designWheelRadius": 0.45
}
この例のように、タイヤだけ KurumaMod のものを借りることもできます(kurumamod: から始めるだけ)。
As in this example, you can borrow KurumaMod's wheel and only supply a body — just start the path with kurumamod:.
書ける項目(これで全部)
Every key you can write
| キー | 既定値 | 意味 |
|---|---|---|
body.model | 既定の車 | 車体の OBJ |
body.texture | 既定の車 | 車体のテクスチャ |
body.offset | [0,0,0] | 車体をずらす [m](+X 右・+Y 上・−Z 前) |
body.scale | 1.0 | 車体の大きさの微調整。数字 1 つでも [x,y,z] でも書けます。原点が地面なので上へ伸びます |
wheel.model | 既定のタイヤ | タイヤの OBJ |
wheel.texture | 既定のタイヤ | タイヤのテクスチャ |
wheel.offset | [0,0,0] | タイヤをずらす [m]。X は「外向き」(左右で符号が反転します) |
wheel.scale | 1.0 | X は太さ、Y・Z は直径。Y・Z を触ると接地が崩れます(直径を変えたいときはゲーム内の調整画面のタイヤ半径で) |
wheel.camber | 0.0 | キャンバー角 [度]。負で「上が内側」。見た目だけでグリップには効きません |
designWheelBase | 3.12 | メッシュのホイールアーチが何 m 離れているか |
designWheelRadius | 0.45 | メッシュが何 m の半径で作られているか |
designRideHeight | 0.6019 | 車体をシャシー基準面から下げる量 [m] |
seat | [0.5, -0.55, 0.2] | 運転席の位置 [m]。右ハンドル。助手席は左右反転で自動的に置かれます |
shadowRadius | 1.4 | 影の大きさ |
| Key | Default | Meaning |
|---|---|---|
body.model | built-in car | Body OBJ |
body.texture | built-in car | Body texture |
body.offset | [0,0,0] | Shift the body [m] (+X right, +Y up, −Z forward) |
body.scale | 1.0 | Fine adjustment of body size. A single number or [x,y,z]. The origin is on the ground, so it grows upward |
wheel.model | built-in wheel | Wheel OBJ |
wheel.texture | built-in wheel | Wheel texture |
wheel.offset | [0,0,0] | Shift the wheels [m]. X is "outward", so the sign flips between sides |
wheel.scale | 1.0 | X is width; Y and Z are diameter. Touching Y/Z breaks ground contact — change diameter with the tyre radius in the tuning screen instead |
wheel.camber | 0.0 | Camber in degrees. Negative leans the top inward. Cosmetic only; it does not affect grip |
designWheelBase | 3.12 | How far apart the arches are in your mesh |
designWheelRadius | 0.45 | What radius your mesh was built at |
designRideHeight | 0.6019 | How far to drop the body below the chassis plane [m] |
seat | [0.5, -0.55, 0.2] | Driver's seat [m]. Right-hand drive. The passenger seat is mirrored automatically |
shadowRadius | 1.4 | Size of the shadow |
design* は「この車の寸法」ではありません
designWheelRadius が意味するのは「このメッシュは半径 0.45m で作られている」であって、「この車のタイヤは 0.45m だ」ではありません。実際のタイヤ半径は諸元側にあり、ゲームはその比でメッシュを拡大します。だから寸法をぴったり作る必要がないのです。
design* IS NOT "THIS CAR'S SIZE"
designWheelRadius means "this mesh was built at a radius of 0.45 m", not "this car has 0.45 m tyres". The real radius lives on the spec side, and the game scales the mesh by the ratio between them. That is exactly why you never have to model to an exact size.
座席について
About the seat
- 基準は車体メッシュの原点(前後輪の中点)です
- 足元の位置であって、目線ではありません。一人称の視点はここから 1.62m 上に来ます。目線を基準に決めたいなら 1.62 を引いてください
- 座面を優先すると視線が高くなり、目線を優先すると足が床下へ潜ります。どちらにするかは車ごとの好みです
- Measured from the body mesh origin (the midpoint of the axles)
- It is where the feet go, not where the eyes go. The first-person camera sits 1.62 m above it, so subtract 1.62 if you want to place the eye line instead
- Favour the cushion and the view sits high; favour the eye line and the feet sink through the floor. Which one you pick is a per-car judgement call
10確認する
10Check it in game
ゲームを起動して車に乗り、F3+T を押します。モデル・テクスチャ・vehicles/*.json がその場で読み直されるので、Blender で直して書き出す → F3+T を繰り返して詰めていきます。
Start the game, get in the car, press F3+T. The model, the texture and vehicles/*.json all reload on the spot, so the loop is fix it in Blender → export → F3+T.
見るところ
What to look at
| 何を | どうやって |
|---|---|
| タイヤの位置と大きさ | 止まった状態で、フェンダーの中に収まっているか |
| 車高 | 地面に埋まっていないか、浮いていないか |
| 拡大率の追従 | G の調整画面でタイヤ半径を動かす。タイヤは追従し、車体は追従しません(そういう仕様です) |
| 灯火 | L でヘッドライト。ブレーキでテール。バックに入れてバックランプ |
| ガラス | 車内から外が見えるか。濃すぎないか |
| ミラー | H のメニューで有効にしてから見る(既定は切) |
| サスの動き | ブレーキで鼻先が沈むか。車体とタイヤの間隔が変わっているか |
| What | How |
|---|---|
| Wheel position and size | Parked: do they sit inside the arches? |
| Ride height | Not sunk into the ground, not floating |
| Scaling follows | Change the tyre radius in the G tuning screen. The wheels follow; the body does not — that is intended |
| Lights | L for headlights, brake for the tails, reverse gear for the reverse lights |
| Glass | Can you see out from inside? Is it too dark? |
| Mirrors | Enable them in the H menu first — off by default |
| Suspension | Does the nose dive under braking? Does the body-to-wheel gap change? |
data/ 側(走り)を直したときは /reload です。この 2 つは別系統なので、「直したのに変わらない」ときはどちらを直したのか確かめてください。
Edits on the data/ side (handling) need /reload. They are two separate systems, so when "I changed it and nothing happened", first check which side you actually changed.
11症状別の直しかた
11Troubleshooting
カーパックは失敗しても黙っています。壊れた JSON もずれた名前も、その 1 件を捨てて先へ進むので、症状から当たりを付けます。
Car packs fail silently. A broken JSON or a mistyped name is dropped and loading carries on, so you diagnose from the symptom.
| 症状 | 見るところ |
|---|---|
| 何も変わらない | F3+T を押したか。リソースパックを有効にしたか |
| 既定の車のまま出る | vehicles/ の JSON のファイル名とパス。名前空間(mypack:)が合っているか |
| 車体だけ大きい/小さい | designWheelBase がメッシュの実寸か。微調整は body.scale |
| 車体が地面に埋まる/浮く | designRideHeight。原点が地面の高さになっているか(車体の底ではない) |
| タイヤが前後にずれる | designWheelBase。ゲーム内で前後の荷重配分を動かした場合は仕様(車体は追従しません) |
| タイヤが大きすぎ/小さすぎ | designWheelRadius がメッシュの実寸か |
| タイヤが横倒し/転がりかたが変 | 回転軸が X になっていない。原点が車軸の中心か |
| 右側のタイヤだけ内側を向く | 左側用として作っていない。表を +X へ |
| 前後が逆/左右が鏡像 | エクスポートの Forward Axis を触った。既定へ戻す |
| 面がめちゃくちゃ/抜ける | 三角形化せずに書き出した。Triangulated Mesh を入れる |
| テクスチャが暗い | マテリアルの Base Color が 0.8 グレーのまま。白にする |
| 全体が真っ白 | .mtl を置いていないか、マテリアルが無い。形が正しければ問題ありません |
| 窓が透けない | オブジェクト名が glass で始まっているか。.mtl を一緒に置いたか |
| ライトを足したところが穴になる | light_ で始まる名前を増やした。使えるのは 3 つだけ |
| ミラーが映らない | H で有効にしたか。描画設定が「最高(Fabulous)」だと映りません。シェーダーパックが入っていても映りません |
| 左右のミラーに同じ景色が映る | ミラーモディファイアで 1 オブジェクトにまとめている。左右を別オブジェクトに |
| ミラーが地面ばかり映す | 板の角度は関係ありません(狙いは車体基準)。それでも地面なら鏡の位置——車体中心から 0.35m 以内はルームミラー扱いになります |
| 車内が暗い | 車体の裏面が見えています。仕様です |
| ゲージが車と一緒に出てくる | 描かれはしませんが、書き出しで Selected Only を入れ忘れています |
| Symptom | Where to look |
|---|---|
| Nothing changed at all | Did you press F3+T? Is the resource pack enabled? |
| Still the built-in car | Filename and path of the JSON in vehicles/. Does the namespace (mypack:) match? |
| Body too big / too small | Is designWheelBase the real size of your mesh? Fine-tune with body.scale |
| Body sunk into or floating above the ground | designRideHeight. Is the origin at ground level rather than the underside of the body? |
| Wheels sit too far forward or back | designWheelBase. If you moved the weight distribution in game, this is expected — the body does not follow |
| Wheels too big / too small | Is designWheelRadius the real size of your mesh? |
| Wheels lie on their side / roll oddly | The spin axis is not X. Is the origin at the axle centre? |
| Only the right wheels face inward | You did not build it as the left-hand wheel. Point the face towards +X |
| Front and back swapped / mirrored | You changed Forward Axis on export. Put it back |
| Faces are a mess or missing | Exported without triangulating. Tick Triangulated Mesh |
| Texture looks dark | Material Base Color is still 0.8 grey. Make it white |
| Everything is white | No .mtl, or no material at all. Harmless if the shape is right |
| Windows are not transparent | Does the object name start with glass? Did you keep the .mtl alongside? |
| A hole where you added a light | You invented a new light_ name. Only the three listed work |
| Mirrors show nothing | Enabled in the H menu? They do not work on the "Fabulous" graphics setting, or with a shader pack installed |
| Both door mirrors show the same view | They are one object via a mirror modifier. Split them |
| A mirror only ever shows the ground | The angle you modelled is irrelevant — aiming is relative to the car. If it persists, it is the position: anything within 0.35 m of the centreline is treated as the rear-view mirror |
| The cabin is dark | You are seeing the back faces of the body. That is intended |
| The gauge is exported with the car | It is never drawn, but you forgot Selected Only on export |
12チェックリスト
12Checklists
書き出す前(Blender)
Before exporting (in Blender)
- ワールド原点が「地面の高さ・前後輪の中点・左右中央」に来ている
- 車の前が −Y を向いている
- フェンダーがゲージのタイヤに合っている
- 灯火のオブジェクト名が
light_head/light_tail/light_reverseのいずれか(これ以外のlight_は無い) - レンズ面が車体から 1〜2mm 浮いている
- 窓のオブジェクト名が
glassで始まっている - 左右のドアミラーが別オブジェクトになっている
- マテリアルの Base Color が白
- タイヤは別ファイル・左側用 1 つ・原点は車軸・表は +X
- The world origin is at ground level, midway between the axles, on the centreline
- The front of the car points along −Y
- The arches line up with the gauge wheels
- Light objects are named
light_head,light_tailorlight_reverse— and no otherlight_exists - Lens faces float 1–2 mm proud of the body
- Window objects start with
glass - The two door mirrors are separate objects
- Material Base Color is white
- Wheel: separate file, left side only, origin at the axle, face towards +X
書き出しの画面
In the export dialog
Selected Onlyを入れた(ゲージが混ざらない)Triangulated Meshを入れたForward Axis/Up Axisを触っていない- 車体とタイヤを別ファイルに書き出した
.mtlも一緒に置いた
Selected Onlyticked, so the gauge stays outTriangulated MeshtickedForward Axis/Up Axisuntouched- Body and wheel exported to separate files
- The
.mtlkept alongside
ゲームで見る前
Before loading it in game
- JSON のパスが実際のファイル名と一致している
designWheelBase/designWheelRadiusがメッシュの実寸になっている- リソースパック/カーパックを有効にした
- F3+T を押した
- The paths in the JSON match the actual filenames
designWheelBaseanddesignWheelRadiusare the real sizes of your mesh- The resource pack / car pack is enabled
- You pressed F3+T
付録 A. 座標系
Appendix A. Axes
Blender・OBJ ファイル・ゲームで軸の意味が変わりますが、読み替えは MOD 側が済ませています。Blender 標準の向きで作り、エクスポート設定も標準のままにしておけば、この表を意識する必要はありません。
The axes mean different things in Blender, in the OBJ file and in game, but the mod already does the conversion. Model in Blender's default orientation, leave the export settings alone, and you never need this table.
| 前 | 上 | 車体の左 | |
|---|---|---|---|
| Blender(作業中) | −Y | +Z | +X |
| OBJ ファイルの中 | +Z | +Y | +X |
ゲーム内(JSON の offset など) | −Z | +Y | −X |
| Front | Up | Car's left | |
|---|---|---|---|
| Blender (while modelling) | −Y | +Z | +X |
| Inside the OBJ file | +Z | +Y | +X |
In game (JSON offset etc.) | −Z | +Y | −X |
vehicles/*.json の offset と seat はゲーム内の向き(+X 右・+Y 上・−Z 前)で書きます。Blender の向きとは前後・左右が逆なので注意してください。
offset and seat in vehicles/*.json use the in-game axes (+X right, +Y up, −Z forward). Note that both the front–back and left–right senses are reversed from Blender's.
UV も上下が逆(OBJ は下が 0・Minecraft は上が 0)ですが、こちらも読み込み時に反転しているので Blender 側で気にする必要はありません。
UVs are flipped vertically too (0 is the bottom in OBJ, the top in Minecraft), but that is also handled on load, so there is nothing to do in Blender.
付録 B. 用語
Appendix B. Glossary
| ホイールベース | 前輪と後輪の距離。既定は 3.12m |
|---|---|
| トレッド | 左右輪の距離。既定は 1.80m |
| シャシー基準面 | ゲーム内で車の「位置」として扱われる高さ。既定は地面から 0.602m。車体はここから designRideHeight だけ下げて描かれます |
| フェンダー/タイヤハウス | タイヤの上を覆っている部分。ここをゲージのタイヤに合わせます |
| キャンバー角 | タイヤの傾き。負で「上が内側」。この MOD では見た目だけで、グリップには効きません |
| n-gon | 5 角形以上の面。凹んでいると分割で破綻するので、書き出し時に三角形化します |
| UV 展開 | 3D のメッシュに 2D の絵をどう貼るかの対応付け。しなくても走ります |
| マテリアル | Blender 上の材質設定。この MOD が読むのは色(Base Color)と透明度(Alpha)だけです |
| MTL | OBJ と一緒に出るマテリアルのファイル。色とガラスの濃さを運びます |
| 名前空間 | mypack:models/entity/ae86.obj の mypack の部分。どのパックのファイルかを指します |
| Wheelbase | Distance from the front axle to the rear. 3.12 m by default |
|---|---|
| Track | Distance between the left and right wheels. 1.80 m by default |
| Chassis plane | The height the game treats as the car's position — 0.602 m above the ground by default. The body is drawn designRideHeight below it |
| Wheel arch | The bodywork over the tyre. Line it up with the gauge wheels |
| Camber | How far the wheel leans. Negative tips the top inward. Cosmetic only in this mod; it does not affect grip |
| n-gon | A face with five or more vertices. Concave ones fall apart when split, which is why you triangulate on export |
| UV unwrap | The mapping that decides how a 2D image sits on a 3D mesh. Optional — the car drives without it |
| Material | Blender's surface settings. This mod reads only the Base Color and the Alpha |
| MTL | The material file written next to the OBJ. It carries the colours and the glass opacity |
| Namespace | The mypack part of mypack:models/entity/ae86.obj — which pack the file comes from |