Page 1 of 2

Car Body Format Changes

PostPosted: Mon Oct 05, 2015 11:35 am
by Daffyflyer
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.


Materials.jpg
Materials.jpg (90.82 KiB) Viewed 22912 times


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.

Boxes.JPG
Boxes.JPG (93.68 KiB) Viewed 22912 times









Any Questions?

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

Re: Car Body Format Changes

PostPosted: Mon Oct 05, 2015 6:46 pm
by TrackpadUser
Is the ECS_CARGO_REAR cargo box used for mid-engined configurations as well?

Re: Car Body Format Changes

PostPosted: Mon Oct 05, 2015 8:03 pm
by maffc
TrackpadUser wrote: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

Re: Car Body Format Changes

PostPosted: Tue Oct 06, 2015 5:39 am
by TrackpadUser
If the game can accept two cargo boxes with the same mat, I think your suggestion should work.

Re: Car Body Format Changes

PostPosted: Tue Oct 06, 2015 8:48 am
by Daffyflyer
TrackpadUser wrote:Is the ECS_CARGO_REAR cargo box used for mid-engined configurations as well?



Yes, sure is

Re: Car Body Format Changes

PostPosted: Tue Oct 06, 2015 8:49 am
by Daffyflyer
maffc wrote:
TrackpadUser wrote: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



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.

Re: Car Body Format Changes

PostPosted: Tue Oct 06, 2015 9:00 am
by maffc
Daffyflyer wrote: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

Re: Car Body Format Changes

PostPosted: Tue Oct 06, 2015 10:20 pm
by vmo
...It's very difficult "todo esto" xD.

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

Re: Car Body Format Changes

PostPosted: Wed Oct 07, 2015 3:57 am
by 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"

Re: Car Body Format Changes

PostPosted: Wed Oct 07, 2015 10:15 am
by Daffyflyer
ThomasD1962 wrote: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"


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.

Re: Car Body Format Changes

PostPosted: Wed Oct 07, 2015 7:26 pm
by ThomasD1962
Ok, so that line has to be included during the design stage and can not be added in the lua file.

Re: Car Body Format Changes

PostPosted: Thu Oct 08, 2015 10:23 am
by TrackpadUser
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.
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.

Re: Car Body Format Changes

PostPosted: Fri Oct 09, 2015 10:16 am
by Daffyflyer
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.

Re: Car Body Format Changes

PostPosted: Fri Oct 09, 2015 11:58 pm
by ThomasD1962
I was indeed messing around with the lua files.

Re: Car Body Format Changes

PostPosted: Mon Jan 18, 2016 7:17 am
by thecarlover
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?