XML:TXMP: Difference between revisions
(Link from Texture-XML to another Texture-XML... weird 0_o. Here is said "File suffixes like .tga or .oni are not used in the EnvMap link.", so I'm changing it from ".xml" to ".tga"..) |
m (link fix) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
==General notes== | ==General notes== | ||
* The XML on this page was tested with OniSplit '''v0.9.61.0'''. | * The XML on this page was tested with OniSplit '''v0.9.61.0'''. | ||
* Textures' X and Y dimensions | * Textures' X and Y dimensions are typically powers of two (e.g. 128, 256, 512). Oni and OniSplit will accept textures with dimensions that are not power-of-two, however there can be issues with them (see [[User talk:Neo/Archive5]], search "power"), so it's best to avoid them. | ||
* | * A texture's height 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. | * The camera can look at 2049 transparent textures at once; one more, and Oni crashes. | ||
Line 64: | Line 64: | ||
: DisableUWrap | : DisableUWrap | ||
: DisableVWrap | : DisableVWrap | ||
: Unknown0010 | : Unknown0010 (According to SRC, it was used by Bungie's Importer to determine the Pixel Type) | ||
: AnimUseLocalTime (to export an animated texture, extract the .oni file as XML) | : AnimUseLocalTime (to export an animated texture, extract the .oni file as XML) | ||
: HasEnvMap (don't use directly; used via tag) | : HasEnvMap (don't use directly; used via tag) | ||
Line 125: | Line 125: | ||
|valign=top| <EnvMap> | |valign=top| <EnvMap> | ||
|valign=top| link | |valign=top| link | ||
| TXMP''name'' ( | | | ||
:TXMP''name'' (without suffix) | |||
This tag is used if the XML file is meant to create a reflective texture. File suffixes like .tga or .oni are not used in the EnvMap link. | This tag is used if the XML file is meant to create a reflective texture. File suffixes like .tga or .oni are not used in the EnvMap link. | ||
Line 132: | Line 133: | ||
|valign=top| link | |valign=top| link | ||
| | | | ||
: TXMP''name''.tga | :TXMP''name''.tga | ||
Creating a texture from a JPEG, PNG or DDS is only supported via the command line's "-create:txmp" argument. | Creating a texture from a JPEG, PNG or DDS is only supported via the command line's "-create:txmp" argument. | ||
Line 141: | Line 142: | ||
[[Image:Animated_level_texture.gif|200px|thumb|Original animated texture.]] | [[Image:Animated_level_texture.gif|200px|thumb|Original animated texture.]] | ||
It's tiresome to manually create an XML file with a large number of <Image> tags. Skip that work by using [http:// | It's tiresome to manually create an XML file with a large number of <Image> tags. Skip that work by using [http://mods.oni2.net/node/332 Simple OniSplit GUI]. (Normal TXMP creation is also supported.) | ||
Some advice: | Some advice: | ||
# When using XML to import, OniSplit can only accept TGA images. | # When using XML to import, OniSplit can only accept TGA images. | ||
# AdditiveBlend should only be used on things that are supposed to glow — otherwise you might think that the object ignores its vertex shading. In the case of the billboard at the right, this was an improvement; now it's a transparent OLED billboard. | # AdditiveBlend should only be used on things that are supposed to glow — otherwise you might think that the object ignores its vertex shading. In the case of the billboard at the right, this was an improvement; now it's a transparent OLED billboard. | ||
# Long animations in high quality (512x512, RGB) produce VERY big .oni files. The source billboard GIF is 1.7MB and the resulting .oni file is 273MB. That's because TXAN doesn't support variable timing like the GIF format, so a smooth animation like this one will have a ton of duplicate frames in it. Even as a ZIP, the .oni file was still 66MB, which is unreasonably large. The billboard could possibly be broken into 3 static and 3 transitional images, and then animated "manually" via a [[ | # Long animations in high quality (512x512, RGB) produce VERY big .oni files. The source billboard GIF is 1.7MB and the resulting .oni file is 273MB. That's because TXAN doesn't support variable timing like the GIF format, so a smooth animation like this one will have a ton of duplicate frames in it. Even as a ZIP, the .oni file was still 66MB, which is unreasonably large. The billboard could possibly be broken into 3 static and 3 transitional images, and then animated "manually" via a [[Creating a level#Texture exchange|BSL loop]]. The conclusion is to use animated images with lower quality settings and to avoid long periods of duplicate frames which waste space. | ||
[[Creating animated images|HERE]] is some information on how to create an animated texture within various graphics programs. | [[Creating animated images|HERE]] is some information on how to create an animated texture within various graphics programs. | ||
{{XML}} | {{XML}} |
Latest revision as of 01:20, 20 November 2023
TXMP : Texture Map | ||
---|---|---|
XML
TXMB << Other file types >> TxtC |
General notes
- The XML on this page was tested with OniSplit v0.9.61.0.
- Textures' X and Y dimensions are typically powers of two (e.g. 128, 256, 512). Oni and OniSplit will accept textures with dimensions that are not power-of-two, however there can be issues with them (see User talk:Neo/Archive5, search "power"), so it's best to avoid them.
- A texture's height 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.
Tag hierarchy
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 tags
XML tag | Content type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<Texture> | - | |||||||||||||||||||||||||||||||||
<Flags> | flag |
| ||||||||||||||||||||||||||||||||
<Format> | flag | ARGB formats are used for reflective textures (Alpha Red Green Blue)
ARGB8888 can be used only if you use an updated engine (which comes with the AE). (When Macs were still on the PowerPC processor, Oni's textures needed to have their color channels swapped or else they would appear color-inverted, but after the move to Intel Macs, both platforms used the same Windows-format textures.)
| ||||||||||||||||||||||||||||||||
<Speed> | integer | This tag is used if the XML file is meant to create an animated texture. In that case you would use multiple <Image> tags.
Let's say Speed is set to 7 — then the animation will advance every 7th frame. | ||||||||||||||||||||||||||||||||
<EnvMap> | link |
This tag is used if the XML file is meant to create a reflective texture. File suffixes like .tga or .oni are not used in the EnvMap link. | ||||||||||||||||||||||||||||||||
<Image> | link |
Creating a texture from a JPEG, PNG or DDS is only supported via the command line's "-create:txmp" argument. |
Animated textures
It's tiresome to manually create an XML file with a large number of <Image> tags. Skip that work by using Simple OniSplit GUI. (Normal TXMP creation is also supported.)
Some advice:
- When using XML to import, OniSplit can only accept TGA images.
- AdditiveBlend should only be used on things that are supposed to glow — otherwise you might think that the object ignores its vertex shading. In the case of the billboard at the right, this was an improvement; now it's a transparent OLED billboard.
- Long animations in high quality (512x512, RGB) produce VERY big .oni files. The source billboard GIF is 1.7MB and the resulting .oni file is 273MB. That's because TXAN doesn't support variable timing like the GIF format, so a smooth animation like this one will have a ton of duplicate frames in it. Even as a ZIP, the .oni file was still 66MB, which is unreasonably large. The billboard could possibly be broken into 3 static and 3 transitional images, and then animated "manually" via a BSL loop. The conclusion is to use animated images with lower quality settings and to avoid long periods of duplicate frames which waste space.
HERE is some information on how to create an animated texture within various graphics programs.