XML:TXMB: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (Iritscen moved page OBD talk:TXMB to XML:TXMB without leaving a redirect)
(No difference)

Revision as of 18:26, 6 November 2012

TXMB: texture map big

Template:XMLModdingHints

The xml code on this page is compatible with onisplit v0.9.61.0
640x480 made of ...

_0 - 256x256
_1 - 256x256
_2 - 128x256
_3 - 256x224
_4 - 256x224
_5 - 128x224

+-----+-----+---+
| _0  | _1  |_2 |
|     |     |   |
|     |     |   |
+---------------+
| _3  | _4  |_5 |
|     |     |   |
+---------------+
1024x768 made of ...

_0  - 256x256
_1  - 256x256
_2  - 256x256
_3  - 256x256
_4  - 256x256
_5  - 256x256
_6  - 256x256
_7  - 256x256
_8  - 256x256
_9  - 256x256
_10 - 256x256
_11 - 256x256

+-----+-----+-----+-----+
| _0  | _1  | _2  | _3  |
|     |     |     |     |
+-----------------+-----+
| _4  | _5  | _6  | _7  |
|     |     |     |     |
+-----------------+-----+
| _8  | _9  | _10 | _11 |
|     |     |     |     |
+-----------------+-----+


general information

  • TXMB files are splash screens which we see at level start, and at end (one for losing the level and one for winning).
  • A TXMB file hold links to TXMPs which then together make a big picture.
    This is needed because the current max resolution for a single TXMP on PC is 512x512 and on Mac 1024x1024. (9 April 2012)
  • The number of columns and rows (TXMPs) is computed at runtime.
    Probably the engine checks the horizontal dimension of the TXMPs until the desired x size is reached and then starts a new row.
    So it should be possible to create also other TXMB resolutions and TXMP constellations.
  • They are called by BSL command "splash_screen image_name".
    They can be called whenever we like to. The game will be paused then.


Example TXMB -- TXMBwin_splash_screen.xml (from level1_Final/NoGlobal)

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <TXMB id="0">
       <Width>640</Width>
       <Height>480</Height>
       <Textures>
           <Link>TXMPlevel01_win_0</Link>
           <Link>TXMPlevel01_win_1</Link>
           <Link>TXMPlevel01_win_2</Link>
           <Link>TXMPlevel01_win_3</Link>
           <Link>TXMPlevel01_win_4</Link>
           <Link>TXMPlevel01_win_5</Link>
       </Textures>
   </TXMB>
</Oni>


template: 640x480
creating_TXMB_preview.png

Example TXMP -- TXMPlevel01_win_0.xml (from level1_Final/NoGlobal)

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <Texture>
       <Flags>DisableUWrap  DisableVWrap</Flags>
       <Format>BGR555</Format>
       <Image>TXMPlevel01_win_0.tga</Image>
   </Texture>
</Oni>


Example on createing a 640x480 TXMB:

  • The actual work is to split the image into six smaller.
  • Here's a method for Photoshop -- .tif should also work with any other layer supporting grafic programm.
  • The six-part colored layer should be a help when the program cannot load a selection.
  • Let's drag'n'drop our image into this TXMB barebone (.psd / .tif) and bring it into center position.
  • Now we can right-click, load a selection, crop and save it as "..._N" (whereas N is a number from 0 to 5).
  • Let's redo crop, load another selection, save this piece, and so on.