Silent Crash Using Custom Truck Body

Tutorial: www.mtm2.com/~mtmg/repaint/index.shtml
Post Reply
User avatar
OG_RuDeE
Member
Posts: 147
Joined: Fri Apr 28, 2023 4:11 pm

Silent Crash Using Custom Truck Body

Post by OG_RuDeE »

I'm messing around with getting a custom body (silly cybertruck) into the game just for fun. I've gotten the body down to 551 verts and 991 faces (see the BinEdit screenshot with no windows or nunderbody). More complicated bodies load fine as props in tracks (see other screenshot from in-game), but won't load as the body of a truck. So, I keep simplifying the model and trying to use it as a body with no luck. After mounting the pod and firing up the game, it just silently crashes, and I have to kill it from Task Manager. Any ideas would be appreciated.

Image Image
User avatar
Cale
Member
Posts: 677
Joined: Mon Oct 27, 2003 7:28 pm

Re: Silent Crash Using Custom Truck Body

Post by Cale »

Check the .TRK file and make sure there's nothing in that that is wonky first, especially the scratch points. The body itself should not be a problem, I have 2000+ vert trucks that load in game fine.
User avatar
OG_RuDeE
Member
Posts: 147
Joined: Fri Apr 28, 2023 4:11 pm

Re: Silent Crash Using Custom Truck Body

Post by OG_RuDeE »

Thanks, Cale. I have just taken an existing .trk file and replaced the model name with my model's name without editing scratch points at all. Do I need to adjust these to fit my model?

Copilot also claims that I need to break my model into "model groups" (so not face or vertex groups) that don't exceed a certain size, something like 300 vertices per part. I checked out your bigfoot shinetest model, and it follows similar restrictions. Is that a thing?
User avatar
OG_RuDeE
Member
Posts: 147
Joined: Fri Apr 28, 2023 4:11 pm

Re: Silent Crash Using Custom Truck Body

Post by OG_RuDeE »

A little more info: I'm experimenting with making a blender import / export plugin based on Jpez's Monvert app, and I've used various versions of my exporter to create my bin models.

I've worked out lots of kinks, and at the moment the importer can correctly import a bin into Blender, with the model broken down into parts corresponding to the texture of each part, and the bin exporter preserves the "group" structure of these parts. Everything looks correct in BinEdid 2.2.8 and in Traxx and as tack models, but I just can't get the models to work as truck bodies.

As an experiment, I took Cale's shinetest bigfoot, imported the bin into blender, and it looks great beyond a few random loose faces (say 10 or so in total). I then export a new bin with my plugin. Check it out in Binedit (looks great), change all faces to MTM2 face type and save. I use the same trk as Cale's bigfoot, only changing the model name to the new test model I've created, and even this new model silently crashes the game.

So, at this point, I guess I am kind of stuck. :lol: I just don't have the knowledge to troubleshoot any further, feels like I'm shooting in the dark. Also, I think copilot is just full of bull on a lot of things, which definitely makes thinks more interesting!

Happy to share what I have so far with anyone who wants to experiment. Should work fine for creating track models, but of course, don't use it to rip off anyone else's work. 8)
User avatar
Cale
Member
Posts: 677
Joined: Mon Oct 27, 2003 7:28 pm

Re: Silent Crash Using Custom Truck Body

Post by Cale »

Are there any unused verts in the models that get exported?
User avatar
OG_RuDeE
Member
Posts: 147
Joined: Fri Apr 28, 2023 4:11 pm

Re: Silent Crash Using Custom Truck Body

Post by OG_RuDeE »

Not that I can tell. Deleting unused verts in BinEdit doesn't lessen the number of verts in the model. Since you asked I also tried merging nearby verts using 2 units distance. This did lessen the number of verts, but didn't help the model load in game.
User avatar
Fila
Member
Posts: 1809
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Silent Crash Using Custom Truck Body

Post by Fila »

A silent crash means that the model is overruning a buffer/pointer in the game. Two things to note: 1. your model is one way or another broken 2. it exposes a bug me (or the AI) has missed which is to safeguard against buffer/pointers/memory leaks.

I am not going to make it a priority, first wanna do the menus and the bugfixes that were reported in the .49 thread but if you upload the truck, I will eventually look into what is crashing it and at least safeguard against the crash. Maybe in the meantime figure out if the truck really is broken or just exposes a weird edge case.
User avatar
OG_RuDeE
Member
Posts: 147
Joined: Fri Apr 28, 2023 4:11 pm

Re: Silent Crash Using Custom Truck Body

Post by OG_RuDeE »

Thanks Fila.

Here's a zip containing both the test "track" with the working Cybertruck body model, and the truck using the exact same body model that show up in the track:
https://drive.google.com/file/d/19PVwtq ... drive_link

Truck pod depends on Cale's HD Final release: https://mtm2.com/%7Etrucks/dl.php?dl=6550

I can only imagine that the exporter is making a faulty bin, but it is faulty in a way that only trucks care about.

I mentioned above that I did a test with one of Cale's models too, imported it into blender then exported as bin, and that model crashes the game too. So, presumably something my exporter is doing wrong.
User avatar
Fila
Member
Posts: 1809
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Silent Crash Using Custom Truck Body

Post by Fila »

Would be cool to get blender to work with the game. Would make creatings models so much easier.
User avatar
Fila
Member
Posts: 1809
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Silent Crash Using Custom Truck Body

Post by Fila »

I guess one of the questions is... from here onwards we can make the game kinda do anything, the question is... how backwards compatible do we wanna try and keep it. Updating the code to work with blender exports is not the hard part.
User avatar
Fila
Member
Posts: 1809
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Silent Crash Using Custom Truck Body

Post by Fila »

So uhm... try doing that see if it crashes.

I got it working on my end and the AI says the only thing it did was change everything to uppercase. But then it's giving me a very detailed reasoning of why only specific files crashes because the game already converts everything to uppercase except for very specific files which it doesn't and I'm not quite able to compute yet. lol
You do not have the required permissions to view the files attached to this post.
User avatar
OG_RuDeE
Member
Posts: 147
Joined: Fri Apr 28, 2023 4:11 pm

Re: Silent Crash Using Custom Truck Body

Post by OG_RuDeE »

Image

Changing the .trk to all uppercase was not enough. The folders in my pod were also lowercase. After changing those, the truck loads! :lol: :(

After uppercasing directories in the pod, the rest was true: cybertrk.TRK game crashes, cybertrk.trk game opens no truck, CYBERTRK.TRK game loads truck.

PS. Colpilot is full of bull. No need to split the model into pieces of certain vertex counts. This cybertruck model is a single bin block with a single texture for the entire model (treasure bay texture :lol:).
User avatar
Fila
Member
Posts: 1809
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Silent Crash Using Custom Truck Body

Post by Fila »

I know, Claude told me it's treasure bay texture and I was "wtf?".

Anyway, as a side note, I fixed the uppercase problem too so with the future release this won't be a problem anymore. Also found out that my track, Shim MX got corrupted on my HDD and it kills the game in a similar manner but for a different reason and wrote a safeguard to notify the user a .pod is killing the game.
User avatar
OG_RuDeE
Member
Posts: 147
Joined: Fri Apr 28, 2023 4:11 pm

Re: Silent Crash Using Custom Truck Body

Post by OG_RuDeE »

Sounds good. Maybe at some point, when you get to a more stable / permanent release, maybe you could put together a debugger similar to what you're using to help modders debug their mods? Funny, but also silly, that it was simply a capitalization issue in the filenames. :D
User avatar
OG_RuDeE
Member
Posts: 147
Joined: Fri Apr 28, 2023 4:11 pm

Re: Silent Crash Using Custom Truck Body

Post by OG_RuDeE »

Edit 2: Nevermind this whole post. After comparing pods, my bin models name also had to be all caps! :oops: Looks like the exporter is kind of working. :D

Ok, here's a strange one for you, Fila. I now have the pod thing figured out, so the game would load my truck pod, but it would be black in the garage upon choosing the Rav. Trying to load a track with the Rav selected would crash with an error about the rav4 bin model. So, I added the rav model to that test track, and the game loaded the model fine inside the track. Going back to the garage after running the track, the truck now appears and works in game. :?:

The screenshots are of me testing the track before the Rav truck worked and in the track with the rav after it worked.
Image Image

Edit: Since the truck started working, I unpodded the track (which was mounted below the truck) and fired up the game. The truck no longer works! Is traxx somehow fixing broken models when it writes pods?
User avatar
OG_RuDeE
Member
Posts: 147
Joined: Fri Apr 28, 2023 4:11 pm

Re: Silent Crash Using Custom Truck Body

Post by OG_RuDeE »

One last post on this topic for now since things seem to be working well. Successfully got this simplified Hummer 3 model into the game with my exporter. The model has ~8200 verts and ~8100 faces. No noticeable lag while running the truck in races.

Image Image
Post Reply