Car Body Format Changes

**Body Boxes
**

There has been a bit of a change in how car bodies are made for Automation. Basically the upper and lower body boxes (which are used to define weight, centre of gravity etc.) are now dynamic, and morph when the body does.

It’s pretty simple, all you need to do is skin them the same way you’d skin a cargo box currently, so that they change size in roughly the same way the car does when you move the bone they’re skinned to.

There are new materials for these boxes, they are

***ECS_BOTTOM_BOX
ECS_TOP_BOX


These are assigned in the LUA file, as usual.


It’s also important that the boxes be the diamond shape that is pictured in this screenshot. This is so that changing the slope of part of the car doesn’t increase the overall size of the car massively. The body boxes should only change when the car is made taller overall, or longer overall.

Convertibles

If you want a car to act correctly as a convertible stats wise, add the flag

ConvertSoft = true,

or

ConvertHard = true,
(for folding hardtops)

Quotation marks in Material listings

All materials in the materials list in LUA should now have quotation marks, like

*** “ECS_BODY”,***

Multiple Engine Placements

You can now have a body that can have the engine placed in the front OR rear in the same body.

A body that supported all engine placements would have THIS in the LUA file

***EngineTypes = {
FRONT = true,
MID = true,
REAR = true,
},


You’ll also need a second cargo box in the front (if that’s where the cargo space would be on a rear engined version. It’ll need the material

ECS_CARGO_REAR

(That’s rear meaning rear engined, not cargo in the rear)

Body & Cargo Box Troubleshooting

You can now type ToggleBounds() in the console (bring it up by pressing ~ )

You’ll need to enter this command AFTER you’ve chosen chassis and suspension.

It’ll show you the outlines of the body boxes and cargo boxes. This is useful for making sure they change size as expected, and that you’ve got them assigned to the correct objects.


Any Questions?

Ask here! I’ll probably do a video tutorial update soon, but this should get you going for now.

1 Like

Is the ECS_CARGO_REAR cargo box used for mid-engined configurations as well?

And could a rear engine car have two cargo boxes?

Some rear engined Skoda had space between the rear seats and the engine bay, admittedly they did tend to be filled with bags of crumpled newspaper for additional sound proofing.
Also there were a few rear engined wagons such as the vw type 3

If the game can accept two cargo boxes with the same mat, I think your suggestion should work.

Yes, sure is

[quote=“maffc”]

And could a rear engine car have two cargo boxes?

Some rear engined Skoda had space between the rear seats and the engine bay, admittedly they did tend to be filled with bags of crumpled newspaper for additional sound proofing.
Also there were a few rear engined wagons such as the vw type 3[/quote]

Because it looks at the furthest extents of verts with that material, I think it’ll just see the whole space between the two cargo boxes as one giant cargo box.

Might be possible still with one box, it’ll need a bit of careful planning with the overall sizing and morphing

…It’s very difficult “todo esto” xD.

With the old body mods, works well with the latest Automation update without making this?

Is there a maximum number of materials?
After I added the “ECS_CARGO_REAR” in the materials section, I got an error:
“Material number is 14. There is no material 14”

[quote=“ThomasD1962”]Is there a maximum number of materials?
After I added the “ECS_CARGO_REAR” in the materials section, I got an error:
“Material number is 14. There is no material 14”[/quote]

That means that in 3ds max you only have 13 material IDs on the car, but you’ve defined 14 materials in the .LUA file. Meaning that it’s trying to apply the material to an ID that doesnt’ exist.

Ok, so that line has to be included during the design stage and can not be added in the lua file.

Are you making a car or just messing around with pre-existing lua files?

Each 3D file has a certain amount of different materials IDs, set by the person who made the model.

In the lua file, you set which material ID should be rendered as which material ingame, for example, material 1 would be ECS_BODY on most cars I’ve seen.

If the 3D file has 13 material IDs, trying to add a 14th one in the lua file won’t do anything, you have to add that ID first in the 3D model.
[size=50] As well as probably fix all the materials since 3DS max likes to mess up the IDs for the lulz when you add new ones, but that’s an other story.[/size]

Yep, exactly that. When the car is exported from Max, it gets as many material slots as you have material IDs applied to that car.

You then specify in the LUA file which materials are applied in which slots. If you list 14 materials, and there are only 13 slots, then it’ll complain that it doesn’t know where to put material 14.

I was indeed messing around with the lua files.

Not sure where to best post this, but is there any chance the Kajira exporter will become available on the new 64-bit versions of 3ds Max?

I’m having issues where some of my bodies end up with a negative passenger volume and therefore 0.0 comfort. Is there any solution to that issue? The body boxes appear to be set up properly, as does the cargo volume.

Could you send me the car’s in-game files by PM?

I could try to see what is the problem. I know Felgen had issues at some point with the van but IIRC this was due to an improperly set upper body box, which resulted in negative passenger volume since it had CargoSubstracts set to true, but it doesn’t sound like the issue you are having.

Edit: If anyone else has similar issues, use the ToggleBounds() command and make sure all the boxes are the right color, as it will say in the console right after you enter the command.

3DSmax sometimes fudges up the order of the materials when exporting, and since those boxes are transparent it’s not as obvious.

Can anyone tell me how to change fenders position without changing firewalls? That
body supports both mid and front engines.

Sorry, AFAIK can be done. You need to change both values. You can also increase the value of the rear firewall over 1(my 90s GT1 body has a rear firewall over 3) to increase the size of the mid engine bay, however, when I tried that, if I used a front engine, the chassis didn’t match the body anymore.

The fender position is affected by two parameters.

“WheelBase” and “RearRatio”

Wheelbase being wheelbase (duh :stuck_out_tongue:) and RearRatio being a way to adjust the position of the platform compared to the shell model.

It shouldn’t mess the firewall up too much to change those out, but it’s usually preferable to adjust the platform size and position first and then adjust the firewall and overall length of it.

But, in your specific case, I think you are having other issues, since the wheels should be sitting nicely within the fenders no matter which parameters you are using.