Car Setup Tutorials For Trents Maxscript Tools.

The 2016 reincarnation of Carmageddon! Discuss, mod and troubleshoot!
User avatar
phlooo
pedestrian
Posts: 12
Joined: Mon Feb 22, 2016 2:19 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by phlooo »

Hi again,

I just tried this :

- Saved my previous model in .max

- Reinstalled 3ds Max and redownloaded the MaxScript (well, you never know, you know!)

- Opened a new empty scene with the script running

- Imported the .max

- Kept default materials, just applying an empty "Paint" to the body and an "Others" to other parts

- Resetted XForm for each part

- Followed the whole guide

Now when I export, i get this :

And I just get a totally empty engine.mdl file.
User avatar
Mad Mike
road raged psycho
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Mad Mike »

Yep, the structure.xml just contains the basic "<?xml version="1.0" encoding="utf-8"?>" even when export is reported "successful".

Edit: I tried saving the car on another hard disk, in the unlikely scenario where 3ds Max couldn't write correctly in the CarMODgeddon folder, but this didn't help at all.


And yes, the c_Body has all these modifiers, and every car part has the "CNT Hierarchy" modifier, I checked multiple times since it drove me nuts for the whole day :(


I really don't understand, maybe should I try from scratch with another model?

Sorry for the delay. Using another model might be a good idea.

For now, just create a box, convert it to an editable mesh, name it 'c_Body'

  • - Run 'setup hierarchy' & 'configure car structure' on it

  • - enable the base car characteristics (General Defence, Car Defence, Offense)

  • - then try exporting just that through 'Export Complete Car' with 'Export Struture.xml' enabled, and see if the structure.xml is still empty

EDIT: Just seen your new reply. Give me a few minutes to read it over :)

EDIT2: If you've got 'Convert textures to TDX' off - Add a 'Unwrap UV' modifier to your engine, and re-try exporting it
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
phlooo
pedestrian
Posts: 12
Joined: Mon Feb 22, 2016 2:19 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by phlooo »

Oh, just saw your reply too!

I just tried this: I used a Cap Holes modifier and collapsed it on my Engine model, then selected all vertices and colored them green.

The whole thing exported fine and the structure.xml now looks pretty good! I'm about to test importing it to the game now. If It doesn't work I'll try the steps you just gave me :)
User avatar
Mad Mike
road raged psycho
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Mad Mike »

Ok, good luck. Bear in mind that the engine should only have one green vertex as welds between 'Non-Crushable' to 'Crushable' parts must only ever have one vertex. If you have more than one, then the game will give warnings in the 'script_log', and ignore the extra vertices
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
phlooo
pedestrian
Posts: 12
Joined: Mon Feb 22, 2016 2:19 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by phlooo »

Mad Mike wrote:Ok, good luck. Bear in mind that the engine should only have one green vertex as welds between 'Non-Crushable' to 'Crushable' parts must only ever have one vertex. If you have more than one, then the game will give warnings in the 'script_log', and ignore the extra vertices
Of course, but the thing is, I can't figure out how to color just one vertex. I did it previously without any problem, but now even when 1 vertex is selected, they all get colored, idk why.

Yes I suck at 3ds Max hehe, I was just using Blender before

Edit: It WORKS. After a veeeeeeeeeeeeeeeeery long loading screen, the race started and the car works like a charm. After checking the log, I saw that the game listed every colored vertex that didn't have any Weld, hence the very long loading screen.

So my last problem now is this vertex colors thing. Is the correct method really this one :

- setting the object as Editable Mesh

- selecting Vertex selection

- clicking one vertex

- Clicking on the color rectangle inside "Edit Vertices colors"

- Putting the wanted color, and OK

?

By doing that all the vertices get the choosen color
User avatar
FatCat
mindless
Posts: 2643
Joined: Mon Jan 30, 2012 5:16 am

Car Setup Tutorials For Trents Maxscript Tools.

Post by FatCat »

Sorry to interrupt this thread but something caught my eye a little.

IS THAT A 1970s CHEVY chevelle SS?!?!!!

User avatar
phlooo
pedestrian
Posts: 12
Joined: Mon Feb 22, 2016 2:19 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by phlooo »

FatCat wrote:Sorry to interrupt this thread but something caught my eye a little.

IS THAT A 1970s CHEVY SS?!?!!!


hahaha

YES it is a Chevy SS!

I'm porting it from a GTA V addon car (not by me). Well, I'm trying.
User avatar
FatCat
mindless
Posts: 2643
Joined: Mon Jan 30, 2012 5:16 am

Car Setup Tutorials For Trents Maxscript Tools.

Post by FatCat »

make sure you credit the original author. ;)
User avatar
phlooo
pedestrian
Posts: 12
Joined: Mon Feb 22, 2016 2:19 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by phlooo »

Of course! I'm just trying to get used to how things work with Carma for now :)
User avatar
Mad Mike
road raged psycho
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Mad Mike »


Edit: It WORKS. After a veeeeeeeeeeeeeeeeery long loading screen, the race started and the car works like a charm. After checking the log, I saw that the game listed every colored vertex that didn't have any Weld, hence the very long loading screen.

So my last problem now is this vertex colors thing. Is the correct method really this one :


- setting the object as Editable Mesh

- selecting Vertex selection

- clicking one vertex

- Clicking on the color rectangle inside "Edit Vertices colors"

- Putting the wanted color, and OK


?


By doing that all the vertices get the choosen color

Congrats on getting it working :) Yes that is the process for setting the vertex colours.

Afterwards, if you want to verify the amount of vertices that have that colour, then input the colour into the 'Select Vertices By' box, and press select. The 'Selection' box will then indicate how many vertices match that colour.

Nothing else for me to say on top of what FatCat has just said, other than nice choice of muscle :)
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
phlooo
pedestrian
Posts: 12
Joined: Mon Feb 22, 2016 2:19 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by phlooo »

Thanks :)

Well this is wierd, it changes all the vertices at once, I don't understand... I'm gonna try some more.

Edit: Ok it appears that putting it to Editable Poly, selecting the vertex, assigning the color, then putting it back to Editable Mesh solves the problem. I don't know why.

Anyway, thank you very much for your support!

I'll keep you guys updated if I manage to finish the car :)
User avatar
Mad Mike
road raged psycho
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Mad Mike »

No worries. Good luck with the project :)
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
Trent
mindless
Posts: 2945
Joined: Wed Apr 05, 2000 9:08 am

Car Setup Tutorials For Trents Maxscript Tools.

Post by Trent »

phlooo wrote:It depends actually. I got this error multiple times :

--Runtime error: Map support not enabled for specified map channel: 2


but after reapplying a material to the 4 wheels (the ones created by the script), it exports fine without any error...

I'm late to the party, but that error means a mesh is missing a vertex colour channel. You should make sure that any vertices which aren't used for welds or the driver box (green, red, blue or purple as the common colours for those) should be set black with the alpha set to 1.0. I'll try to fix the next version to automatically apply a vertex colour channel on export.

Another common reason why export fails is due to the texture vertices and normals not matching up to the geometry vertices, which often happens when you detach a piece of a mesh, but adding a UVW Unwrap modifier fixes that. I'll also try to find a way of getting this fixed for the next version too.
a.k.a. Brent
User avatar
Deadhart
motorised death
Posts: 935
Joined: Fri Jun 03, 2011 5:48 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Deadhart »

Oh yessss...

1970 Chevelle

*fapfapfapfapfap*
User avatar
Mad Mike
road raged psycho
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Mad Mike »


It depends actually. I got this error multiple times :

--Runtime error: Map support not enabled for specified map channel: 2


but after reapplying a material to the 4 wheels (the ones created by the script), it exports fine without any error...



I'm late to the party, but that error means a mesh is missing a vertex colour channel. You should make sure that any vertices which aren't used for welds or the driver box (green, red, blue or purple as the common colours for those) should be set black with the alpha set to 1.0. I'll try to fix the next version to automatically apply a vertex colour channel on export.


Another common reason why export fails is due to the texture vertices and normals not matching up to the geometry vertices, which often happens when you detach a piece of a mesh, but adding a UVW Unwrap modifier fixes that. I'll also try to find a way of getting this fixed for the next version too.

Thanks for that clarification Trent. I will update the troubleshooting section with that extra info.
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by starbuck »

Deadhart wrote:Oh yessss...

1970 Chevelle


*fapfapfapfapfap*

Golf Fap or regular Fap ? :)
User avatar
phlooo
pedestrian
Posts: 12
Joined: Mon Feb 22, 2016 2:19 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by phlooo »

Hey guys,

I'm having trouble finding time to finish the 70 Chevelle, as the model is actually pretty crappy due to conversion from GTAV's .yft format into .dff followed by import into 3DS Max... (It's actually the only way to convert a .ytd file as far as I know).

So, if you want I can provide you what I've done so far (which is not much) so someone could go on? What do you think?

The original car is made by user DragoN777 on gtamodding.fr (link)

Edit: It looks like that
User avatar
Mad Mike
road raged psycho
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Mad Mike »

Hey Phloo,

Sorry to hear/read you're having trouble. I'm afraid I've got a full build que ahead for when I resume Auto-Production, and can't add any more vehicles to it.

I wouldn't upload the files anywhere unless you've got permission from the original author. If you have their permission, then feel free to upload it, create a topic and see if there are any takers to finish it off.
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
Deadhart
motorised death
Posts: 935
Joined: Fri Jun 03, 2011 5:48 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Deadhart »

starbuck wrote:
Deadhart wrote:Oh yessss...

1970 Chevelle


*fapfapfapfapfap*



Golf Fap or regular Fap ? :)


More like vigorous multi-orgasm fap
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by starbuck »

Deadhart wrote:
starbuck wrote:
Deadhart wrote:Oh yessss...

1970 Chevelle


*fapfapfapfapfap*



Golf Fap or regular Fap ? :)



More like vigorous multi-orgasm fap

Soooo .... regular then :)
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by starbuck »

Mad Mike I had to reinstall Max and got that error message I mentioned before.

In your troubleshooting section this section was not there.

Here it is again.

add this to the 3dsmax.exe.config file
User avatar
Mad Mike
road raged psycho
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Mad Mike »

Mad Mike I had to reinstall Max and got that error message I mentioned before.

In your troubleshooting section this section was not there.


Here it is again.


add this to the 3dsmax.exe.config file


No it's in there, under Section '4'.
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by starbuck »

But the link one page 1 under that section linked to the bottom of page 1.

Its linking to here http://www.carmageddon.com/comment/77728#comment-77728

PS now https://code.google.com/archive/p/sea3d/wikis/CAS_Exception. doesnt exist anymore

EDIT Sample here works https://www.sigershop.eu/doc-troubleshooting/
User avatar
Mad Mike
road raged psycho
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Mad Mike »

starbuck wrote:But the link one page 1 under that section linked to the bottom of page 1.

Its linking to here http://www.carmageddon.com/comment/77728#comment-77728


As well as for some odd reason that way is not working anymore.


Do you have a copy/paste of exactly how the text looks. I cant seem to find the exact location anymore.


Can you look at yours and please copy and paste just that area for me ?


PS now https://code.google.com/archive/p/sea3d/wikis/CAS_Exception. doesnt exist anymore


EDIT Sample here works https://www.sigershop.eu/doc-troubleshooting/

I don't know where you are clicking, but the link attached to the title 'Troubleshooting & Tips for testing vehicles' on the start of this topic links to Comment #80205. The only way you can get to Comment #77728 from the start of this topic is through 'Setup.LOL' & 'Vehicle_Setup.CFG' parameters'.

Regardless, I had inserted the code...

           


...on the penultimate line before in 3dsmax.exe.config.

Anyway, the relevant link on the troubleshooting section has been updated.
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by starbuck »

Page 1 "Setting up the tools" under the white text box "To deal with this error, you will need to make a change to the "3dsmax.exe.config file". Head to the "Troubleshooting section" for instructions." There is an underline link line under the quoted words.

goes to http://www.carmageddon.com/comment/77728#comment-77728

I can take a screenshot for you.

Here I will copy paste if I had quoted it "To deal with this error, you will need to make a change to the "3dsmax.exe.config file". Head to the Troubleshooting section for instructions."

Removed URLs Head to the comment/77728#comment-77728]Troubleshooting section[ for instructions."

click that link and see where it takes you.

You link to 77728 which doesnt dicsuss the config file

Cmon Mike I wouldnt have brought it up if it didnt take me there :P
User avatar
Mad Mike
road raged psycho
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Mad Mike »

So, you're actually referring to post #4 still using the old link from when the Troubleshooting section was part of comment 77728. It would of helped if you had said that you were referring to post #4 in the first place, instead of 'In your troubleshooting section this section was not there.' - Fact of the matter is it has always been present in the Troubleshooting section, regardless of the link in post #4 being incorrect.

Thanks for sending me a wild goose chase over the contents section :P
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by starbuck »

Mad Mike wrote:So, you're actually referring to post #4 still using the old link from when the Troubleshooting section was part of comment 77728. It would of helped if you had said that you were referring to post #4 in the first place, instead of 'In your troubleshooting section this section was not there.' - Fact of the matter is it has always been present in the Troubleshooting section, regardless of the link in post #4 being incorrect.

Thanks for sending me a wild goose chase over the contents section :P

I did. Remember when I posted this "But the link on page 1 under that section linked to the bottom of page 1."

I mean how many pages do you have the link next to the 3ds Max Error ? I see only one when I try to find it :P

But thanks for sending me all over the net on a wild goose chase LOL.

Thanks for fixing it. After skimming around it seems like your tutorial is looking better. I am going to do a basic car soon after Trent and I discuss the bugs (errors, whatever) I am finding. I dont want to start a project and find I need to take 100 steps back. :)

looks like I will have to download them a fifth time LOL.
User avatar
Mad Mike
road raged psycho
Posts: 1233
Joined: Wed Aug 03, 2011 8:30 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by Mad Mike »

I did. Remember when I posted this "But the link on page 1 under that section linked to the bottom of page 1."
How and where does that say Post #4? Your original post stated "In your troubleshooting section this section was not there." The wording there suggested that the troubleshooting sub-section pertinent to the CAS exception is missing from the troubleshooting section, not that the entire troubleshooting section is missing.

Furthermore, your follow-up of "But the link on page 1 under that section linked to the bottom of page 1." did not specify a section, so the logical inference is that it is the initial post on page 1 (contents section), and as I said in my earlier response, the links there are correct.

You can nitpick as much as you want, but I stand by what I said. In future, including the post number or the title of the post (in this case, it was Level 1 - Chapter 3 (Part 1)) will make things a lot easier. :)

Anyway, good luck with your car. :)
One man... Alone... Wrecking opponents in the Automobile he loves.
Twitter Manifestation. - Mods for Max Damage.
User avatar
LuckyMike
hit n run
Posts: 239
Joined: Thu Jan 07, 2016 8:51 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by LuckyMike »

I spent the whole day on the replacement of the engine on the car. Then I realized that the export model MDL's no longer works.

Then i try to move suspension, and body (c_body) on other car. Then I realized that the export model MDL's no longer works.

Then try to scale all model, and... the export model MDL's no longer works.

Sometimes just import an error occurs, and some parts are displaced from their positions.

If export item with a large number of polygons in the MDL, it turns out a mess.

If you import detail with large number of polygons, the import takes up to two hours.

It's such sadness.
User avatar
Trent
mindless
Posts: 2945
Joined: Wed Apr 05, 2000 9:08 am

Car Setup Tutorials For Trents Maxscript Tools.

Post by Trent »

Nice poem. Could you give some more information about what exactly is going wrong because exporting MDLs should work fine unless something very weird is happening.

If you're importing models and then scaling them up or down you need to make sure "Bake Scale Into Mesh" is ticked in the CNT Hierarchy modifier otherwise the MDL's scale won't be affected, only the CNT node scale. Cars also can not have CNT nodes with a scale other than 1 because the game does not like that, so you need to bake the scale into the meshes.

If you're just moving parts of a car around then exporting the MDLs won't make a difference in game because you actually need to export the CNT as that holds the position information of the various MDLs in a car.

What are the actual import errors you are getting? Open up the MaxScript Listener (Utilities tab->MAXScript button->Open Listener), copy the error log and post it on pastebin.com and link me to it so I can see what is actually going wrong.

Yes, if you import a large, complex model it will take a long time depending on the specs of your machine. The script isn't exactly 100% efficient at the moment and it's dealing with a huge amount of data which has to be manipulated into a format which 3DSMax likes. I am in the process of re-writing the import/export systems to be a lot more efficient but due to the size of the data sets involved it will never be blazingly quick for models with a lot of polygons.
a.k.a. Brent
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by starbuck »

I think I see how LuckyMike feels. It also takes forever if at all to open a CR car with his tools (no offense I know you do good work)

Perhaps it might help to get a basic car model that was just designed to get into the game so we can preview it and get an idea of how it actually works ?

I cant remember if I asked this before Mike (or anyone else) does somebody have the most basic car so we can get a sample of what we need ?

Sorry , forget it. I found a basic Eagle in my "library" of files. Too bad it didnt load the stuff like "Welding details" etc.
User avatar
LuckyMike
hit n run
Posts: 239
Joined: Thu Jan 07, 2016 8:51 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by LuckyMike »

Perhaps it might help to get a basic car model that was just designed to get into the game so we can preview it and get an idea of how it actually works ?

For me the most simple is a police cars. They have nothing detachable, flappable, and driver, engine, windows, but they have a working suspension. Yes, it helped a lot to understand of how it actually works. At the APC has a steering wheel, but there is no driver seats and other interior parts. :-)

I was not able to create a car according to the instructions of Mad Mike Tutorials. I think I'm missing something...

I tried to change the simple c1 cars by Trent, but it does not work. I think Trent did something special with this cars. :-)

"Bake to mesh" function work, thanks for help Trent!
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by starbuck »

LuckyMike wrote:
Perhaps it might help to get a basic car model that was just designed to get into the game so we can preview it and get an idea of how it actually works ?


For me the most simple is a police cars. They have nothing detachable, flappable, and driver, engine, windows, but they have a working suspension. Yes, it helped a lot to understand of how it actually works. At the APC has a steering wheel, but there is no driver seats and other interior parts. :-)


I was not able to create a car according to the instructions of Mad Mike Tutorials. I think I'm missing something...

I tried to change the simple c1 cars by Trent, but it does not work. I think Trent did something special with this cars. :-)


"Bake to mesh" function work, thanks for help Trent!

I made a model with textures and did Mikes tutorials. It took me 3 tries to understand what was going on. So far it works and right now I am on learning how to setup the XML files. Give it a few restarts and save as a different name each time you finish a section. You will be able to get it. Start with the very basic car.

Only thing I had trouble with so far is the "Driver box colors" . I dont understand all all how to change Vertexes colors. If Mike or Trent could help me understand how to do it in Max (in easy to understand English :) ) that would really help.
User avatar
Trent
mindless
Posts: 2945
Joined: Wed Apr 05, 2000 9:08 am

Car Setup Tutorials For Trents Maxscript Tools.

Post by Trent »

Like I said, if you are having a problem explain exactly what that problem is and what you are doing and we can help you. Just saying "It does not work" does not give us any information about what your problem is which makes it next to impossible to help you make it work.

I did nothing special with the C1 cars at all, I just created the relevant nodes, linked them together, set whatever settings were needed and exported it.

Starbuck: you set vertex colours by selecting the vertices you want to set the colours on and, in the edit mesh or edit poly modifier panel where it says "edit vertex colors", set the vertex colour.
a.k.a. Brent
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

Car Setup Tutorials For Trents Maxscript Tools.

Post by starbuck »

I saw it under "Edit Mesh". Didnt see it under what I normally use "Edit Poly".

What do we do if the game crashes to the desktop and there is no error listed in the "Script_Log" with anything about our car ?

Only thing in there was a reference to "Could not Load Texture: 'spatter_X' for material 'Data_Core\Content\Vehicles\(every other car in the game)\Paint" ?