OBD:TXMP: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (design; deleted wrong table; moved mipmap and alpha explanation to discussion page)
Line 1: Line 1:
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File types]] >> TXMP
{{OBD_File_Header | type=TXMP | prev=TXMB | next=TxtC | name=Texture Map | family=Generic | align=center}}




<CENTER>[[OBD:TXMB|<==]] <FONT SIZE=5>TXMP : Texture Map</FONT> [[OBD:TxtC|==>]]<BR>
[[image:txmp_all.gif]]
<FONT SIZE=2>[[OBD:File types/General|General]] file</FONT></CENTER>




http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/txmp_all.gif
{{Table}}
 
{{OBD_Table_Header}}
 
|- ALIGN=CENTER VALIGN=TOP
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
{{OBDtr| 0x00 | res_id  |FF0000| 01 1F 00 00 | 31       | 00031-rl_1.TXMP }}
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
{{OBDtr| 0x04 | lev_id  |FFFF00| 01 00 00 06 | 3         | level 3 }}
| WIDTH=15% | <B>Raw hex</B>
{{OBDtr2|0x08 | char[128]|FFC8C8| rl_1                   | name of the texture }}
| WIDTH=15% | <B>Translation</B>
{{OBDtr| 0x88 | bitset  |FFFFC8| 00         | 0         | texture options 1; see the [[OBD_Talk:TXMP|discussion page]] for details }}
| WIDTH=70% | <B>Meaning</B>
{{OBDtr| 0x89 | bitset  |FFFFC8| 10         | 16       | texture options 2; see the [[OBD_Talk:TXMP|discussion page]] for details }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x8A | bitset  |FFFFC8| 00         | 0         | texture options 3; see the [[OBD_Talk:TXMP|discussion page]] for details }}
| BGCOLOR="#FF0000" | 01 1F 00 00
{{OBDtr| 0x8B | bitset  |FFFFC8| 00          | 0        | unused bitset; always zero }}
| 31
{{OBDtr| 0x8C | int16    |C8FFC8| 80 00       | 128       | width of the image in pixel }}
| ALIGN=LEFT | 00031-rl_1.TXMP
{{OBDtr| 0x8E | int16    |C8FFC8| 80 00       | 128       | height of the image in pixel }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0x90 | int32    |C8FFFF| 01 00 00 00 | 1         | store type; see the [[OBD_Talk:TXMP|discussion page]] for details }}
| BGCOLOR="#FFFF00" | 01 00 00 06
{{OBDtr| 0x94 | link    |FFC8FF| 00 00 00 00 | unused    | link to a [[OBD:TXAN|TXAN]] file; only used if the texture is the first pic of an texture animation }}
| 3
{{OBDtr| 0x98 | link    |FFC800| 00 00 00 00 | unused    | link to a TXMP file; only used in connection with shade vertex effects }}
| ALIGN=LEFT | level 3
{{OBDtr| 0x9C | offset  |C800C8| 20 00 00 00 |00 00 00 20| at this position starts the texture part in the raw file (PC only) }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr| 0xA0 | offset  |C87C64| 00 00 00 00 | unused    | at this position starts the texture part in the sep file (Mac and PC demo only) }}
| BGCOLOR="#00FF00" COLSPAN=2 | <TT>rl_1</TT>
{{OBDtr| 0xA4 | char[28] |B0C3D4| AD DE       | dead     | unused }}
| ALIGN=LEFT | name of the texture
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00FFFF" | 00
| 0
| ALIGN=LEFT | MIP-mapping option; the following options are possible:<P>00 - off<BR>01 - on
 
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00FF" | 10
| 16
| ALIGN=LEFT | color depth (= 16 bits)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8C8" | 00 00
| 0
| ALIGN=LEFT | unknown (blank filler?)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 80 00
| 128
| ALIGN=LEFT | width (= 128 pixels)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 80 00
| 128
| ALIGN=LEFT | height (= 128 pixels)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFC8" | 01 00 00 00
| 1
| ALIGN=LEFT | store type = 1 (uncompressed, without alpha blending)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | 00 00 00 00
| not used
| ALIGN=LEFT | link to a [[OBD:TXAN|TXAN]] file; only used if the texture is the first pic of a texture animation
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC8FF" | 00 00 00 00
| not used
| ALIGN=LEFT | link to a TXMP file; only used in connection with vertex shading effects
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFC800" | 20 00 00 00
| 32
| ALIGN=LEFT | address at which the texture is stored in the raw file (on PC; null on Mac and PC demo)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C800C8" | 00 00 00 00
| 0
| ALIGN=LEFT | address at which the texture is stored in the sep file (on Mac and PC demo; null on PC)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C87C64" | AD DE
| dead
| ALIGN=LEFT | not used
|}
|}
;[http://www.answers.com/topic/mipmap MIP mapping] (MIP stands for "multum in parvo")
:A texture mapping technique that uses multiple texture maps, or MIP maps. Each MIP map is half the size of the first one, providing several texture maps for various levels of depth.
;[http://www.answers.com/topic/alpha-blending?method=22 Alpha blending]
:In computer graphics, the combining of the alpha channel with other layers in an image in order to show translucency.
:The alpha channel is an additional eight bits used with each pixel in a 32-bit graphics system that can represent 256 levels of translucency.
:(here, the base color depth is 16 bits; and there are only 4 bits for the alpha channel, so only 16 levels of transparency. [[User:Geyser|geyser]])




{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
Below you can see the pictures for this example. The first picture shows how it's stored in Oni, the second how you see it in the game.
|- BGCOLOR="#FFDDBB"
| WIDTH=15% | <B>Option</B>
| WIDTH=15% | <B>Value</B>
| WIDTH=70% | <B>Meaning</B>
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| ROWSPAN=4 | MIP-mapping types
| BGCOLOR="#00FFFF" | 00
| off
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00FFFF" | 01
| on
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00FFFF" | 11
| unknown
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#00FFFF" | 1C
| unknown (used for skyboxes, works with 00 too)
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| ROWSPAN=4 | Color depths
| BGCOLOR="#FF00FF" | 10
| 16 bit
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00FF" | 12
| 16 bit + shade vertex
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00FF" | 14
| 16 bit + 4 bits for the alpha channel
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FF00FF" | 20
| 32 bit
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| ROWSPAN=8 | Store types
| BGCOLOR="#C8FFFF" | 00
| uncompressed, with alpha blending
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | 01
| uncompressed, without alpha blending
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | 02
| unknown
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | 03
| unknown
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | 08
| 32 bit uncompressed (used for skyboxes)
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | 09
| compressed
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | 0A
| unknown
|- VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | 0B
| unknown
|}




Below you can see the pictures for this example. The first picture shows how its stored in Oni, the second how you'll see it in the game.
{|border=0
 
 
{|cellpadding=10
|+Pixel arrangement
|+Pixel arrangement
!how it's stored
!how it's stored
!&nbsp;
!how you'll see it
!how you'll see it
|-
|-
|http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/txmp_ex1.gif
|http://ssg.oni2.net/images/txmp_ex1.gif
|http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/txmp_ex2.gif
|&nbsp;
|http://ssg.oni2.net/images/txmp_ex2.gif
|}
|}
You can edit the TXMP data in the raw/sep file manually (although we recommend [[OBD:OUP| Oni Un/Packer]]) : there's a tutorial [http://www6.fh-eberswalde.de/user/dkriesch/onistuff/subfold/texture/texture.htm here]
<HR>
<CENTER>[[OBD:TXMB|<==]] <B>TXMP : Texture Map</B> [[OBD:TxtC|==>]]</CENTER>
<HR>




[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File types]] >> TXMP
{{OBD_File_Footer | type=TXMP | prev=TXMB | next=TxtC | name=Texture Map | family=Generic}}

Revision as of 20:01, 8 September 2007

ONI BINARY DATA
TXMB << Other file types >> TxtC
TXMP : Texture Map
switch to XML:TXMP page
Overview @ Oni Stuff
OBD.png


Txmp all.gif


Offset Type Raw Hex Value Description
0x00 res_id 01 1F 00 00 31 00031-rl_1.TXMP
0x04 lev_id 01 00 00 06 3 level 3
0x08 char[128] rl_1 name of the texture
0x88 bitset 00 0 texture options 1; see the discussion page for details
0x89 bitset 10 16 texture options 2; see the discussion page for details
0x8A bitset 00 0 texture options 3; see the discussion page for details
0x8B bitset 00 0 unused bitset; always zero
0x8C int16 80 00 128 width of the image in pixel
0x8E int16 80 00 128 height of the image in pixel
0x90 int32 01 00 00 00 1 store type; see the discussion page for details
0x94 link 00 00 00 00 unused link to a TXAN file; only used if the texture is the first pic of an texture animation
0x98 link 00 00 00 00 unused link to a TXMP file; only used in connection with shade vertex effects
0x9C offset 20 00 00 00 00 00 00 20 at this position starts the texture part in the raw file (PC only)
0xA0 offset 00 00 00 00 unused at this position starts the texture part in the sep file (Mac and PC demo only)
0xA4 char[28] AD DE dead unused


Below you can see the pictures for this example. The first picture shows how it's stored in Oni, the second how you see it in the game.


Pixel arrangement
how it's stored   how you'll see it
txmp_ex1.gif   txmp_ex2.gif


ONI BINARY DATA
TXMB << Other file types >> TxtC
TXMP : Texture Map
Generic file