Author Topic: GT2 Car Viewer: A tool to view GT2 cars...  (Read 8314 times)

harmalarm

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: GT2 Car Viewer: A tool to view GT2 cars...
« Reply #60 on: May 05, 2019, 01:47:00 pm »
Hi Leo2236,

I have a question about the texture format (cdp, cnp) and perhaps you can help me out. I am trying to make a GT2 I/O Maxscript set, just for practicing Maxscript. So far I have managed to get the actual models in-game with UV coordinates, but I am struggling with the textures. What I understand so far is that they are 256x224 textures, with a number of palettes for the color changes of the cars. I know the colors are indexed from the address of 17312 (43A0h), and I understand that the palette colors are basically 16x16 colors, all made up out of words (two bytes).

What I don't understand is that the color indexes all refer to 4bit values (0-15) while the texture uses 256 colors. Certain parts of the texture use a certain 16 color palette strip? I cannot find out how the game knows which part of the texture uses which palette. But perhaps I am totally wrong in this assumption?

Also, I am having trouble reading the word values to rgb colors in Maxscript. I suspect it is a 16bit color (rgb565) but when looking at your source files you do some bit shift and and operations that I don't really understand. Everything I can find on the internet is referring to different shift operations and I am quite confused now.

Would it be possible for you to give me a quick explanation of your procedure in simple terms? You have written your tool in Delphi, which I can follow for the most part, but I am stuck at the color values and palette indices at the moment.

cheers and thanks for your awesome tools which have inspired me much  :D,
Harmalarm