XML:TXMP: Difference between revisions
Paradox-01 (talk | contribs) (Created page with "__TOC__ {{Template:XMLModdingHints}} {| border=0 cellspacing=20 cellpadding=0 style="margin-left:auto; margin-right:auto" | The xml code on this page is compatible with onisp...") |
m (marking dead links) |
||
(18 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{XML_File_Header | type=TXMP | prev=TXMB | next=TxtC | name=Texture Map }} | |||
{{ | |||
===general notes=== | |||
* The xml code on this page was tested with onisplit '''v0.9.61.0''' | |||
* Textures' x and y (pixel) dimension must be power of two: 512, 256, 128, 64, etc. (The TXMP used to compose the [[XML:TXMB|TXMB]] files seem to be an exception). | |||
** Hight and width don't need to be equal, e.g. you can use 128x256. | |||
* The camera can look at 2049 transparent textures at once, one more and Oni crashes. | |||
===TXMP subtypes=== | |||
{|class="wikitable" width="100%" | {|class="wikitable" width="100%" | ||
! | ! standard texture | ||
! animated texture | ! animated texture | ||
! reflective texture | ! reflective texture | ||
Line 53: | Line 54: | ||
|valign=top| <?xml version="1.0" encoding="utf-8"?> | |valign=top| <?xml version="1.0" encoding="utf-8"?> | ||
|valign=top| float, flag | |valign=top| float, flag | ||
| | |valign=top| Don't change this. | ||
|- | |- | ||
|valign=top| <Oni> | |valign=top| <Oni> | ||
Line 65: | Line 66: | ||
|valign=top| <Flags> | |valign=top| <Flags> | ||
|valign=top| flag | |valign=top| flag | ||
| | | | ||
[[Image:problems_with_AdditiveBlend_and_regular_transparency.jpg|thumb|200px|right|Caution with transparent textures.]] | |||
: None | |||
: HasMipMaps | |||
: DisableUWrap | |||
: DisableVWrap | |||
: Unknown0010 | |||
: AnimUseLocalTime (to export an animated texture convert the oni file to xml) | |||
<!-- HasEnvMap (used via tag, not flag) --> | |||
: AdditiveBlend (makes black texture parts transparent in-game, usually set for animated textures) | |||
: AnimBackToBack | |||
: AnimRandom | |||
<!-- SwapBytes (automatically added in v0.9.56.0 and above, flag doesn't become exported) --> | |||
: AnimIgnoreGlobalTime | |||
: ShieldEffect (hardcoded usage, reserved for TXMPshield) | |||
: InvisibilityEffect (hardcoded usage, reserved for TXMPinvis) | |||
: DaodanEffect (hardcoded usage, reserved for TXMPDAODAN_SHIELD) | |||
|- | |||
|valign=top| <Format> | |||
|valign=top| flag | |||
| '''A'''RGB formats are used for reflective textures. (A - Alpha; R - Red; G - Green; B - Blue) | |||
{|class="wikitable" | ARGB8888 can be used only if you use an updated engine (which comes with AE). (Oni running on a modern Intel Mac uses the same texture format as Windows Oni, but users of older PowerPC Macs will need to [http://oni.bungie.org/forum/viewtopic.php?pid=29967#p29967 swap the color channels] of a texture or else it will appear inverted.) | ||
{|class="wikitable" width="100%" | |||
!colspan=2|XML flags | !colspan=2|XML flags | ||
!colspan=2|<font color="#999999">command line flags</font> | !colspan=2|<font color="#999999">command line flags</font> | ||
Line 100: | Line 122: | ||
|colspan=2 align=center|'''<font color="#999999">bgra4444</font>''' | |colspan=2 align=center|'''<font color="#999999">bgra4444</font>''' | ||
|- | |- | ||
|colspan=2 align=center|'''DXT1''' | |colspan=2 align=center|'''[[wikipedia:S3_Texture_Compression|DXT1]]''' | ||
|colspan=2 align=center|'''<font color="#999999">dxt1</font>''' | |colspan=2 align=center|'''<font color="#999999">dxt1</font>''' | ||
|} | |} | ||
|- | |- | ||
|valign=top| <Speed> | |valign=top| <Speed> | ||
|valign=top| integer | |valign=top| integer | ||
| This tag is used if xml file is meant to create an animated texture. In that case you use multiple <Image> tags. | | This tag is used if xml file is meant to create an animated texture. In that case you use multiple <Image> tags. | ||
Let's say Speed is set to 7, then every 7th frame will change the image. | |||
|- | |- | ||
|valign=top| <EnvMap> | |valign=top| <EnvMap> | ||
Line 133: | Line 136: | ||
| TXMP''name'' (file suffix .oni/.xml not allowed) | | TXMP''name'' (file suffix .oni/.xml not allowed) | ||
This tag is used if xml file is meant to create an reflective texture. | This tag is used if xml file is meant to create an reflective texture. File suffixes like .tga or .oni is not used in the EnvMap link. | ||
|- | |- | ||
|valign=top| <Image> | |valign=top| <Image> | ||
|valign=top| link | |valign=top| link | ||
| | | | ||
: TXMP''name''.tga | |||
: | JGP, PNG and DDS are only supported by creation via commandline with -create:txmp | ||
|} | |} | ||
===Animated textures=== | |||
[[Image:Animated_level_texture_with_and_without_AdditiveBlend.jpg|200px|thumb|Animated billboard]] | |||
[[Image:Animated_level_texture.gif|200px|thumb|Animated billboard GIF]] | |||
It requires some tiresome handwork to write an XML file with a large number of <Image> tags. | |||
Skip that work (<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/Simple_OniSplit_GUI_TXMP_animated.png</nowiki>, dead link) by using [http://paradox.oni2.net/programs/Simple_OniSplit_GUI.zip Simple OniSplit GUI.] (Normal TXMP creation (<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/Simple_OniSplit_GUI_TXMP.png</nowiki>, dead link) is also supported.) | |||
Notes of warning: | |||
# With XML, OniSplit can only import TGA files. | |||
# AdditiveBlend should only be used on things that are supposed to glow otherwise you might think that it ignores vertex shading. In case of the billboard at the right, that was an improvement. Now it's a transparent OLED billboard. | |||
# Long animations in high quality (512x512, RGB) will produce very big oni files. The not-edited billboard gif is 1.7MB, the oni file is 273MB. That's because TXAN can use high quality and stores also all repetitive frames. The compressed oni (zip) was still 66MB which is still unreasonable large for people with small internet bandwidth. The billboard could possibly broken up into the 3 static and 3 transitional images. You would then need a [[XML:ONLV#Texture_exchange|BSL loop]] to keep the animation going. So the conclusion is to use animated images with lower quality settings and avoid repetitive elements. | |||
[[Creating_image_animations|HERE]] are a few information on how to create an animated texture within a graphics program. | |||
{{XML}} |
Revision as of 13:51, 21 August 2020
TXMP : Texture Map | ||
---|---|---|
XML
TXMB << Other file types >> TxtC |
general notes
- The xml code on this page was tested with onisplit v0.9.61.0
- Textures' x and y (pixel) dimension must be power of two: 512, 256, 128, 64, etc. (The TXMP used to compose the TXMB files seem to be an exception).
- Hight and width don't need to be equal, e.g. you can use 128x256.
- The camera can look at 2049 transparent textures at once, one more and Oni crashes.
TXMP subtypes
standard texture | animated texture | reflective texture |
---|---|---|
<?xml version="1.0" encoding="utf-8"?> <Oni> <Texture> <Flags>...</Flags> <Format>...</Format> <Image>...</Image> </Texture> </Oni> |
<?xml version="1.0" encoding="utf-8"?> <Oni> <Texture> <Flags>...</Flags> <Format>...</Format> <Speed>...</Speed> <Image>...</Image> <Image>...</Image> </Texture> </Oni> |
<?xml version="1.0" encoding="utf-8"?> <Oni> <Texture> <Flags>...</Flags> <Format>...</Format> <EnvMap>...</EnvMap> <Image>...</Image> </Texture> </Oni> |
XML tag | content type | description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<?xml version="1.0" encoding="utf-8"?> | float, flag | Don't change this. | ||||||||||||||||||||||||||||||||
<Oni> | - | |||||||||||||||||||||||||||||||||
<Texture> | - | |||||||||||||||||||||||||||||||||
<Flags> | flag |
| ||||||||||||||||||||||||||||||||
<Format> | flag | ARGB formats are used for reflective textures. (A - Alpha; R - Red; G - Green; B - Blue)
ARGB8888 can be used only if you use an updated engine (which comes with AE). (Oni running on a modern Intel Mac uses the same texture format as Windows Oni, but users of older PowerPC Macs will need to swap the color channels of a texture or else it will appear inverted.)
| ||||||||||||||||||||||||||||||||
<Speed> | integer | This tag is used if xml file is meant to create an animated texture. In that case you use multiple <Image> tags.
Let's say Speed is set to 7, then every 7th frame will change the image. | ||||||||||||||||||||||||||||||||
<EnvMap> | link | TXMPname (file suffix .oni/.xml not allowed)
This tag is used if xml file is meant to create an reflective texture. File suffixes like .tga or .oni is not used in the EnvMap link. | ||||||||||||||||||||||||||||||||
<Image> | link |
JGP, PNG and DDS are only supported by creation via commandline with -create:txmp |
Animated textures
It requires some tiresome handwork to write an XML file with a large number of <Image> tags.
Skip that work (https://dl.dropboxusercontent.com/u/139715/OniGalore/Simple_OniSplit_GUI_TXMP_animated.png, dead link) by using Simple OniSplit GUI. (Normal TXMP creation (https://dl.dropboxusercontent.com/u/139715/OniGalore/Simple_OniSplit_GUI_TXMP.png, dead link) is also supported.)
Notes of warning:
- With XML, OniSplit can only import TGA files.
- AdditiveBlend should only be used on things that are supposed to glow otherwise you might think that it ignores vertex shading. In case of the billboard at the right, that was an improvement. Now it's a transparent OLED billboard.
- Long animations in high quality (512x512, RGB) will produce very big oni files. The not-edited billboard gif is 1.7MB, the oni file is 273MB. That's because TXAN can use high quality and stores also all repetitive frames. The compressed oni (zip) was still 66MB which is still unreasonable large for people with small internet bandwidth. The billboard could possibly broken up into the 3 static and 3 transitional images. You would then need a BSL loop to keep the animation going. So the conclusion is to use animated images with lower quality settings and avoid repetitive elements.
HERE are a few information on how to create an animated texture within a graphics program.