Join also our Discord channel! Click here.

Forza Motorsport Resource Extraction (.carbin)

Post questions about game models here, or help out others!
ajmiles
beginner
Posts: 32
Joined: Mon Jan 18, 2010 1:36 am
Been thanked: 6 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by ajmiles » Mon Apr 05, 2010 8:45 pm

Yeah, it doesn't look very fiesta like :). That was just one section of the fiesta file (I've not got as far as parsing the file properly like Ernegien). The format of the float is indeed just a sign bit, 10 bit mantissa and 5 bit exponent. I've got another picture of what I got from the BMW cockpit carbin here: http://aj.uwcs.co.uk/f3/bmw.png. What's interesting though is that when I compare this cockpit to the M3 GTR '05 in the game itself, the cockpit doesn't match at all. The car that it does match is a non-GTR M3 (note the 4 gauge dashboard), strange for there to be a naming issue with their assets...

To be able to render the entire car I'm going to need to find some sort of mesh offset/transform to move each part into it's proper position. Each part is built around the origin, so rendering even just two pieces of the car in the correct position is proving difficult.

User avatar
Ernegien
mega-veteran
mega-veteran
Posts: 160
Joined: Wed Mar 24, 2010 6:27 am
Location: Illinois, USA
Has thanked: 12 times
Been thanked: 158 times
Contact:

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Ernegien » Mon Apr 05, 2010 8:58 pm

You could possibly be rendering different permutations of the same section. Also, there are lots of unknown float values that I haven't really done much with so maybe the vertices are bounded and/or scaled for extra precision too?

Dan Frederiksen
beginner
Posts: 38
Joined: Sun Mar 28, 2010 3:42 pm
Has thanked: 2 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Dan Frederiksen » Mon Apr 05, 2010 9:18 pm

hehe I gathered it's not the whole car but it still looks somewhat odd, both the form and seems like some ghost layers and some free vertices. I guess we'll see later.

as for elements being misplaced, I'd look for an xyz offset vector. maybe even a transform matrix

ajmiles
beginner
Posts: 32
Joined: Mon Jan 18, 2010 1:36 am
Been thanked: 6 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by ajmiles » Mon Apr 05, 2010 9:36 pm

One of the unknown floats (perhaps position.w?) may infact be a per-vertex scale. When I was drawing the 'body' part of the cars (seen in the first screenshot) what made it look odd to me when it was rotating is that one end of the geometry looks very pinched/narrow. I'll spend a bit more time tonight trying to get more of the car rendering at once and see if I can figure out what the other halves are for. The unknown 24 bytes at the end may just be normals, binormals, tangents(?), (12 bytes), and possibly some bone weights/indices, although I don't imagine the cars have skinned animations applied to them?

Veegie
advanced
Posts: 66
Joined: Sun Apr 04, 2010 7:54 pm
Has thanked: 5 times
Been thanked: 3 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Veegie » Mon Apr 05, 2010 9:44 pm

There are numerous other things to account for, keep in mind.
UVW groups, smoothing groups, markers and nodes, vertice weights, etc.

Dan Frederiksen
beginner
Posts: 38
Joined: Sun Mar 28, 2010 3:42 pm
Has thanked: 2 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Dan Frederiksen » Mon Apr 05, 2010 10:32 pm

ajmiles, what value range are the coordinates? +-1.0?
although I can't think of any good reason why the coordinates would be non euclidian. if they wanted to hack the 16bits for higher precision I'd think they'd just use integer 16bit space.
maybe for some unknown reason there is a distorting matrix for each element instead of just offset. 4x4 likely, somewhere near the vertex data. element header. anything like that inthere Ernegien?

as for vertex components, there could be a vertex normal (xyz) for the reflections, maybe a vertex color but not sure they'd use that for the game. I'm not an expert on photoreal hardware graphics.
you could also imagine a denting vector if the game has such.

User avatar
Ernegien
mega-veteran
mega-veteran
Posts: 160
Joined: Wed Mar 24, 2010 6:27 am
Location: Illinois, USA
Has thanked: 12 times
Been thanked: 158 times
Contact:

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Ernegien » Mon Apr 05, 2010 11:45 pm

The header has two suspicious floats located at 0x2B0 which I suspect are probably related to the two unknown lists that follow. There are other floats in the header, but I haven't noticed any changes in the dozen or so files I've compared with.

Then in the beginning of each main section there are 14 floats which could very well be bounding information or a matrix of some sort. I'm sure some of these floats will probably make more sense in the context of the vertices you just decoded. There are also floats that prefix the index data for each individual car piece, but those are usually constant and thus probably aren't used.

Other than that, those are pretty much all the stray information that I haven't already figured out. The header, that has several integer-like differences which could possibly be checksums of some kind, then the two unknown lists of integer data which i was thinking might be used to determine which default parts get rendered on the car.

If you guys want to have a discussion on this stuff you can aim me (mjdpdu) or find me on IRC eefnet or gamesurge servers as 'xbox7887' :)

ajmiles
beginner
Posts: 32
Joined: Mon Jan 18, 2010 1:36 am
Been thanked: 6 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by ajmiles » Tue Apr 06, 2010 12:18 am

The xyz are definitely -1 to 1 as evidenced by these two images: http://aj.uwcs.co.uk/f3/body1.png and http://aj.uwcs.co.uk/f3/body2.png.
That just shows every piece of the BMW M3 draw at it's natural location, no offset/scale.The vertices appear to form circles of radius 1 at one end and, as i mentioned, get pinched at one end. I don't really know what to make of this yet.

Dan Frederiksen
beginner
Posts: 38
Joined: Sun Mar 28, 2010 3:42 pm
Has thanked: 2 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Dan Frederiksen » Tue Apr 06, 2010 12:39 am

they had to make it difficult didn't they : )
if we're lucky it's just a matter of a scale float. but that would be too easy.
it looks like any scale would only be for two of the coordinates. it looks like it's in some kind of american football confinement or even weirder.
could you export the fiesta rear part to dxf or something so I can take a look at it in a 3d editor to try to figure out what its major malfunction is?

ajmiles
beginner
Posts: 32
Joined: Mon Jan 18, 2010 1:36 am
Been thanked: 6 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by ajmiles » Tue Apr 06, 2010 2:53 am

I've managed to get the individual parts of the car rendering properly now: http://aj.uwcs.co.uk/f3/bmwNoBulge.png
What I'm still missing, (and it isn't immediately visible in the 14 floats before each car section) is the translation for each part of the car. Some parts, like the rear window defrosting lines seem to render in the correct position, but there's still a lot of parts at the origin inside the car that shouldn't be there. http://aj.uwcs.co.uk/f3/bmwFront.png
Just a case of finding if this translation information is in this file at all, and if so, how to apply it. For reference, to get the xyz to render correctly, I had to multiply xyz by zzw, don't ask why. :)

Dan Frederiksen
beginner
Posts: 38
Joined: Sun Mar 28, 2010 3:42 pm
Has thanked: 2 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Dan Frederiksen » Tue Apr 06, 2010 3:28 am

solid work. zzw? x and y had to be scaled by the z and the z had to be scaled by another float??

Dan Frederiksen
beginner
Posts: 38
Joined: Sun Mar 28, 2010 3:42 pm
Has thanked: 2 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Dan Frederiksen » Tue Apr 06, 2010 4:17 am

ah, the z was never the z, the 4 floats were xysz where s was the scale?
and the reason for keeping the xyz within +-1 was presumably just to maximize the use of the 11bit mantissa space. the weird deformation was just a result of whatever normalizer they used.

is that a vertex format any hardware can use? 16bit xyz and a scale? or is it really done just to save disk space? the objects couldn't be that big. must be a hardware supported format?

User avatar
Ernegien
mega-veteran
mega-veteran
Posts: 160
Joined: Wed Mar 24, 2010 6:27 am
Location: Illinois, USA
Has thanked: 12 times
Been thanked: 158 times
Contact:

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Ernegien » Tue Apr 06, 2010 4:37 am

Here's my updated application that displays information to quickly compare with other car sections. Just load either an lod0 or cabin .carbin file and click through the treeview. It might require you to install xna framework redistributable 3.1 since I started adding basic render code. The source is pretty much an abomination, but once everything is sorted out I'll go through and clean it up, and do the renderer with selective import/export features and a bunch of other goodies :)

Image
You do not have the required permissions to view the files attached to this post.

Dan Frederiksen
beginner
Posts: 38
Joined: Sun Mar 28, 2010 3:42 pm
Has thanked: 2 times

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Dan Frederiksen » Tue Apr 06, 2010 12:16 pm

Ernegien, have you implemented ajmiles' vertex format and scaling? and the face list?

User avatar
Ernegien
mega-veteran
mega-veteran
Posts: 160
Joined: Wed Mar 24, 2010 6:27 am
Location: Illinois, USA
Has thanked: 12 times
Been thanked: 158 times
Contact:

Re: [Xbox 360] Forza 3 Resource Extraction Tool (.carbin)

Post by Ernegien » Tue Apr 06, 2010 1:17 pm

No, I haven't done anything with vertex scaling or the face list yet. The work left to be done to get model faces rendering properly is minimal considering the amount of progress made last night. Ajmiles knows his shit and I'm confident that the rest of these unknown floats will be figured out very soon ;)

Post Reply