-
Notifications
You must be signed in to change notification settings - Fork 5
RSB File Format RUS
Глоссарий
GR - игра Ghost Recon,
GRE - игровой движок игры Ghost Recon,
RSB - Red Storm Bitmap (формат файла текстур игры)
1. Ведение
2. Обзор
3. Секции
3.1. Заголовок файла
3.2. Пиксельные данные
3.3. Свойства текстуры
3.4. Дополнительные каналы текстуры
4. Аппендикс A
5. Аппендикс B
Этот документ описывает структуру формата файла RSB, используемого GRE. RSB файлы хранятся в папке "Texture" оригинальной игры и имеют расширение ".rsb".
** RSB ** является файлом изображения, используемым для хранения растровых цифровых изображений. Вы можете открывать и сохранять RSB файлы с помощью официального плагина для программы Photoshop.
** RSB ** формат файла разделен на три секции (см Табл. 1).
№ | Секция | Ссылки |
---|---|---|
1 | Заголовок файла | См. Таблица 2.0 |
2 | Пиксельные данные | |
3 | Дополнительные каналы | |
4 | Свойства текстуры |
Размер заголовка файла в зависимости от версии находится в пределах от 28 до 45 байт.
Размер | Тип | Описание | Значение |
---|---|---|---|
4 | integer | Версия файла | 1,2,4,5,6,8,9 |
Размер текстуры | |||
4 | integer | Ширина | 1..2048 |
4 | integer | Высота | 1..1024 |
Для версий больше или равных 7ой добавляются три переменные | |||
4 | integer | Неизвестная константа | 0 |
4 | integer | Неизвестная константа | 0 |
1 | integer | Неизвестная константа | 0 |
Битовая маска | |||
4 | integer | Количество красные бит на один пиксель | 0, 5, 6, 8 |
4 | integer | Количество зеленых бит на один пиксель | 0, 5, 6, 8 |
4 | integer | Количество синих бит на один пиксель | 0, 5, 6, 8 |
4 | integer | Количество битов прозрачности на один пиксель | 0, 5, 6, 8 |
Для версий больше или равных 9ой добавляются две переменные | |||
4 | integer | Неизвестная константа | |
4 | integer | Неизвестная константа |
Размеры текстур, используемые в игре.
№ | Размер |
---|---|
1 | 16 x 16 |
2 | 16 x 32 |
3 | 16 x 64 |
4 | 32 x 32 |
5 | 32 x 64 |
6 | 32 x 128 |
7 | 64 x 64 |
8 | 64 x 128 |
9 | 64 x 256 |
10 | 128 x 128 |
11 | 128 x 256 |
12 | 128 x 512 |
13 | 256 x 256 |
14 | 256 x 512 |
15 | 256 x 1024 |
16 | 256 x 2048 |
17 | 512 x 512 |
18 | 512 x 1024 |
19 | 512 x 2048 |
20 | 1024 x 1024 |
21 | 1024 x 2048 |
Пиксельные данные в RSB файлах представляют собой массив пикселей в цветовой модели RGB. Один пиксель массива содержит значения яркости красной, зеленой и синей компоненты цвета, а также прозрачность пикселя, т.н. альфа канал (см. Табл. 3). Значение всех переменных пикселя изменяется в пределах от 0 до 255 (см Табл. 3.1). Количество пикселей текстуры рассчитывается как произведение ширины на высоту текстуры.
№ | Маска | бит на пиксель | Описание |
---|---|---|---|
1 | R5G6B5 | 16 | Красный - 5 бит, Зеленый - 6 бит, Синий - 5 бит |
2 | R8G8B8 | 24 | Красный - 8 бит, Зеленый - 8 бит, Синий - 8 бит |
3 | A4R4G8B8 | 24 | Альфа - 4 бита, Красный - 4 бита, Зеленый - 8 бит, Синий - 8 бит |
4 | A8R8G8B8 | 32 | Альфа - 8 бит, Красный - 8 бит, Зеленый - 8 бит, Синий- 8 бит |
Размер | Компонента | Значение |
---|---|---|
0..8 | Красный | 0..255 |
0..8 | Зеленый | 0..255 |
0..8 | Синий | 0..255 |
0..8 | Альфа | 0..255 |
** RSB **
№ | Length | Description | Index (in file) |
---|---|---|---|
1 | Gunshot Transparent | Bullets can pass through the texture. ex. a wire fence. } | 1 |
2 | Grenade Transparent | Grenades and bombs can pass through (with damage effects) | 2 |
4 | Line-of-sight Transparent | Enemies can see the player through it. | 4 |
5 | Foliage | This hinders the enemy's line of sight and causes leaves to fall if the surface is shot through. | 8 |
7 | Water | 16 | |
8 | Damage Texture | This feature does not yet work properly. | |
9 | Surface Type | gives the RSB an appropriate sound effect when walked on and an appropriate | |
damage texture when shot. |
The Index (in file) is the GameProperties variable's value in RSB file. It is equal to the summ of all indices (unless Water property).
Tags set in the Map Editor in 3ds MAX will override any corresponding properties in RSB file.
Scrolling properties animates an RSB texture by moving it horizontally, vertically or rotate, an RSB cannot have animation frames and scroll at the same time, an RSB cannot rotate if its moving Horizontal and Vertically.
Length | Type | Description | Value |
---|---|---|---|
if File Version > 5 one more value | |||
4 | integer | Unknown variable | |
For all File Versions | |||
1 | byte | Alpha Blending | 1 - on, 0 - off |
1 | byte | Alpha Testing | 1 - on, 0 - off |
1 | byte | Sampling | 1 - on, 0 - off |
1 | byte | Animation | 1 - on, 0 - off |
1 | byte | Scrolling | 1 - on, 0 - off |
1 | byte | Tiled | 1 - on, 0 - off |
1 | byte | *** Compression | 1 - on, 0 - off |
1 | byte | *** Distortion | 1 - on, 0 - off |
if File Version > 7 (one more value) | |||
4 | integer | TextureTags | see Table 4.7 |
if File Version not 7 (two more values) | |||
1 | byte | Unknown variable | |
2 | integer | Unknown variable | |
For all File Versions | |||
4 | integer | Source Function | see Table 4.2 |
4 | integer | Destination Function | see Table 4.3 |
4 | integer | Compare Function | see Table 4.1 |
1 | byte | Reference Value | |
Texture scrolling | |||
4 | integer | Scrolling Type | see Table 4.5 |
4 | float | Horizontal Rate (moves texture horizontally) | |
4 | float | VerticalRate (moves texture vertically ) | |
Animation params | |||
4 | integer | Animation Type | see Table 4.4 |
4 | float | Animation Interval (play speed of an animation) | |
4 | integer | Frames Count | 0..9 |
(if Animation > 0 and TextureCount > 0) Frames Array list, repeated for Frames Count | |||
4 | integer | Frame Texture Name Length | |
string | Frame Texture Name | ||
if File Version > 4 two more values | |||
4 | integer | Maps Count | |
4 | integer | *** Subsampling Priority | |
1 | byte | Damaged | |
For all File Versions | |||
if Damaged > 0 one more value (It doesn't work properly. Do not use) | |||
4 | integer | Texture Name Length | |
string | Texture Name | ||
if File Version > 2 one more value | |||
4 | integer | Surface Type | see Table 4.6 |
*** It’s best to leave these parameters alone unless you like crashing.
№ | Texture size |
---|---|
0 | Zero |
1 | Less |
2 | Equal |
3 | Greater Equal |
4 | Always |
№ | Texture size |
---|---|
0 | Zero |
1 | One |
2 | Source Alpha |
3 | Inverse Source Alpha |
4 | Source Color |
5 | Inverse Source Color |
6 | Destination Color |
7 | Inverse Destination Color |
8 | Both Source Alpha |
9 | Both Inverse Source Alpha |
№ | Texture size |
---|---|
0 | Zero |
1 | One |
2 | Source Alpha |
3 | Inverse Source Alpha Source Color |
5 | Inverse Source Color |
6 | Destination Color |
7 | Inverse Destination Color |
8 | Both Source Alpha |
9 | Both Inverse Source Alpha |
№ | Texture size |
---|---|
0 | Cycle |
1 | Oscillate |
2 | Constant |
- Cycle - a repeating pattern that starts over when it finishes. But if its attached to a billboard object it stop at the end and the billboard will disappear.
- Oscillate - ping pong pattern
- Constant - similar to cycle but wont disappear if attached to a billboard
№ | Texture size |
---|---|
0 | Rotate |
1 | Degrees Seconds |
№ | Texture size |
---|---|
0 | NONE |
1 | Carpet |
2 | Concrete |
3 | Wood |
4 | Metal |
5 | Asphalt |
6 | Sand |
7 | Lowgrass |
8 | Highgrass |
9 | Puddle |
10 | Water |
11 | Drywall |
12 | Thin Metal |
13 | Thick Metal |
14 | Metal Gas Tank |
15 | Steam Pipe |
16 | Electrical Panel |
17 | Snow |
18 | Safety Glass |
19 | Bullet Resistant Glass |
20 | Ice |
21 | Mud |
22 | Glass |
23 | Foliage |
24 | Gravel |
25 | Glass Shards |
The RSB can store additional surface channels which apply surface properties to portions of the texture. This is useful when there are several different images on a single texture, some may be wood surfaces, some may be metal, etc.
Surface property corresponds to the sounds that are made when bullets impact the surface or when the player character walks on it.
№ | File version | Size |
---|---|---|
1 | 1, 2, 4, 5, 6 | 28 |
1 | 8 | 37 |
1 | 9 | 45 |
№ | File version | Size |
---|---|---|
1 | 1 | 0 |
2 | 2, 3 | 46 |
3 | 4 | 53 |
4 | 5, 6 | 61 |
5 | 6 | 65 |
6 | 8, 9 |
All copyrights belong to their respective owners.
Version History:
0.7
0.6
0.5
0.4