The bus mesh can be created in whichever 3D modeling tool you prefer, but there are some requirements that need to be fulfilled, so that the bus is working correctly in the game.
To get a better grasp of what is talked about in this section you can also look at the mesh of one of the provided buses.
Materials, UVs and Vertex colors
Several bus materials are replaced in-game to allow for customization, dynamic bus light changes and mirrors.
Exterior UV unwrap guide
The exterior of the bus needs to be unwrapped in a specific way to allow for wraps to look fairly consistent across all buses. You can see the exterior unwrap in the unwrap guide.
Hint: the sides should start at the top and move away. Scale them until there is minimal stretching.
The exterior mesh needs to be split into 3 material slots:
Bus_ExteriorPaint This will be the paint material the user can recolor in-game
Bus_ExteriorBlack On most buses used for the black areas around windows or doors
Bus_ExteriorGlass Used for the transparent windows. You can use vertex colors to mark if the window is on the outside or on the inside of the bus. Red marks exterior windows (r255 g0 b0), black marks interior windows(r0 g0 b0).
All these materials use tiling textures and assume that a single UV tile represents a 1m² meter area on the model. use them as you need them. Check the provided buses in the mod kit to see which materials are used and how you can use them.
Bus_Windshield unwraped using the bottom space for wiper animation. Vertex color is Green (r0 g255 b0) for windshield, other glass can use this as well as long as Vertex color is set to Blue (r0 g0 b255)
Each mirror needs one material slot, they will be replaced in-game with the mirror camera images. These mesh areas will need to be unwraped from 0-1.
Skeleton and Rigging
Unreal needs a very specific rig setup to be able to create a working and drive-able vehicle in-game.
Wheel bone axis visualization in unreal
The most basic bus skeleton has only 5 bones, this is needed for [[Minimal_Bus_Setup|minimal setup]]:
It is very important that these bones fulfill the following criteria once imported into unreal to be able to drive the bus later: The "Root" bone needs to have an identity transform, meaning its location and rotation needs to be 0,0,0 and its scale needs to be 1,1,1 The wheel bones all need to have the same pivot rotation: X forward, Y right, Z up
The basic skeleton lets you drive the bus, but multiple functions are driven by bones. Bones are also used to animate the opening of doors, the movement of wipers, the movement of the sun screen or the movement of the side window. The full skeleton of a bus will look more like this:
Rear (only needed if a bendy bus)
View from the underside of the bus.
Sunshade has 2 bones to hide the blinder in the upper mesh.
Driver Door has 1 bone
Doors use 2 bones to control the door and the arm bar that moves with it.
Windshield wipers use 2 bones starting at the rotation point going to the blades, the blades will be weighted to the second bone.
You need to setup several animations in your 3D program and import them to unreal.
Door Animation: every door should have an opening animation, the same animation will be played in reverse when the door is closing again (doors closed -> doors open)
Wipers: the animation should contain a whole wiper cycle (wipers are at start -> move right -> hit end -> move left)
Driver Door: the animation should contain the whole door opening and closing sequence (door closed -> door opened -> Door closed)
Driver Windows: the animation should contain the opening sequence, this animation will be played in reverse once the windows is closed by the player (window closed -> window open)
Sunshade: the animation should contain the pull down animation, this animation will be played in reverse once the sunshade is retracted by the player (sunshade retracted -> sunshade extended)