XML:ONLV: Difference between revisions

567 bytes added ,  22 September 2013
m
adding notes on setting default texture format in master xml file -- png import is still buggy (OS 94 tested on a 64-bit windows: 512x512 became 512x256)
m (yep no more red grids at 20 world units)
m (adding notes on setting default texture format in master xml file -- png import is still buggy (OS 94 tested on a 64-bit windows: 512x512 became 512x256))
Line 116: Line 116:
* ''level_environment''.dae
* ''level_environment''.dae
* ''level_bnv''.dae
* ''level_bnv''.dae
* ''level_textures.tga/jpg
* ''level_textures.tga/jpg'' (png is still a bit buggy)
* Character.xml or AISA with player
* Character.xml or AISA with player
* ONSK name in <Sky> (can be fake name)
* ONSK name in <Sky> (can be fake name)
Line 194: Line 194:
| <Textures> {{Anchor|textures_tag}}
| <Textures> {{Anchor|textures_tag}}
| -
| -
|
| With OniSplit v0.9.94.0+ you can use attributes to set the default import formats and max dimensions. For example:
 
: <Textures Format="BGR" AlphaFormat="RGBA" MaxSize="512">
 
Textures that aren't power of two (2^x) or bigger than 512 will be scaled to be that way. For example: 2003x2000 becomes 512x512.
|-
|-
| <Texture Name="...">
| <Texture Name="...">
Line 207: Line 211:
|valign="top"| flag
|valign="top"| flag
|
|
:DXT1
:BGR
:BGR
:RGBA
:RGBA
Line 724: Line 729:
====[[#textures_tag|<Textures>]]====
====[[#textures_tag|<Textures>]]====
=====... used for exceptions=====
=====... used for exceptions=====
This tag is mandatory. AEKV textures will be imported by the master xml file automatically. Their formats will be DXT1 and BGRA4444 (for transparent ones). If you want them in better quality use the <Textures> tag. But if you are okay with the standard import you can write </Textures> to close the section.  
This tag is mandatory.
 
AKEV textures will be imported by the master xml file automatically, you don't need to write them into the xml master file.
 
: With OniSplit v0.9.82-93.0, the textures' formats will be DXT1 and BGRA4444 (for transparent ones).
: With OniSplit v0.9.94.0+ the textures' formats will be BGR and RGBA (for transparent ones).
 
To change the default texture import format, use the Texture'''s''' tag. (Possible with OniSplit v0.9.94.0+)
 
To change the format/flag/gunkflag of a specific texture, use the Texture tag.


Example of an exception (overwriting the standard format):
An example:


          <Textures Format="BGR" AlphaFormat="RGBA" MaxSize="512">
                 <Texture Name="GOO">
                 <Texture Name="GOO">
<!--<Flags></Flags>-->
                    <Flags>TwoSided</Flags>
                     <Format>RGBA</Format>
                     <Format>BGRA4444</Format>
                     <GunkFlags>NoCollision</GunkFlags>
                     <GunkFlags>NoCollision</GunkFlags>
                     <Image>env/images/GOO.tga</Image>
                     <Image>env/images/GOO.tga</Image>
                 </Texture>
                 </Texture>
          </Textures>


* There you can give a texture a special format, for example "bgra4444", to make it transparent.
* Use gunkflag "TwoSided" to make surfaces visible from both sides.
* Use gunkflag "TwoSided" to make surfaces visible from both sides.
* If the texture comes with gunkflag "NoCollision" then all objects with that texture will have no collision. Characters would fall through it.
* If the texture comes with gunkflag "NoCollision" then all objects with that texture will have no collision. Characters would fall through it.


Both makes sense, let's say, for a water-like substance. The biolab use this for an area with green acid.
Transparency and no collision makes both sense, let's say, for a water-like substance. The biolab use this for an area with green acid.


{| style="float:right"
{| style="float:right"
8,452

edits