Track backgrounds

All about Sik's and others's incredible works
Répondre
Avatar de l’utilisateur
Mercury
Messages : 80
Inscription : 30 mars 2005 6:11

Track backgrounds

Message par Mercury »

This seemed like the best place to post this.

I was playing with the PODpaint tool. I see that many of the original 16 tracks, such as Cocoon, Burrow, HQ, etc. that do not have backgrounds in the game actually do have background textures in the BL4. But for some reason these are never displayed in the game. Cocoon even has its own unique sky!

I wonder if enabling the background or sky in the game could be accomplished by just changing a few bytes in the BL4? Or would it require a total recompile of the track?
Avatar de l’utilisateur
Rob
Messages : 2877
Inscription : 20 juil. 2003 18:30
Localisation : Une fois la Belgique deux fois !
Contact :

Hu

Message par Rob »

I'll let Skubi or Sik answer this, if they still remember ;)

Groink ! Pod is still alive ! :casse:
Avatar de l’utilisateur
Siklist
Messages : 2530
Inscription : 20 juil. 2003 11:53
Localisation : Vélodrome

Message par Siklist »

Indeed it's possible with few changes. We had tried it and it worked.(there's a byte or a dword to enable/disable it). But I can't remember anything about the bl4 format sry. Maybe Skubi can help you.
Avatar de l’utilisateur
Skubidou
Administrateur
Messages : 2367
Inscription : 19 juil. 2003 17:39
Localisation : Lonzée (B)
Contact :

Message par Skubidou »

I have look back to the documentation... Not tested but this should be correct...

Image

Search the 'sky.tga' string (i think it is in each track)
Before this string, you will find 3 DWord (01 00 00 00)
Before this, a crypt string (1 byte for the length followed by the string)
Before this a DWord (Background color?)
Before this a Dword (in red on the picture). This Dword activate the background (0=no background. Other walue=background)

But i don't know if it will be 'beautifull'. Some background were disable simply because on theses tracks you can see below the background bottom limit, so you will have a background in the middle of the dark ...

Skubidou:~
Avatar de l’utilisateur
Mercury
Messages : 80
Inscription : 30 mars 2005 6:11

Message par Mercury »

Thank you Skubi...

But is there any tool for re-encrypting tracks? PODpaint can decrypt them but I see no way to transform back into BL4, unless I'm missing something.

I just spent a lot of time comparing the encrypted file with the decrypted dump, and working out where the checksums are located in the file, and editing the encrypted BL4 by hand.

I succeeded! I now have a working background on HQ.

Still, is there any tool to make the job easier?
Avatar de l’utilisateur
Mercury
Messages : 80
Inscription : 30 mars 2005 6:11

Message par Mercury »

Some stuff for sky, if anyone is interested:
Image
As with Skubi's example,

"sky.tga" string (dark blue) There are multiple instances of this string; this is the last one.
Before that, 3 DWORDs (green), all set to 01 (little-endian)
Before that, some encrypted stuff(?) (black)
Before that, 1 DWORD (orange), always 2D
Before that, 1 DWORD (yellow), no idea, varies by track
Before that, 1 DWORD (light blue) - IMPORTANT, see below
before that, 1 DWORD (violet), always 0D
Before that, 1 DWORD (brown), no idea, varies by track
Before that, 1 DWORD (red).

This last one is what enables sky. Change the low-order byte to 01 for rolling sky, 11 for static sky, 00 to disable sky.

The DOWRD marked in light blue is important. The high-order bytes (00 00 in this case) determine the "fade colour" of the sky. The sky will slowly change to this colour at the edges (e.g. Pompeii fades to white at the edges). Seems to only work with rolling sky. 00 00 for white, FF FF for black. Other values not tested. The low-order bytes of this DWORD vary by track; no idea what their purpose is.
Avatar de l’utilisateur
Mercury
Messages : 80
Inscription : 30 mars 2005 6:11

Message par Mercury »

So, now, backgrounds can look good:
Image

..or terrible:
Image

So, how to fix this? The problem in Burrow (and also HQ) is that the background in too high, or not stretched enough vertically. You can then see the bottom of the background and a black void beneath.

Is there a setting that controls this (vertical position/size)? See Veitland for comparison; in that track the bottom of the background is very, very low. I haven't been able to find the bytes controlling this kind of setting.

Can you help, Skubi?
Avatar de l’utilisateur
Skubidou
Administrateur
Messages : 2367
Inscription : 19 juil. 2003 17:39
Localisation : Lonzée (B)
Contact :

Message par Skubidou »

Skubidou a écrit :But i don't know if it will be 'beautifull'. Some background were disable simply because on theses tracks you can see below the background bottom limit, so you will have a background in the middle of the dark ...
Just what i said. :roll: ;)

No way to move background for what i know. Only "solution" would be to move all polygons from the tracks higher....hoping this will not create another bug (polygons hit the sky ;) )

Skubidou:~
Avatar de l’utilisateur
Algor38
Messages : 1424
Inscription : 21 juil. 2003 19:46

Message par Algor38 »

rest to improve the best laps.....



:roll:
Avatar de l’utilisateur
Vince
Messages : 360
Inscription : 09 juin 2006 14:44
Localisation : 37.82S, 145.09E

Message par Vince »

Algor38 a écrit :rest to improve the best laps.....

:roll:
Come back playing with usssssssssssssssssssssss :D
Avatar de l’utilisateur
Algor38
Messages : 1424
Inscription : 21 juil. 2003 19:46

Message par Algor38 »

no no...


(maybe for Trackmania on Nintendo DS ? :) )
Avatar de l’utilisateur
Mercury
Messages : 80
Inscription : 30 mars 2005 6:11

Message par Mercury »

Skubidou a écrit :No way to move background for what i know. Only "solution" would be to move all polygons from the tracks higher....hoping this will not create another bug (polygons hit the sky ;) )
I always thought the background does not depend on the coordinates in the map, i.e. it is always drawn with the centre point where the racer is.

So it would not matter how high polygons are because no matter where you are on the track - higher or lower - you always see the same background.

Is this thinking wrong? :?

And thanks Skubi, I appreciate your help very much! :D
Avatar de l’utilisateur
Skubidou
Administrateur
Messages : 2367
Inscription : 19 juil. 2003 17:39
Localisation : Lonzée (B)
Contact :

Message par Skubidou »

Not sure, but i think the background is always at the same place in the 'space' (it is sure it is not moving depending on the place of the player).

After, if the track is large enough and high enough, with the 'view angle' from each point where the driver can be, you can not see lower than the background limit. If the track is small, or lower and small external 'wall' or no external wall, your view angle allow you to see beneath the background limit.

But not sure, we don't have find 100% of the bytes signification (we focus more on the track part than on the other parts)

Skubidou:~
Avatar de l’utilisateur
NicoDE
Messages : 32
Inscription : 09 sept. 2004 14:59
Localisation : Germany
Contact :

Message par NicoDE »

Mercury a écrit :Still, is there any tool to make the job easier?
The source code is included. If you do not have Delphi, I can add the "missing" button - just send me an email to nicode@gmx.net with [pod] in the subject.
Avatar de l’utilisateur
NicoDE
Messages : 32
Inscription : 09 sept. 2004 14:59
Localisation : Germany
Contact :

Message par NicoDE »

Mercury a écrit :Before that, some encrypted stuff(?) (black)
Strings start with a length byte and the characters are 'encoded' with:
String[Index] ^= ~Index

0x07, {0xBC, 0x9D, 0x92, 0x9F, 0x94, 0x95, 0x97} = "Ccocoon"
Répondre