Join also our Discord channel! Click here.

Cars 2 model exporting problems- please help

Post questions about game models here, or help out others!
User avatar
xpunkrockyugox
beginner
Posts: 26
Joined: Tue Aug 11, 2020 12:55 am
Has thanked: 5 times

Cars 2 model exporting problems- please help

Post by xpunkrockyugox » Tue Aug 11, 2020 1:13 am

So as stated in the title, I've been trying to extract the character models from the Cars 2 game (version from Steam) to convert for SFM, Gmod and things like that. I've done something similar in the past where I used QuickBMS and NifSkope along with Blender to rip the stages from Wizard101 for use in MMD, but this is proving to be way, way harder than the Wizard101 stages thing.
For starters, the character model and texture are in a .oct file. I followed the links for the programs from the Cars 2 game modding Wiki page (https://modcars.fandom.com/wiki/Cars_2), but unfortunately it's basically dead over there. Doing more research I found out that Disney Infinity character models are in the same format, so I used the Disney Infinity Model Extractor (viewtopic.php?t=11187) on the Axelrod.vbuf file like it said, and exported it as a .obj file. It wouldn't open in Blender, just giving me an error, and when I double clicked it the default 3D viewer thing showed me this crazy looking paperwad thing.
I'm super new to hacking/decoding and 3D modeling in general, so I'm super lost and would be extremely grateful if someone could help me figure out what's happening here and how I can get the model to open- without turning into a paperwad, that is- and save as a normal format. If needed I can provide a Google Drive link to the game folder in question or share more screenshots, just let me know any information that might be useful. Thanks! :D
You do not have the required permissions to view the files attached to this post.

User avatar
reh
advanced
Posts: 60
Joined: Mon Nov 16, 2015 11:18 pm
Has thanked: 28 times
Been thanked: 55 times

Re: Cars 2 model exporting problems- please help

Post by reh » Tue Aug 11, 2020 5:32 am

It would be nice to have some sample files.

User avatar
xpunkrockyugox
beginner
Posts: 26
Joined: Tue Aug 11, 2020 12:55 am
Has thanked: 5 times

Re: Cars 2 model exporting problems- please help

Post by xpunkrockyugox » Tue Aug 11, 2020 2:37 pm

reh wrote:
Tue Aug 11, 2020 5:32 am
It would be nice to have some sample files.
Absolutely, here's the zipped version of the original folder directly from the game: https://drive.google.com/file/d/18vppy1 ... sp=sharing
And here's the folder with my attempts at conversion: https://drive.google.com/file/d/13MPlV_ ... sp=sharing
The version of Blender I'm running is 2.83.4- the latest version as of when I downloaded it.
Just let me know if you'd like any other files :)
You do not have the required permissions to view the files attached to this post.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3163
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 859 times
Been thanked: 1735 times

Re: Cars 2 model exporting problems- please help

Post by shakotay2 » Tue Aug 11, 2020 10:21 pm

Format appears to be rather simple - only hurdle using hex2obj (view link in my sig) is the fact that vertices follow after uvs.

Load axelrod_0.bin into hex2obj.
Then you've to modify the flat "mesh" .obj created using axelrod_0_uv.h2o by replacing "v " by "vt " lines and copy/paste them into the obj created using axelrod_0_mesh.h2o. (Be sure to have
g submesh_0
f 1/1 2/2 3/3
f 3/3 2/2 4/4
f 2/2 9/9 4/4
f 4/4 9/9 10/10
f 9/9 11/11 10/10
...
in that obj.)
axelrod_0_0.zip
(In case you fail just use the contained obj file. :D )
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
xpunkrockyugox
beginner
Posts: 26
Joined: Tue Aug 11, 2020 12:55 am
Has thanked: 5 times

Re: Cars 2 model exporting problems- please help

Post by xpunkrockyugox » Wed Aug 12, 2020 5:48 pm

Thank you so much!! I do have a few problems though...
- I don't really understand the thing with the numbers and .bins, I'm not very tech savvy when it comes to this kind of behind the scenes stuff >.< So I have to convert the .oct to a .bin somehow then open it in this Hex2OBJ program and plug in those numbers, if I'm understanding you correctly?
- The link to the program wasn't working, it just took me to a website with a bunch of fake download things and wouldn't actually give me the zip file.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3163
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 859 times
Been thanked: 1735 times

Re: Cars 2 model exporting problems- please help

Post by shakotay2 » Wed Aug 12, 2020 6:19 pm

xpunkrockyugox wrote:
Wed Aug 12, 2020 5:48 pm
So I have to convert the .oct to a .bin somehow
No - the bin is the binary copy of .vbuf+ .ibuf file(s). If you can't use hex2obj you'll have to wait for someone coding a (python) script.
.
axelrod.png
- The link to the program wasn't working, ...
Trust me, it is. Look at the bottom of that site:
File to download: hex2o__0.24e3.zip(842.36 Kb)

(161 downloads of that version so far)
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
xpunkrockyugox
beginner
Posts: 26
Joined: Tue Aug 11, 2020 12:55 am
Has thanked: 5 times

Re: Cars 2 model exporting problems- please help

Post by xpunkrockyugox » Wed Aug 12, 2020 8:15 pm

This is amazing!! Sorry for not really understanding the hex2obj thing right off, I'm... kind of a noob to anything involving hexadecimals or raw data editing. I really do want to learn how to use it though, and do this myself for the other models. I don't think I need a Python script that'll do it for me in Blender- I actually tried to get one and it didn't work.
Edit: The main things I'm confused about are the .bin thing (specifically, how to turn the .vbuf and .ibuf files into one .bin) and the v by vt thing- I'm not quite sure if you're telling me to add a "t" after every lone v I see or to delete any line that starts with v or vt. Again, really sorry for being kind of a dummy, this is my very first reverse engineering feat.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3163
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 859 times
Been thanked: 1735 times

Re: Cars 2 model exporting problems- please help

Post by shakotay2 » Wed Aug 12, 2020 11:51 pm

xpunkrockyugox wrote:
Wed Aug 12, 2020 8:15 pm
Edit: The main things I'm confused about are the .bin thing (specifically, how to turn the .vbuf and .ibuf files into one .bin)
Create a .txt file (rename to .cmd finally) with this single line:
copy /b axelrod_0.vbuf + axelrod_0.ibuf axelrod_0.bin
and execute it in the folder where vbuf/ibuf files reside.
and the v by vt thing- I'm not quite sure if you're telling me to add a "t" after every lone v I see or to delete any line that starts with v or vt.
That's basic office knowledge (notepad, menu edit/replace). :wink:
Open .obj file in your preferred texteditor then replace (without the quotes): "v " by "vt "

btw: that's not the usual approach when using hex2obj, it's just required because for this 3D format uv (texture) coordinates come before vertices. (For many if not most formats the order is like such: vertices normals uvs)
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
xpunkrockyugox
beginner
Posts: 26
Joined: Tue Aug 11, 2020 12:55 am
Has thanked: 5 times

Re: Cars 2 model exporting problems- please help

Post by xpunkrockyugox » Thu Aug 13, 2020 12:45 am

I apologize for continuing to ask stupid questions, but when I opened the axelrod.bin file in Hex2OBJ, it just gave me an error message when I tried to save it as an H20 file. I'm really confused about this and feel bad for being so confused... :cry: So am I supposed to open the .bin in a hex editor and get the vertex and face ranges or whatever the tutorial said?
Like I said, I'm totally over my head right now, but as confused as I am, that's also how eager I am to learn it so I won't be confused anymore! :)

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3163
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 859 times
Been thanked: 1735 times

Re: Cars 2 model exporting problems- please help

Post by shakotay2 » Thu Aug 13, 2020 9:21 am

xpunkrockyugox wrote:
Thu Aug 13, 2020 12:45 am
, but when I opened the axelrod.bin file in Hex2OBJ, it just gave me an error message when I tried to save it as an H20 file.
The .bin file is NOT saved as H2O file, the params (addresses, counts) are.
Rename or delete existing H2O files to save another one.
So am I supposed to open the .bin in a hex editor and get the vertex and face ranges or whatever the tutorial said?
That's the idea. (In this case the H2O files exist already.)
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 711
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 24 times
Been thanked: 630 times

Re: Cars 2 model exporting problems- please help

Post by Bigchillghost » Thu Aug 13, 2020 12:39 pm

shakotay2 wrote:
Wed Aug 12, 2020 11:51 pm
it's just required because for this 3D format uv (texture) coordinates come before vertices.
Isn't it possible to use the absolute addresses for positions and uvs?
xpunkrockyugox wrote:
Wed Aug 12, 2020 8:15 pm
The main things I'm confused about are the .bin thing (specifically, how to turn the .vbuf and .ibuf files into one .bin) and the v by vt thing- I'm not quite sure if you're telling me to add a "t" after every lone v I see or to delete any line that starts with v or vt.
You don't have to do any of that actually. This is where AMR will come in handy. :D
axelrod_0.png
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
xpunkrockyugox
beginner
Posts: 26
Joined: Tue Aug 11, 2020 12:55 am
Has thanked: 5 times

Re: Cars 2 model exporting problems- please help

Post by xpunkrockyugox » Thu Aug 13, 2020 8:13 pm

shakotay2 wrote:
Thu Aug 13, 2020 9:21 am
xpunkrockyugox wrote:
Thu Aug 13, 2020 12:45 am
, but when I opened the axelrod.bin file in Hex2OBJ, it just gave me an error message when I tried to save it as an H20 file.
The .bin file is NOT saved as H2O file, the params (addresses, counts) are.
Rename or delete existing H2O files to save another one.
So am I supposed to open the .bin in a hex editor and get the vertex and face ranges or whatever the tutorial said?
That's the idea. (In this case the H2O files exist already.)
Ohhh, so if I'm understanding, you made the H2O file and I can use that on the other models/bins I want to export? (I'm just trying to find out how to do it myself because I have at least 8 other characters I'm interested in exporting. I just used Axelrod as my guinea pig because he was one of the first ones in the characters folder. I'm not gonna bug anybody for help with the others, just trying to get a process down here. ^^)

User avatar
xpunkrockyugox
beginner
Posts: 26
Joined: Tue Aug 11, 2020 12:55 am
Has thanked: 5 times

Re: Cars 2 model exporting problems- please help

Post by xpunkrockyugox » Thu Aug 13, 2020 8:26 pm

Bigchillghost wrote:
Thu Aug 13, 2020 12:39 pm
shakotay2 wrote:
Wed Aug 12, 2020 11:51 pm
it's just required because for this 3D format uv (texture) coordinates come before vertices.
Isn't it possible to use the absolute addresses for positions and uvs?
xpunkrockyugox wrote:
Wed Aug 12, 2020 8:15 pm
The main things I'm confused about are the .bin thing (specifically, how to turn the .vbuf and .ibuf files into one .bin) and the v by vt thing- I'm not quite sure if you're telling me to add a "t" after every lone v I see or to delete any line that starts with v or vt.
You don't have to do any of that actually. This is where AMR will come in handy. :D
axelrod_0.png
That's amazing!! Thank you so much. I'm curious though- where do you get the numbers for the polygon indices and stuff? Do I use a hex editor there?

User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 711
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 24 times
Been thanked: 630 times

Re: Cars 2 model exporting problems- please help

Post by Bigchillghost » Fri Aug 14, 2020 1:02 am

xpunkrockyugox wrote:
Thu Aug 13, 2020 8:26 pm
Do I use a hex editor there?
Surely you do.
xpunkrockyugox wrote:
Thu Aug 13, 2020 8:26 pm
I'm curious though- where do you get the numbers for the polygon indices and stuff?
For polygon indices, the count equals the size of the ibuf file divided by 2. You can get the vertex count by clicking the Calculated button after interpreting the indices. The normals are at a separate chunk right after the one that combines the uvs and the positions. You can get this value by copying the end address from the digest message box after interpreting the uvs. For the rest of the params, just use the same ones shown in the screenshot.

P.S.: a little advice, edit your quotes next time to remove the unnecessary parts.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
xpunkrockyugox
beginner
Posts: 26
Joined: Tue Aug 11, 2020 12:55 am
Has thanked: 5 times

Re: Cars 2 model exporting problems- please help

Post by xpunkrockyugox » Sat Aug 15, 2020 4:02 am

Bigchillghost wrote:
Fri Aug 14, 2020 1:02 am
For polygon indices, the count equals the size of the ibuf file divided by 2. You can get the vertex count by clicking the Calculated button after interpreting the indices. The normals are at a separate chunk right after the one that combines the uvs and the positions. You can get this value by copying the end address from the digest message box after interpreting the uvs. For the rest of the params, just use the same ones shown in the screenshot.

P.S.: a little advice, edit your quotes next time to remove the unnecessary parts.
Thanks! Sorry about the long quotes earlier, I'm new to this site lol
Thank you so much for the formula stuff! I couldn't have made this progress without all of y'all's help, very grateful for the advice and instructions :D
As for the textures, I got inconsistent results using the TextureRipper tool from MarvelMods. Does AMR have an option to get textures out? I just used the TextureRipper on the .oct file twice and got two slightly different looking textures. I want to make sure to get the textures looking just right so that I can apply the UV correctly.

Post Reply