Skip to content

Modelling (Blender) ​

The example's examples/blender/whitebox_coupe.blend is set up by these conventions: open it alongside.

Collections ​

One collection per mesh, named as the mesh:

CollectionWhatTexture
<name>the outside: body, doors, filler door, tail lamps, rear window<name>.png
<name>_frontthe front: nose, hood, windshield, headlamps, turn signals<name>.png
<name>_wheelone right-hand wheel, its hub at the origin, its outer face +X<name>.png
<name>_cabthe cab: dash, steering wheel, gear lever, gauges<name>_cab.png
<name>_seatthe seats<name>_cab.png
<name>_engine (optional)the engine bay, drawn with the hood open<name>_under.png
<name>_chassis (optional)the underside<name>_under.png

A missing collection is not drawn. Make one wheel: Vettura places it at the four hubs from the VehicleSpec (track, axles, tyre radius), the left ones turned 180°.

Bones: Empties ​

A moving part hangs under an Empty: the Empty at its pivot, named as a bone Vettura knows, the mesh objects parented to it. A mesh with no Empty parent belongs to body (fixed).

BoneHow it movesCollection
door_l door_routward about a vertical axis (hinge at the door's front edge)<name>
hoodup about a cross axis (hinge at the hood's rear edge)<name>_front
fuel_doorthe filler door, about a vertical axis (left side, hinge at its front edge)<name>
tailgatea pickup's tailgate, down about a cross axis<name>
wheelthe wheel (origin)<name>_wheel
steeringthe steering wheel, about the column<name>_cab
shiftthe gear lever, about the top of its boot<name>_cab
transferthe transfer lever (4WD only)<name>_cab
tach speedo fuel_gauge temp_gaugegauge needles, about the axis out of the dial (needle at zero pointing up)<name>_cab
wiper_l wiper_rwipers (the arms; with pose tables the blades may be their own, wiper_l_blade wiper_r_blade)<name>_front

The T15 also has wiper_stalk, turn_stalk, light_knob, visor_l/r, glovebox, ashtray, key and hvac_*; a new vehicle can leave them out.

Parts: the object name says how they are drawn ​

One mesh object is one part, named <bone>_<what>: door_l_paint, body_glass_front, wheel_tire. The end of the name decides:

Ends inDrawn as
_paintmain paint (the player's colour times the texture: paint this area light grey or white)
_paint2second paint (two-tone)
_lamp_low _lamp_highlow and high beam, lit when on
_lamp_park_l _lamp_park_rparking lamps
_amber_l _amber_rleft and right turn signals
_lamp_tail _lamp_reverse _lamp_plate _lamp_dometail, reverse, plate and dome lamps
_dial _needlegauge faces and needles, lit with the electrics on
_tirethe tyre (squashed when flat)
a name with glasssee-through glass

Damage knows four panes by name: body_glass_front (windshield), body_glass_rear (rear window), door_l_glass, door_r_glass. Only these break. What is printed on a pane (heater lines, a sticker) is a part of its own named the pane plus _decal (e.g. body_glass_rear_decal): drawn as a decal (not see-through glass), gone with the pane. The same four panes get wet in the rain: Vettura works out each pane's shape and curve from the mesh, and the wipers on the windshield (wiper_l, wiper_r; their blades if there are bones like wiper_l_blade) clear what they sweep. Nothing to set up.

Objects of the same name on the same bone are merged into one part (Blender's .001 suffixes are dropped on export): the four tail lamps can all be body_lamp_tail.

Size and triangles ​

  • 1 m = 1 block, real sizes. The white-box coupe is 4.70 × 1.85 × 1.32 m.
  • Everything becomes triangles; triangles of no area are dropped.
  • Smoothing: the export splits at a 50° crease; no need to mark hard edges.
  • Per mesh file (Vextris 0.1.1 and later): 262,144 triangles, 786,432 vertices, 512 parts, 64 MiB of JSON. Over any of them the whole mesh is not loaded (that part of the vehicle is invisible); the export script prints a WARNING.
  • Don't decimate a whole vehicle evenly: big panels crumple and grilles break into triangles. Keep the outside as modelled and thin out only what is hardly seen (engine, underside). A detailed car, some hundred thousand triangles in its outside mesh, is fine.