XML:TXMP: Difference between revisions
Paradox-01 (talk | contribs) mNo edit summary |
m (link fix) |
||
Line 89: | Line 89: | ||
| '''A'''RGB formats are used for reflective textures. (A - Alpha; R - Red; G - Green; B - Blue) | | '''A'''RGB 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 [http://oni.bungie.org | 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%" | {|class="wikitable" width="100%" |
Revision as of 14:44, 13 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 by using Simple OniSplit GUI. (Normal TXMP creation 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.