- 1 Optional Tools Setup for 3ds Max
- 2 Creating the Half Car Mesh
- 3 Creating Body Boxes
- 4 Applying Materials
- 5 Creating Body Morphs
- 5.1 Creating morphs with skinning
- 5.2 Creating morphs with morph targets
- 5.3 Morphing tips
- 6 UV Unwrapping
- 7 Mirror the Half Body
- 8 Fix Everything You Just Broke Mirroring the Body
- 8.1 If you're using the 3ds Max script
- 8.2 Check that the same UV maps exist on the first two UV channels
- 9 Export Car Body to .FBX File
- 10 Import Car Body to Unreal Engine
- 11 Check the Materials
- 12 Set Car & Chassis Data
- 12.1 Create car body variant data
- 12.2 Loading a Car For Editing
- 12.3 What all the Body Variant settings mean
- 13 Set Bone Limits
- 14 Generate Thumbnails
- 15 Export Your Car Body
- 16 FAQ
Optional Tools Setup for 3ds Max
This is a legacy script to help with mirroring and unwrapping of a car body in 3DS Max. If you are using another program, skip this step.
Installing the 3ds Max Car Body Tools script
- In Windows Explorer, go to
Program Files\Autodesk\3ds Max 201#\Scripts\Startupfolder.
Importing car body materials into your 3ds Max scene
- In Windows Explorer, go to
- Copy CarBodyMaterials.mat into your
\Program Files\Autodesk\3ds Max 2013\materiallibrariesfolder.
- Go into the material editor in 3ds Max (press the G key, or the Materials Menu > Get Material).
- Use the drop down menu, select "Open material library...", and navigate to the
materiallibrariesfolder to load the
- From there, you should be able to drag CarMaterials and UV Test onto some of the blank grey spheres in the material editor window. (You'll likely need to do this last step every time you launch a new 3ds Max scene).
Creating the Half Car Mesh
Prior experience with modelling (particularly with subdivision surfaces) is required to make good Automation car bodies. Should you lack said experience, the links below are some good places to start:
- BlenderGuru Blender 2.8 Beginner Tutorial
- CGGeek Blender 2.8 Beginner Tutorial
- Blender Foundation Blender 2.8 Fundamentals
- BornCG Blender 2.8 Tutorial Series
Automation car bodies in particular should be created as a half, and then mirrored at or near completion to ensure symmetry and minimise the amount of work required to tweak them. Which half of a body you decide to model is irrelevant.
For an overview of how a vanilla body is modelled, Hard Rooster has made a video series covering the modelling of a body from start to finish in Blender.
- Units[clarification needed; in 3ds Max?] are in centimetres, where 1 unit is equal to 1 cm. In Blender, 1 unit is instead equal to 1 metre.
- A finished car body mesh is made of between 7000 and 30000 triangles. This varies depending on things like the curvature of the body (compare a 1980s van to a 1950s sports car, for example), morphs that may require special topology, and the size of the body (as insufficient triangle density on a larger body may result in fixture tearing).
- Panel gaps (including door seams) are modelled into the car. Panel gaps that go around lights, grilles, or other such fixtures should instead be made to go straight through them, as fixtures will cut through those as well, and not doing do may restrict players to using a specific shape of headlight.
- The entire car, including separate bounds, underbody, and seam meshes, is one object/element (although only the actual body needs to be unwrapped, and if using the unwrap script for 3ds Max, the body itself does not have to be one element).
- The body must not contain integrated mirrors, grilles, lights, badges, vents, door handles, aerials, fuel caps etc. Those should be made separately as fixtures.
- An exception may be made for sculpted vents (without the actual vent area, such as those on the LD Dodge Charger) or character lines, if they can be morphed flat and/or don't interfere with the versatility of the body.
- Use quads as much as possible, as they shade and reflect better than individual triangles.
- The body must be single sided, and must not have backfaces. It is made double-sided by materials in UE4.
- Smoothing groups or sharp edges are important to define which edges blend smoothly together, and which ones appear sharp.
- For 3ds Max, read the documentation on smoothing groups.
- In Blender, selected edges can be marked or unmarked as sharp via the edge menu. It's also recommended to give the mesh an Auto-Smooth value under 180 degrees, so that the sharp edges work as intended.
- In Maya, set edges to hard or soft by right-clicking on them and selecting the Soften / Harden Edges menu option.
- The front of the car body should face towards the negative Y (front to back) axis, and should also be roughly centred at 0 on the Y axis.
- The bottom edge of the car should roughly sit at 0 on the Z axis, with the top facing towards positive Z.
- Remember that the Y axis in 3ds Max and Blender runs forwards and backwards, whereas the Z axis runs up and down. This may not be consistent across all 3D packages.
- All vertices at the centre of the car (where it's cut in half) should be exactly at 0 on the X (left to right) axis.
- We usually model car halves on the negative X (right) side of the X axis, although this isn't critical, and you may choose to model the left half instead.
Creating Body Boxes
As per the diagram above:
- 1 (orange): Cabin Bounds box. Used to determine upper cabin volume and interior weight. Should be tallest in the middle, tapering towards each end. Only measured by its bounding box, not its total volume.
- 2 (red): Lower Bounds box. Tapered like the cabin box, but for the general area of the body below the beltline. This box in particular has a lot of impact on the car's a car's weight, and also determines engine bay size.
- 3 (green): Cargo Bounds box. determines cargo volume. Put it in the boot/rear hatch area, roughly filling where cargo would go.
- 4 (dark grey): Driver Head Position box. Currently not used, but may be required for future features. Put one where the driver's head goes. It's good practice to add another one in a mirrored location to not restrict the body to left- or right-hand drive, but you can ignore that if the driver sits directly in the centre.
- 5 (dark grey): Bonnet Cam Position box. Currently not used, but may be required for future features. Put one where a bonnet camera would go.
- 6 (purple): Lip Placement strip: Used for placing lips, side skirts, diffusers, and exhausts. Just a flat strip of quads running around the lower edge of the car body. The lip placement material, which is invisible in-game, should also be applied to quads covering all panel gaps; this prevents "fixture dive", which is when fixtures get dented after conforming to the inside of panel gaps.
- 7 (not shown): Front Bounds box. Determines the cargo space at the front of the car, and is only needed for bodies with a rear-engine option. (Rear-engined cars use the Front Bounds box instead of the regular Cargo Bounds box.)
- Mid-engined bodies use the Cargo Bounds box instead, which is relocated to the front.
These boxes should be part of the same object as the car.
Cabin Bounds and Lower Bounds boxes
All body boxes are measured by the volume of the bounding box, not the volume of the mesh itself. The reason they are tapered is so that, for example, changing the height of the back of the roofline doesn't make a huge difference to the cabin volume (as it would if the box was just a cuboid).
Also note that you'll need to make the boxes of a size that accurately represents the volume of the car; note that in the above picture, the orange cabin bounds box stops before the front of the windscreen. This is because the windscreen is steeply raked, and if the box went all the way to the front of the car, it would result in a much larger amount of cabin space than is realistically available. The same can be seen with the body box stopping before the front of the (very tapered) nose, and the cargo box that doesn't go all the way to the back of the sloped boot.
Always think about the size of your bounds boxes and if they accurately represent the overall volume correctly.
For 3ds Max, create a new multi-subobject material, and assign materials to it as needed. The names of those materials don't matter. For Maya or Blender, assign faces of the mesh to different materials. The names of the materials themselves don't matter, but the names of the material slots do.
Automation uses a set of placeholder materials applied to the mesh to define different paintable parts of the car. Only one of each material is supported. If you need more materials to assign, consider adjusting your mesh, because there are no more materials to assign than those listed here, and you can only have one of each. 😉
On import to UE4, these will be replaced with the correct materials (if you've named the material slots correctly), informing the game what various areas of the car are used for, and what materials they require.
List of car body materials
The following materials are used on car bodies:
|Material Name||Area Used||Category In-Game||Colourable In-Game||Notes|
||The location of the bonnet camera||N/A||No||This material is invisible in-game and has no effect on aesthetics.|
||The front bumper||Body||Yes||At the moment, front and rear bumper colours cannot be chosen independently in-game, but having two separate materials is good practice for futureproofing.|
||The rear bumper|
||Used to calculate the size of the cabin area||N/A||No||These materials are invisible in-game and have no effect on aesthetics.|
||Used to calculate the size of the cargo area|
||Areas that must remain chrome|
||The location of the driver camera(s)||This material is invisible in-game and has no effect on aesthetics.|
||Used to calculate the size of the front cargo area in rear-engined cars|
||Used to place fixtures over areas below the car body||Also used to cover panel gaps and prevent "fixture dive" (see Creating Body Boxes above). This material is invisible in-game and has no effect on aesthetics.|
||Used to calculate various aspects of the car, including overall weight and engine bay size||This material is invisible in-game and has no effect on aesthetics.|
||The primary paint colour||Body||Yes|
||The secondary paint colour|
||Areas that must remain plastic||N/A||No||Used for underbodies and wheel wells.|
||Deprecated||Used for reflective mirror glass, back when mirrors were modelled into car bodies.|
||The cloth roof of a softtop convertible||Body||Yes|
||The bed of a pickup truck or ute||Body||Yes||Fixtures cannot be placed on this material.|
||The general trim colour||Trim||Yes|
||The pillar trim colour|
||The window trim colour|
||The car's windows||N/A||No||Window transparency can be adjusted in-game.|
||Deprecated||Trim||Yes||Used for mirror trim, back when mirrors were modelled into car bodies.|
Creating Body Morphs
Automation car bodies support both morph targets (shape keys), and skinning (rigging) for morphing parts of a car body. You can mix and match as many of each as you want, but be careful with overlapping morphs.
Creating morphs with skinning
Skinning is the main system used to allow the player to drag around and deform a car body in Automation. It's done via weighting specific vertices to various "bones" that are a representation of what the player is dragging in-game when deforming the body.
It's also probably the single most confusing step of car creation in Automation, as it's done in a way that doesn't have a great deal in common with any other widely used game art process. It uses the same tools (the Skin modifier) as skinning a character in a 3D modelling application, so referring to some character skinning tutorials may give you useful insights into the tools used, but the way Automation uses it is quite unique.
Basic skinning overview
Bones: A bone is usually an object in the skeleton of a character used to define their animation. Rather than manually moving every vertex of a character to animate it, you just move and rotate the appropriate bone, and the skin will determine which vertices need to move. Bones are usually attached to each other in a hierarchy, so that if you rotate a leg bone, the foot bone will move with it, and the toe bones will follow the foot, etc.
In Automation, bones are still used to define which part of the skin moves, but are mostly non-hierarchical, just floating in space around the car without any connection to each other.
Vertex Weights: Every vertex on a skinned model has a skin weight to each and every bone. This will be a decimal number from 0 to 1, defining how much that vertex follows the movement of a specific bone.
- A vertex weighted 1 to a bone will exactly follow that bone's movement, a weight of 0.5 will move half as far as the bone, and a weight of 0 won't follow the bone at all. Bodies in Automation support up to eight bone weights per vertex. Weights of 0 should be deleted.
- The way we use skinning (with "Normalize" enabled) only allows a bone to have a total weight of 1 distributed between all the bones it's skinned to. For example, a vertex could have a weight of 0.5 for one bone and 0.5 for another. But if you set it to 0.6 on one bone, then the weight for the other bone would have to drop to 0.4 to maintain a total weight of 1. Weights of more than 1 will cause errors in-game.
- When you morph the car in-game, your mouse movements move the bone, and the vertices follow the bone.
Setting up bones for morphs
You can use basically any object you like as a bone in 3ds Max, but the preferable method is to use Dummy Objects (see above). They won't get in the way of viewing the car, show links to confirm they're correctly bound to the root bone, and can't be accidentally made visible in game.
In Blender, create an armature object and parent bones to a root bone (with offset) in Edit Mode.
Bones should float freely around the area which they will deform. All bones should be parented to another bone at the origin of the car called
Bone Root. The naming and hierarchy of this bone is important. It is a requirement for the root bone to be named
Bone Root; otherwise, the body will not work correctly!
The morphs you create are up to you, and vary depending on the shape of the car and which parts can be deformed attractively, but almost every car will have bones for:
- Front and rear wheel arch flares
- Windscreen rake angle
- Rear window rake angle
- Boot/rear length or angle
- Front and rear bumper length
There is no real limit to how many bones you can have, but each vertex can only be skinned to 8 different bones, and it can be very difficult in-game to select and deform an area that's skinned to more than 2 bones. This is because in-game, when you hover over the car, the bone weighted the most to the vertex under your cursor is the bone that you will be moving.
Bones should be created floating near the part of the car they deform. Their location isn't really important to how they function ingame, but having them placed correctly makes it much easier to understand what each bone is for adjusting their limits in later stages of the modding process. Also, having bones off-screen while trying to morph an area in-game results in it not moving, so try to keep the bones relatively close to the areas they're morphing.
Note that if you are using the 3ds Max script, you do not need to create bones for anything on the opposite side of the car (e.g wheel arches on the other side), as they will automatically be mirrored when you mirror the car body. If you are not using the script, or you are using Maya or Blender, all bones that should mirror their actions on the other side of the car (such as wheel arches) should have the correct naming nomenclature so they work correctly in-game. The following suffixes work for mirrored bones in Automation:
Adding bones in 3ds Max
Adding bones in Blender
Weighting the skin
Now comes the complex bit. Weighting skins is a difficult and creative proccess that's almost like remodeling the car into different shapes, but with only skin weights to do it with. Wheel arches are often the easiest place to start on a new model, and a good way to start is to move a bone a reasonably large distance in the direction you want it to move (say, 25 to 50 cm) and then start weighting to that bone's new position.
For 3ds Max
To move a bone, simply select the bone or dummy object and move it.
To edit weights, go back to the car mesh, press Edit Envelopes, and tick Vertices under the parameters section of the skin modifier, to get into the correct mode to edit vertex weights.
While you're in Edit Envelopes mode, click on the little grey stick inside the bone you wish to edit weights for. Make sure the Rigid box is unticked, and the Normalize box is ticked.
Select some vertices, and by clicking and dragging upwards on the arrows next to Abs Effect, set some weighting to the bone. As you set the weight higher, the selected vertices will move closer to the position you've moved the bone to. If you need finer adjustment of the weighting, hold
Alt while you're dragging.
Remember that the higher you set the weight, the farther that area will move with mouse input, and the less weight will be available to assign to other bones. This isn't too important on wheel arches, but can be an issue on other parts of the car which may share more bones.
If your Abs Effect values are jumping to 1.0 when you modify them, enter "Edit Envelopes" mode, select the root bone, select all vertices, and then assign the Abs Effect to 1.0 to fix the issue. This happens because all weights on a vertex need to add up to 1, and if the current bone is the only bone assigned to that vertex, it can't have a weight less than 1. By adding the root bone as a second bone, you can now adjust the weight of the bone you want, and the bone root will take the remaining weight.
To move a bone, select the armature and either press
Ctrl+Tab to switch to Pose Mode, or select Pose Mode from the modes menu:
Bones in Blender affect vertex groups of their same name. To skin a mesh, you assign vertices of that mesh to the vertex group (of the same name as the bone you want them to be affected by), and then adjust the weight of that vertex (as a value from 0 to 1) to that vertex group. Keep in mind that Unreal Engine rounds bone weights to the nearest 1/256 (with intervals of roughly 0.004). This minimum weight interval isn't 100% reliable in some cases—instead, a minimum of 0.008, 0.012, or 0.016 may be used.
You may also use weight painting as per Hard Rooster's video tutorial series, which requires more setup but is generally faster and more convenient.
Effectively, what you're doing here is using weighting to remodel the car into the shape you want it to be at the furthest extremes of bone movement. If you can make it the correct shape with the bone moved to its maximum position and with the bone back in its normal position, everything in between should take care of itself, and any bone position in between should look good too.
Windscreens are also a good place to learn to skin, as you can basically move the windscreen bone forwards, and then try your best to use skin weights to make an almost vertical windscreen. If you can get that working correctly, then you should have a bone that lets you smoothly change the angle of the windscreen.
Creating morphs with morph targets
For Automation, we support using morph targets and shape keys for morphing a car body. This is done by storing a default value (the base car) and a morph to morph to (the morph target/shape key), and interpolating between those two shapes for every morph. The game supports morph values between 0 and 1 only, and only in one direction. This is why skinning is better for the corners of a car body, because that allows for a full two (or even three) dimensions of movement for every morph. It is up to you to decide which method you would prefer to use. Morph targets are generally easier to set up.
You can now edit the mesh to be in the new position you want it to be in for that morph.
Repeat for as many morphs as you would like, taking into consideration that every vertex that each morph affects will add to the total polygon count for that body. If you have too many morphs on a body with too many polygons, you will have a very laggy car body!
In 3ds Max
I do not recommend this, but you can do it if you really want to.
- Duplicate your mesh. Adjust your mesh, without adding or removing any polygons, to create your morph target.
- Create a Morpher modifier, and put it above the Edit Poly modifier, and below the Skin modifier (if you're using one).
- Pick the duplicate mesh as one of the morphs.
- Repeat for all morphs. Yes, it's that tedious. I hate 3ds Max.
- Look carefully for any strange deformations in panels when moving your bones. It's very important that panels remain as smooth as possible when deforming, as reflections will very obviously show any kinks. The above example of the windscreen is a great example of a morph that deforms the overall shape of the body too much (look at how the top of the windshield becomes a curve and then eventually a kink—this is bad). If I had the time, I'd go back and fix that one... 😉
- Test out what happens if you move two nearby bones at the same time. Sometimes, two bones' movement combined can cause strange polygon overlaps, though this can often be avoided with careful skinning and a smooth falloff of weights between the two bones.
- Don't try and make too many different skinned areas. 10 or 12 is a sensible maximum, and try and avoid more than one bone affecting the exact same area (some overlap is okay though), as this may make them hard to select in-game.
- Sometimes you'll have to make changes to the mesh to make your car deform nicely in an area. Poly flow is very important for good deformation.
- Don't forget that any weighting you give a vertex to a bone will be taken from another bone to keep a total weight of 1. This can get very confusing and cause you to chase your own tail a bit. You have been warned! This isn't so much an issue in Blender (since vertex groups can be locked), but in 3ds Max, ohhhh boy I almost tore my hair out on more than one occasion.
If you're planning to do a pelt unwrap as described here, please swap this unwrap step with the mirroring step, and perform your mesh mirroring first. If you plan to use the 3ds Max script for unwrapping, please perform this step first and then move on to mirroring.
UV unwrapping is the process of unfolding the mesh onto a flat 2d plane that describes which part of a texture is applied to which part of a mesh. Think of it like taking a completed papercraft model of a car and unfolding it back to a flat sheet. In most games, UV mapping is important for how the actual visible textures on objects appear, but in Automation, it's mostly important for how the fixture system works. When you place certain fixtures (such as lights, a grille, or door handles) onto the car, it projects a fixture-shaped hole onto the alpha (transparency) channel of the car body.
For the holes to be projected correctly, you must unwrap the car as one complete piece, without any separate islands of polygons. Otherwise, fixtures can project across multiple parts of the car and give you holes in unwanted places. The UV unwrap must also give a fairly even amount of texture space to each area of the car, as any low-resolution areas will cause jagged holes around the outside of fixtures; this is called "tearing".
It is for all of these reasons that the unwrap of a car mod has to be what's called a "pelt" unwrap (named for its resemblance to a flat animal pelt). For Automation cars, it looks like this:
Unwrapping a car with a pelt unwrap
Make sure your car is one element
This part is important, as it defines how the pelt unwrap works, which in turn determines how the fixture system cuts holes in the car. If parts of the car are not connected in both the 3D viewport and the UV viewport, the fixture will cut out an incorrect hole.
This only applies to the car itself, not to the bounds boxes. The bounds boxes do not need to be correctly unwrapped, as they are invisible and do not contribute to the fixture stamping. Any lip placement areas, however, must still be properly unwrapped despite the material being invisible; otherwise, tearing across the body can occur.
In 3ds Max, enter the Edit Poly modifier and click Element mode. Select one face of the car, and hide unselected faces. In Blender, select one face of the car and press Ctrl+L to select linked faces, and Shift+H to hide unselected faces.
Doing the pelt unwrap
However it's done in your choice of 3D application, perform a pelt unwrap on your car. In Blender, it looks like this:
Next we need to orient the unwrap so that the centre of the car in the UV sits on the centre-line of the Y axis, and scale the unwrap up so that it covers as much of the UV space as possible:
Make sure this unwrap exists on both the first and second UV channels. The first channel will be used to calculate the normals, and the second channel will be used to calculate the fixture cutouts.
Unwrapping a car with the 3ds Max unwrap script
From the Car Body Export Helper utility (located on the Utilities tab, with the hammer icon, in the top right of 3ds Max), press the "Unwrap Car Body" button. If you don't see this menu, go to utilities, then click on MAXScript, which will bring up the Car Body Export Helper option; then, click on the name.
The UV unwrap should now be complete, and with the UVTESTING map applied, the result should look something like this:
Note for finished bodies made via the 3ds Max script
If you've finished your body and have it running in game, and it looks like this whenever you add fixtures...
...then the UV maps are broken. You need to follow the steps below to fix the UV maps.
Start off with your un-mirrored, but complete body.
Apply the UV Test material and unwrap your body (which at this point is only half) with the Car Body Export Helper Tool.
Add the Unwrap UVW modifier. Under the Channel panel, navigate to the Map Channel box and change the "1" to "2".
There should be a pop up. Click Move.
Now move your Unwrap UVW modifier so that it sits below the Skin modifier.
Select your car object and mirror it using the Car Body Export Helper Tool. After mirroring you will notice that your Unwrap UVW modifier has disappeared.
In conclusion: unwrap the body and apply the Unwrap UVW modifier. Change the Map Channel to "2" and then click Move, after which you will move the Unwrap UVW modifier below the Skin modifier.
You can now follow the export steps to re-export!
Mirror the Half Body
The traditional method
- Mirror your mesh.
- If you've already unwrapped your mesh without mirroring the UV maps via modifier setitngs, select the mirrored half, and flip the UV of that half along the Y axis:
- Duplicate the bones for the wheel flares on the opposite side, matching the distance from the centreline. Set the name of the mirrored half to the same as the un-mirrored half with "_opposite" at the end of the name of the bone. Duplicate the bone weighting from the non-mirrored half, rename it to match the mirrored bone, and clear the weighting for each on the opposing side so that the weighting for each wheel flare only includes the respective wheel:
If you're using the optional 3ds Max script
Mirroring is simple; from the Car Body Export Tools utility, just press "Mirror Car Body". This will mirror the mesh, mirror the UV unwrap, and duplicate the required bones.
Fix Everything You Just Broke Mirroring the Body
If you're using the 3ds Max script
Check wheel arch bones have their opposite counterparts created
Wheel arch bones require an opposite bone. This is to allow the game to morph the wheel arch on the other side of the body to the same length, but in an opposite direction to that which you have moved. (The same applies to any other bone that moves along the X axis, e.g. a running board morph).
When the mirror script is run, it determines which bones require an opposite by checking all the vertices on the zero X axis for each bone. If none of these vertices have a weight value, the script will create an opposite bone.
If, after running the script, your double-sided body does not have the expected opposite bones, then you will need to go back to your original half body and check that none of the vertices for that bone on the zero X Axis has any weight applied to it. Remember that zero weighted bones still count as having a value, and you should use the Remove Zero Weights button to remove these.
One method to check for weights on the zero X axis is as follows:
- Ensure that all vertices of your mesh are visible.
- Select all the vertices along the zero X axis.
- Open the weight table (found in the weight properties rollout).
- Set the weight table view to selected vertices.
- Scroll down the list of weight for the bones in question. Any weighted verts should be easy to spot, as there should not be any. These can be zeroed by right clicking the weight value. (You may want to make note of any weight values for other bones (excluding the root bone) on that vertex, as these may alter as a result of the above and you will want to correct them.
- Once all erroneous weights have been zeroed, use the Remove Zero Weights button.
These steps should ensure your opposite bone is created when the mirror script is run again.
Ensure other bones do not have opposite bones when not required
In some cases, your body may have bones that are purposely designed to morph vertices on the outside of the body that are not intended to move along the X axis (e.g. The "Hofmeister kink" found on the
10sSedan02 series of bodies). The mirror script may create an unwanted opposite bone for these.
This can be avoided by temporarily weighting a vertex on the zero X axis to the bone in question. Ideally, pick a vertex that is weighted only to the root bone so as not disturb the weights of other bones. Once the mirror script has been run, you can remove the temporary weight applied to that vertex.
Check that both halves of the body are welded together
The mirror body script should weld both halves of your body together, but for reasons (3ds Max is spaghetti), this does not always occur. This can be seen by your body having an unexpected crease or seam down the centre.
Once you have welded the two halves together, perform a visual check to ensure that no unintentional welds have taken place. e.g. top and bottom vertices on a window frames. If this happens, undo your weld command and select the centreline vertices in smaller chunks, and avoid selecting the vertices in question at the same time.
Check skin for distortion along the centreline vertices
When two skinned vertices are welded together, either automatically via the script or manually, 3ds Max will attempt to combine the weights of both the old vertices into one. Unfortunately, it's not very good at it, and many of the welded vertices on the centreline end up with odd weights. This results in a distorted skin (see below). This isn't an issue with Blender.
To correct the distortion, you will need to check and correct the centreline vertices. The most methodical way is to start from one end of the body and work your way to the other end as follows:
- Expand the skin modifier and select Envelope.
- Open the weight table and set to selected vertices.
- Select the central 3 vertices at one end of the body and view the weight values in the table.
- Where the mesh is distorted, you will usually see one vertex in the weight table that's the odd one out.
- Amend the values of this vertex to match those on either side of it. (For vertices with more than 2 bones, you may need to untick normalize to stop Max from altering your amendments—remember to re-enable it once completed).
- Repeat the above steps, working along the body until you reach the other end.
Check that the same UV maps exist on the first two UV channels
In 3ds Max
To Check the maps:
- Under the utilities tab click on the More... button.
- Select "Channel Info" from the list and click OK.
- Click the newly available Channel Info Button and review the channel info.
The bottom 3 lines of the above screenshot represent the 3 UVW maps. In this case, the maps are identical, as they should be. If, however, there is a mismatch between the three maps (from either null data or different numbers of vertices), they will need to be be corrected. If your body does not have 3 maps, see here.
In most cases,
1:map is the correct one. One method of correcting the maps is as follows:
- In the Channel Info box, select the line representing the correct map.
- Select Copy.
- Select one of the incorrect lines.
- Select Paste.
- Repeat for the other map if it's also incorrect.
- Close the channel info box and click on the modifier stack tab.
- Move the UVW Mapping Paste modifier(s) to between the skin and the mesh.
- Collapse the modifiers into the mesh.
Open the Object Data menu and select the UV Maps submenu. Open a UV editor and check that the UVs look correct in the first two UV channels.
If one of these is not correct, delete it and simply duplicate the correct one.
Export Car Body to .FBX File
In 3ds Max
This step is easy!
1: Select the car body, then go to File > Export > Export Selected
2: Save the FBX file somewhere. It won't actually be distributed with the mod when complete, but name it well, and put it somewhere in a properly named folder, where it'll never need to be moved or renamed. If you move it, UE4 will get confused if you try and reimport it, which you'll need to do if everything isn't perfect, and nothing is ever perfect.
3: Make sure your export settings look like this image:
- Select the armature, and then the mesh, and then go to File > Export > FBX.
- Save the FBX file somewhere. It won't actually be distributed with the mod when complete, but name it well, and put it somewhere in a properly named folder, where it'll never need to be moved or renamed. If you move it, UE4 will get confused if you try and reimport it, which you'll need to do if everything isn't perfect, and nothing is ever perfect. Make sure your export settings match like so:
The animation tab doesn't matter, as we don't use animations. You are now ready to import your body to Unreal Engine!
Import Car Body to Unreal Engine
Now it's time to bring all your hard work into Unreal Engine.
Follow the Modding page for installing and opening the Automation Modding SDK.
If you've never used Unreal Engine before, now is a great time to watch this introduction to UE4 playlist from Epic. It's for a fairly old version, but most of it still applies.
Creating your Car Body Mod
Press the Create Mod button in the top bar of the UE4 Editor.
Select the Blank Project, and fill the wizard out with all of your details, such as your name and a short description of the mod you're making. Then, click Create Mod to generate your plugin files.
The Content Browser window should now show your plugin content. This is where you'll put all of your mod files. Never modify any files outside of your plugin file. you can copy materials and such from the main content folder, but only if those files are copied to your mod folder. The end result of your mod should be a default content folder that is identical to the default state of the SDK, and all of your own modified files are within the one plugin folder you want to release.
You should now have an empty content folder:
Importing your car body to the mod folder
Press the Import button in the Content Browser with your mod content folder selected to import your car body FBX file.
In the following pop-up import options, make sure the following settings are exactly as described:
- Skeletal Mesh should be set to True
- Import Mesh should be set to True
- Skeleton should be set to None
- Import Meshes in Bone Hierarchy should be set to False
- Import Morph Targets should be set to True
- Normal Import Method should be set to Import Normals and Tangents
- Material Search Location should be set to All Assets
- Material Import Method should be set to Do Not Create Material
Once you have configured the import dialog correctly, press Import, or if you are importing multiple car bodies, press Import All.
You should now have a Skeletal Mesh (pink icon), a Physics Asset (yellow/brownish icon), and a Skeleton (light blue icon) in your mod content folder:
Check the Materials
The materials applied to the car body denote what part of the car that is. They aren't so much placeholder materials as they are identifier materials; the materials that are applied to the car determine the category of paint on that material slot in-game.
Double click on the Skeletal Mesh for your car. You should then see a screen like this:
If instead, when you import a car, you see something more like this, then you will have to apply your materials manually:
The materials to apply to the correct slots on your car body are located in
Descriptions of the materials to apply are found in the Car Body Material Options step.
Set Car & Chassis Data
Create car body variant data
This is the file that will contain all the stats about your car; how many seats it can hold, how many doors it has, what the wheelbase is, etc..
Create a Body Variant Preview Data object in your mod folder from the Add New menu.
Name your Body Variant Preview Data file correctly. The name of this file will determine the name of the body in-game.
Open the Body Variant Preview Data file. In the top field, drag and drop, or use the arrow button, to put your skeletal mesh file into the Skeletal Mesh data field.
The data inside the Body Variant Preview Data file determines the stats of your car design. The data is set within the file, but updates in real-time in the body edit scene, which you should open first. Opening the body edit scene and loading your car will help you visualise what all the data in this file translates to in-game.
Loading a Car For Editing
On the top bar, select the drop-down menu next to the
Play button, and select
This will start simulating the "game" (in this case, the thumbnail generator level). It is important that everything you do in this level is done while you are simulating the level.
World Outliner, search for the
BodyEditSceneBluetility. This utility will be the interface between the level, which will have your car loaded in it, and your Car Body Variant file.
In the Details panel of the
BodyEditSceneBluetility, you will find buttons and options for loading your car body.
Load Body and
Unload Body menu options will do just that—load and unload your body—but you have to specify the body you want to load first, which is done in the Variant Asset menu.
Select your Body Variant file from the content browser, and put it in the Variant Asset list by either dragging and dropping it in to the icon, or by pressing the arrow button next to the icon.
Load Body, making sure that you are Simulating.
You should now see your car loaded into the scene. You can begin to edit the data within the
Body Variant file and see it update in real time in the scene, which is really helpful for setting chassis data.
What all the Body Variant settings mean
- Skeletal Mesh is the physical mesh of your body.
- Car Material Settings are the default materials that should be applied to your body when a player loads it in-game.
- Mesh Data is a generated file that you dont need to worry about. We'll make one of these in the thumbnail generation stage.
- Bone Constraints are the physical limits of where bone morphs can be affected. This is an advanced menu for if you want to enter these manually. For most poeple, we have an easy system for assigning these bone limits in the bone limit setting stage. If a bone does not have limits, the player will be able to drag the bones around in any direction they want, as far as they want, and this almost never ends well. Note that morph targets don't need to have their limits set.
- Family GUID is an unique identifier that is shared between all variants of the same body family. If you are making more than one car body in the same family, they should all share the same family GUID.
- Variant GUID is an unique identifier that is unique for this body. Every body in Automation needs to have an unique GUID. If you, by chance, happen to generate or use the same Variant GUID as another body, when you try and select one the game may instead chose the other for you. If this happens, generate a new Variant GUID.
- You shouldn't have to set anything here. These will be populated in the thumbnail generation stage.
- Variant Body Type determines the category of the body in-game. Different categories have different advantages and disadvantages.
- Year is the year that this body unlocks in Campaign. Bodies that are closer to the current year (and thus more recent) score better in some categories.
- Doors determines the number of doors on this body, which affects some demographics' statistics.
- Maximum Seat Rows determines the maximum number of seat rows your body can have. This affects some demographics' statistics.
- Is Release Ready is a dev feature we use to allow us to configure and adjust bodies that are not ready to be in-game. If this box is unticked, you will not be able to see it in-game.
- Seat Options is a legacy option that is no longer used.
- Front Suspension To Disable will disable those suspension options for this body. This is useful if your body is shaped such that certain suspension types clip through the body, and you cannot solve it elsewhere.
- Rear Suspension To Disable will disable those suspension options for this body. This is useful if your body is shaped such that certain suspension types clip through the body, and you cannot solve it elsewhere.
- Is Softtop Convert will set this body as a convertible with a soft top. This is for demographic calculations.
- Is Hardtop Convert will set this body as a convertible with a hard top. This is for demographic calculations.
- Cargo Subtracts will subtract the cargo volume from the cabin space in vehicles with a shared passenger and cargo area (wagons, MPVs, and such). This is useful for making cars where the more seat rows a body has, the less cargo space it has.
- Engine Placement is an array containing all the available engine positions for this body.
- Wheelbase is the wheelbase of the body in centimetres. Set this before setting anything else for best results.
- Track Width is supposedly track width in centimetres, but isn't actually measured accurately. Don't try and match it to real figures; just make sure the wheels sit correctly in the mesh (with correct tyres) and that there is enough room left in the wheel arches to make the tyres as wide as makes sense for the car (which might include having to use arch flare morphs). If you need room for wider tyres, set this a little narrower.
- Y Offset is used to shuffle the mesh back and forwards to sit correctly in the middle of the chassis. If you're putting big numbers in here (more than 15, perhaps), you probably need to recentre your mesh.
- Default Suspension Height is used to set the default position of the ride height slider. Makes sure that supercars start off set low, SUVs start high, etc.
- Height Offset moves the car model up and down as compared to the chassis/wheels etc. This should usually be set so that with appropriate sized tyres, and Default Suspension Height set to 0, the wheels are nearly touching the top of the arches. Some cars might want to be set a bit higher (SUVs and the like), but remember that when a car is set to a ride height of 0, it has very little suspension travel, so you should be setting height offset on the basis of the lowest the car could possibly ever sit.
- Firewall Y is a 0-100 setting of how far forward the firewall is. Easiest to set in side view in Wireframe mode. Set to match your mesh's firewall. Important for engine bay size.
- Nose Length is used to set how far forward the engine bay goes. Important for engine bay size. Make sure the chassis doesn't stick out of the car, even when you've moved morphs around on the nose.
- Cab Over is a tick box to say whether the engine goes under the front seats of your car body. Affects some statistics. Used for vans, etc.
- Rear Wall Y is the firewall position for rear/mid engine cars. Ignore this value for front-engine-only cars.
- Tail Length is how far the back of the chassis goes. Important for rear engine bay size, but not very important for front-engine cars. Be careful that it doesn't stick out of the car.
- Max Wheel Diameter is the maximum wheel & tyre diameter in centimetres. Set this by adjusting the default tyre size to work out what the biggest practical tyre size would be, then putting that number here.
- Min Wheel Diameter is the minimum wheel & tyre diameter in centimetres. Set this by adjusting the default tyre size to work out what the smallest practical tyre size would be, then putting that number here.
- Default Wheel Diameter sets what tyre diameter is loaded on the car by default. Set it to something within reason for the car type.
- Default Rim Diameter sets what rim diameter is loaded on the car by default. Set it to something within reason for the car type. Remember to set it correctly for a tyre profile that makes sense for the type and age of the car. Older cars need high-ish-profile tyres, due to in-game restrictions on using low-profile tyres in early eras.
- Default Wheel Width sets what tyre width is loaded on the car by default. Set it to something within reason for the car type.
- Cd: Drag Coefficient (not including cooling drag) - You can use this calculator to estimate https://docs.google.com/spreadsheets/d/1eIZKdCemwtb8KQJK4aQzicIyN80ESoDY2FN7UPR7JV0/edit#gid=588180347
- Cl Front: Front Lift Coeeficient - You can use this calculator to estimate https://docs.google.com/spreadsheets/d/1eIZKdCemwtb8KQJK4aQzicIyN80ESoDY2FN7UPR7JV0/edit#gid=588180347
- Cl Rear: Rear Lift Coeeficient - You can use this calculator to estimate https://docs.google.com/spreadsheets/d/1eIZKdCemwtb8KQJK4aQzicIyN80ESoDY2FN7UPR7JV0/edit#gid=588180347
Path (Legacy Class)
- This is a legacy option for older bodies. You shouldn't need to touch anything in here unless you are converting a pre-UE4.24 mod.
- This contains all the sizes and positions of the body boxes, and are generated automatically in the thumbnail generation stage.
A note on convertibles
Convertibles should have their body tag set to the type of body they are aside from being convertibles, and to set the 'soft top' or 'hard top' convertible values separately. The 'convertible' body type is no longer used.
Set Bone Limits
Once you've set all the other car body settings, you'll need to set the limits for bone movement.
While simulating in the car body scene, make sure your car is loaded and select it.
You should now see a set of blue squares at the locations of your bones as you set them in your modelling program. Click on one of these blue squares, and start to move it along an axis to see how it affects the body. You can set the current position of the bone as the new limit of that bone by right clicking on it and selecting "Add to limits".
Right-click on a bone and select "Move all bones to bind pose" to move the bones back to their default location.
Note that if you accidently set a bone's limits too far, there are two ways to fix it: you can either right-click "Reset Limits" and then set the limit again, or (if you know what you're doing) type a new limit into the appropriate axis of the corresponding bone in the Bone Constraints array.
The following other options on right-clicking a bone are as follows:
- "Move all bones to max" will move a bone as far as possible in the positive axes it can move.
- "Move all bones to min" will move a bone as far as possible in the negative axes it can move.
- "Reset limits" will remove all limits from a selected bone.
- "Move all bones to bind pose" will move all bones back to their default positions.
Bones that appear red are bones that exist as part of the skeleton but aren't weighted to any vertices on the car.
While simulating, load your car body.
In the Body Edit Scene Bluetility, click Generate Thumbnail.
You should now have two more files in your mod content folder, but don't let their lack of an "unsaved" asterisk icon fool you: these files do indeed need to be saved. Right-click the files and save them manually; otherwise, they will indeed stop existing.
You are now done creating all the files and settings you need! You can now export your mod body.
For additional body variants
For additional variants, repeat the same process for each CPP. If you copied the CPP from one variant and edited it for a new one, this will replace the original thumbnail. To avoid this problem, clear the thumbnail (and mesh data) from "Variant Preview Texture" on each additional variant before generating their thumbnails.
Export Your Car Body
- In Unreal Editor, at the top toolbar, select "Share Mod" and then click on the name of your car body.
- Select a path where there are no spaces in the file path. As an example,
C:\Users\Name\Documents\Unreal Projects\AutomationGamewill not work, since the phrase
Unreal Projectscontains a space.
C:\Users\Name\Documents\ModExportwill work, because there are no spaces in the file path.
- Once your build is successful, you need to launch the "Automation - The Car Company Tycoon Game Workshop Tool" from your "Tools", which can be accessed by hovering over "Library" in Steam.
- Enjoy your new car body!
Q: I get a Max Script error running the script to unwrap my body like so:
A: Car bodies in UE use 3 UVW maps and your mesh currently has less. To ensure you have enough maps, take the following steps.
Q: I get a Max Script error running the script to mirror my body like so:
A: Save the body file as is, close 3ds Max, and then reopen the file. This fixes most instances of this error.
Q: Unreal won't open the SDK project files.
A: Make sure you're running the correct version of Unreal Editor. It should be version 4.24.3.
Q: I got my body in the game, but it looks weird whenever I apply fixtures.
A: Refer back to the UV unwrapping section, where this problem is addressed.