Modding and restoration discussion

  • Thread starter pez2k
  • 470 comments
  • 75,924 views
3
United States
United States
Many thanks, @MMRivit, that was the issue. The sys.ins file was only 2kb, but the one from the original disc was 34k or something. Replaced that file, repacked and works like a charm. I appreciate the help!
 
somebody working on a more practical CDO editor?

Nobody understands how the reflection / normals data works, so without mapping out the complete file format writing some sort of editor is not possible. That's why all models in GT2CarViewer are matte with no reflections - it skips over the unknown data.
 
I think I've got a pretty interesting contribution on this front after tinkering with it for a few weeks. Having dived pretty deeply into the file format, I think I unearthed how the normals and indices work.

Excellent, that looks very promising! I'll PM you an invite to a Discord server where we research this stuff, as @submaniac93 in particular will be very interested to see it - he's done a fair bit of research himself into the face ordering etc.

I see you've already linked to my repo so I assume you've seen it, but CDP in particular is completely known now so I can fill in some of the gaps for you too - for example, the alpha bit really is alpha, it's just mainly used to prevent RGB 0,0,0 from being transparent, and the resolution of the texture is always 256x224.
 
1,394
France
Here and there...
SUBMANIAC
Whoa there, if you've managed to understand how the little bit of data between vertex and face data is, then this is the best news of 2021 so far !
 
3
United States
United States
Yeah, it was a lot of staring at hex, and it not making sense, then a lot of staring at 4-bit chunks, and it not making sense, then randomly dividing one of the columns by 2 and some almost-reasonable numbers popping out, then thinking where the heck are the high bits stashed, then holy %#$ it's there, just really weirdly misaligned (and 9-bit!)

Along the way I ended up taking one of the smallest LODs and *manually assigning the normal indices* so I could know what numbers I'm actually looking for in the face data. I got it about 90% right on the first try, which I'm pretty proud of.

The only things I don't have a handle on in the model/lod format is the meaning of the uint16 between uv1 and uv2 of the textured face, and what the values between num_quads and num_tex_tris are, but those have all been zero in the models I've checked. All the normals and face flags and stuff are reasonably well mapped out now.

As for the actual cdo format, I clearly don't have scale completely right, and there's some unknown bytes between "num_lods" and the lod data, as well as a whole load of things at the end of the file.

I'm thinking about trying my hand at an OBJ -> cdo/cdp converter.

Let me know what you think of the normals if you have a chance to use the tool. Blender can open the models mostly correctly, but Meshlab is hopeless.
 
4,034
Indonesia
Paint booth
FMecha_EXE
N/A
Yeah, it was a lot of staring at hex, and it not making sense, then a lot of staring at 4-bit chunks, and it not making sense, then randomly dividing one of the columns by 2 and some almost-reasonable numbers popping out, then thinking where the heck are the high bits stashed, then holy %#$ it's there, just really weirdly misaligned (and 9-bit!)

Along the way I ended up taking one of the smallest LODs and *manually assigning the normal indices* so I could know what numbers I'm actually looking for in the face data. I got it about 90% right on the first try, which I'm pretty proud of.

The only things I don't have a handle on in the model/lod format is the meaning of the uint16 between uv1 and uv2 of the textured face, and what the values between num_quads and num_tex_tris are, but those have all been zero in the models I've checked. All the normals and face flags and stuff are reasonably well mapped out now.

As for the actual cdo format, I clearly don't have scale completely right, and there's some unknown bytes between "num_lods" and the lod data, as well as a whole load of things at the end of the file.

I'm thinking about trying my hand at an OBJ -> cdo/cdp converter.

Let me know what you think of the normals if you have a chance to use the tool. Blender can open the models mostly correctly, but Meshlab is hopeless.
For the record, the extraction tool can also help with documentation - I compiled and tried it, but I couldn't seem to ever understand it considering the JS based viewer relies on models being extracted from your tool.
 
3
United States
United States
I compiled and tried it, but I couldn't seem to ever understand it considering the JS based viewer relies on models being extracted from your tool.

Yeah, I just updated the usage message. It was pretty bad before.

If you clone the repo and have a gt2 vol file handy, navigate to gt2/extract, and the following command should extract the objs and put them in the viewer folder:

./build.sh && ./voltool [path-to-your-vol] getobjs ../view/models '.*tsplr.cdo.*'
 
Last edited:
1,394
France
Here and there...
SUBMANIAC
I can help clearing a good chunk of the data in the format. Though it would be easier to discuss it on the discord server. The last chunk of data in the file is the shadow mesh and its data.
A lot of the 'empty' space in the file gets filled by data when in-game. for example, the entire chunk of zeroes before the model data starts is filled with the wheel mesh data and a few other things at runtime.
 
15,864
United States
Maryland
GranTurismo0517
RandomCarGuy17
That's wonderful news, I guess I can't tell people that adding new models for GT2 is impossible anymore. hehe.
 
62
Poland
Olsztyn, Poland
I remember someone mentioning (might've been pez himself, actually) bringing back the S14 Silvia LM Edition from GT1 to GT2+, whenever possible. I guess that might be possible soon.
 
Last edited:
340
Brazil
Brazil
So it's just in testing phase? Yeah, I saw that the model doesn't have any reflections, but the window has more transparency than the opponents, for example
EDIT: When someone figures out the reflection system, will be possible to add cars the soft top Elise and the Audi A4 Avant (as prize cars, at least)?
 
Last edited:
I remember someone mentioning (might've been pez himself, actually) bringing back the S14 Silvia LM Edition from GT1 to GT2+, whenever possible. I guess that might be possible soon.

The equivalent research would need to be done into GT1 models first, but it's certainly a step towards that.

So it's just in testing phase? Yeah, I saw that the model doesn't have any reflections, but the window has more transparency than the opponents, for example
EDIT: When someone figures out the reflection system, will be possible to add cars the soft top Elise and the Audi A4 Avant (as prize cars, at least)?

The windows are transparent because of a palette mistake rather than anything intentional - it's possible to do with the original cars but obviously nothing has a modelled interior.

The 'soft top' Elise is just an old model with very inaccurate proportions that was remodelled on purpose. There's not enough room on the texture sheet of the final model for a textured roof like that, as they added detail to the rest of the car instead.
 
3
Chile
Chile
Hi to everybody!

I wondering if possible to mod the BGM from one game one to another.
I never liked the US/EU FMV intro and in-Race BGM.

I want the US (or EU) game with the JP BGM and FMV Intro/Ending.

Regards!
 
3
Chile
Chile
The track lengths in GT2 are hardcoded, so the music can only be replaced with music of exactly the same length. This means that the music can't be swapped between regions.

thanks for the answer.
what a pity, but hypothetically, there is a way to extract, edit the length and then inject back the BGM of the game?
 
1,348
United Kingdom
Sunderland
thanks for the answer.
what a pity, but hypothetically, there is a way to extract, edit the length and then inject back the BGM of the game?
If it's the same length then it would work. It's possible (although unlikely) that you might find radio edits of the songs that would fit the length, or make your own edits of them, but it's probably not worth the hassle for something that couldn't be feasibly released - uploading a copy of a licenced song with your mod is quite a strong no-no.
 
3
Chile
Chile
If it's the same length then it would work. It's possible (although unlikely) that you might find radio edits of the songs that would fit the length, or make your own edits of them, but it's probably not worth the hassle for something that couldn't be feasibly released - uploading a copy of a licenced song with your mod is quite a strong no-no.

thanks, I know is against the rules upload copyrighted stuff, so I would probably keep it only for me ;)
but my question is still there, can somebody guide me how try to do it (steps/tools)?

Regards!
 

SWAGMASTER69

Premium
24
Russian Federation
Moscow
Our first custom car model is here (proof of concept):

Now that's something I've been waiting for for years! Great job everyone!

I've made this McLaren for testing purposes and fun for all of you :)
I tried to keep the polycount relatively low and style somewhat close to the GT2 (altrough still far from it) and standard texture size. If this goes right, it might be even able to run on the original hardware!

Adding this car to the game might be a challenge, because I don't really know how GT2 uses wheel size, and this car certainly has got to have wide wheels, but if you sucseed, this could become the first open-wheel car in GT2 and a fun addition to the variety of cars :)
I think that swapping Renault Espace F1 with this one should do the trick, it would have the right sound and somewhat okay handling.

PM me if you will need any changes or willing to provide tools, so that i can help at testing and finding limits of the supported models.

Model link:
https://disk.yandex.ru/d/QsggNq5QenWYMQ
 
I've made this McLaren for testing purposes and fun for all of you :)
I tried to keep the polycount relatively low and style somewhat close to the GT2 (altrough still far from it) and standard texture size. If this goes right, it might be even able to run on the original hardware!

That's way too high detail I'm afraid - there's a limit of 255 vertices (your car body seems to use 800+), the full texture must fit on a 256x224 sheet (yours is 256x256), and there's a limit of 16 colours per face (your wheels alone seem to use 70+). These aren't performance limits, these are limits to the amount of data that will actually fit into the game file formats, so not possible to bypass.
 

SWAGMASTER69

Premium
24
Russian Federation
Moscow
That's way too high detail I'm afraid - there's a limit of 255 vertices (your car body seems to use 800+), the full texture must fit on a 256x224 sheet (yours is 256x256), and there's a limit of 16 colours per face (your wheels alone seem to use 70+). These aren't performance limits, these are limits to the amount of data that will actually fit into the game file formats, so not possible to bypass.
Well, that's actually exactly what I wanted to hear :)
I need to know the limitations to make adjustments, it won't be too hard.

Although, how exactly does this work? I mean, what model structure should I use?
Should I include wheel model into the car model like it is in the GT2 Car Viewer?

The body itself currently uses 470 polygons and 900 points/vertices, but i've added a lot of unnececary detail that I can remake. But if it's just 255 points...that's going to be quite a challenge :D
And also, why exactly is it limited to 255 vertices and how does that work? I mean, the original models include 3 lods in one file, even trough highest lod can use all 255 vertices available...

Edit:
As for the texture, I used one of the original textures for the base. I never encoutered anything like 16 colors per face, can you go into a bit more detail about that? How can I setup my PSD file to work with theese limitations? How many colours can a texture have at all? Does this mean that every single polygon must have no more than 16 colors or am I getting something wrong?

And what about size? All cars that you export with GT2 Car Viewer have 256x256 texture sheet, not 256x224, how should I account for that?
 
Last edited: