XML:ONLV: Difference between revisions

2,903 bytes removed ,  27 February 2013
m
tested env_texswap; removed some old stuff
m (the "twosided" paradox)
m (tested env_texswap; removed some old stuff)
Line 1: Line 1:
{{finish}}{{update}}
{{finish}}{{update}}
;Todo list
* add xml header to this page
* more notes on the shared folder
* test import with prefix-ed files in shared folder
* tips with cutscene charas: sync pelvis OBANs and partner TRAM
* examine low doors/openings: atm sliding under low objects don't seem to work
* more notes on BNV, linked xml, and exported xml files




__TOC__
==Level releases, forum threads and wiki pages==
Custom levels that have been created so far:
Custom levels that have been created so far:
* [http://oni.bungie.org/community/forum/viewtopic.php?id=2357 Old China]
* [http://oni.bungie.org/community/forum/viewtopic.php?id=2357 Old China]
Line 18: Line 29:
* [http://oni.bungie.org/community/forum/viewtopic.php?pid=37252#p37252 "Modding Existing levels - Beta" ("Moveable furniture" post)]
* [http://oni.bungie.org/community/forum/viewtopic.php?pid=37252#p37252 "Modding Existing levels - Beta" ("Moveable furniture" post)]


wiki pages about levels:
Wiki pages about levels:
* [[AE:Levels]]
* [[AE:Levels]]
* [[AE:Lightmapping_levels]]
* [[AE:Lightmapping_levels]]
* [[SketchUp_tutorials_and_tips|SketchUp tutorials and tips]]
* [[SketchUp_tutorials_and_tips|SketchUp tutorials and tips]]


Free texture resources
* [http://www.tutorialsforblender3d.com/Textures/Textures_index.html various game textures]
* [http://forums.epicgames.com/threads/603122-Remus-high-resolution-skydome-texture-pack skies and objects of the solar system]
* [http://blenderartists.org/forum/showthread.php?224065-New-High-resolution-sky-pack-for-Blender skies] <!-- (http://www.wuala.com/Olson/Photos/Optikz_360_Skies/) -->
* [http://blenderartists.org/forum/showthread.php?24038-Free-high-res-skymaps-%28Massive-07-update!%29 skies]
* [http://www.cgtextures.com/ CG Textures for 3D]
==Level import with onisplit [http://mods.oni2.net/node/38 0.9.82.0]==
'''General information on level import'''
* the import doesn't work with empty skybox tag; <Sky>clear</Sky> helps here (or maybe onisplit just wants a name and doesn't care if the resource really exists?)
* triangle limit: ca. 520.000 (500.000 to be on save side)
* actually this is not about the import but when the triangles are packed too tight then the cam will look at too many of them and glitches appear: the visible GQs limit is ca. 16.000, sooner or later higher numbers will cause render bugs and call BSL message "Exceeded max visible GQs ''number''" (you can decrease the gs_farclipplane_set value to avoid that problem)
* also, keep in mind that characters are visible ''only'' within 4099|4099|4099 and -4099|-4099|-4099 world units
* geometry stops at ca. X=4228|Z=4228 and -4228|-4228 (height not tested)


For praxis information see: "Creating the Lair - A level tutorial" link.


'''Demo files'''


==Level import with onisplit [http://mods.oni2.net/node/38 0.9.82.0]==
Demo files can be downloaded [http://dl.dropbox.com/u/1869/lab.zip here].
Demo files can be downloaded [http://dl.dropbox.com/u/1869/lab.zip here].


Line 53: Line 78:




===the master xml file===
===The master xml file===
The '''master xml file name''' determine the '''bsl folder name''' and the '''AKEV and ONLV file name''' in the output folder.
 
;trimmed master file "lab.xml" from the demo:
{| class="wikitable" style="float:right"
{| class="wikitable" style="float:right"
|
|
Line 62: Line 90:
* Character.xml with player
* Character.xml with player
|}
|}
 
<?xml version="1.0" encoding="utf-8" ?>
The '''master xml file name''' determine the '''bsl folder name''' and the '''AKEV and ONLV file name''' in the output folder.
<Oni>
    <Level SharedPath="../shared">
        <Environment>
            <Model>
                <Import Path="env/lab_env.dae"/>
                <Import Path="env/lab_bomber_window.dae"/>
                <Import Path="env/lab_motorcycle.dae">
                    <Node Id="motorcycle">
                        <ScriptId>9</ScriptId>
                        <GunkFlags>NoCollision</GunkFlags>
                    </Node>
                </Import>
            </Model>
            <Rooms>
                <Import Path="env/lab_bnv.dae"/>
            </Rooms>
            <Textures>
                <Texture Name="GOO">
                    <Format>bgra4444</Format>
                    <GunkFlags>NoCollision</GunkFlags>
                    <Image>env/images/GOO.tga</Image>
                </Texture>
            </Textures>
        </Environment>
        <Sky>sunset</Sky>
        <Objects>
            <Import>Character.xml</Import>
            <Import>Furniture.xml</Import>
            <Import>TriggerVolume.xml</Import>
            <Import>Physics.xml</Import>
        </Objects>
        <Films>
            <Import>films/BomberKonRun01.xml</Import>
            <Import>films/BomberKonRun02.xml</Import>
        </Films>
        <Cameras>
            <Camera Path="cameras/BomberCam01.dae">
                <Animation Name="BomberCam01"/>
            </Camera>
            <Camera Path="cameras/BomberCam02.dae">
                <Animation Name="BomberCam02"/>
            </Camera>
        </Cameras>
    </Level>
</Oni>




====shared folder====
====Shared folder====
The master xml file can link to other xml files, most of them are [[OBD:BINA/OBJC#OBJC_types|BINACJBO]] files. The file type gets declared inside the file, so the file name itself doesn't has to contain the type. Ergo, "BINACJBOCharacter.xml" can be given a simpler name like "Character.xml".
The master xml file can link to other xml files, most of them are [[OBD:BINA/OBJC#OBJC_types|BINACJBO]] files. The file type gets declared inside the file, so the file name itself doesn't has to contain the type. Ergo, "BINACJBOCharacter.xml" can be given a simpler name like "Character.xml".


Line 117: Line 189:




=====breakable objects with BSL recognition=====
=====Breakable objects with BSL recognition=====
Broken env objects can be recognized by bsl command ''env_broken (ID_1, ID_N)''. However, this whole thing requires additional code to work.
Broken env objects can be recognized by bsl command ''env_broken (ID_1, ID_N)''. However, this whole thing requires additional code to work.


Line 211: Line 283:




=====texture exchange=====
=====Texture exchange=====
Not tested.
BSL command [[BSL:PC_vs._Mac_Comparison_(table)|supported]] for PC and Mac:
 
source: ([[OBD:IDXA_AKEV_2]])
 
BSL command [[BSL:PC_vs._Mac_Comparison_(table)|supported]] by PC and Mac:
: env_texswap ID texture
: env_texswap ID texture


Line 391: Line 459:




==Level import with onisplit 0.9.68.0==
(This section refers to the last version of onisplit v0.9.68.0, no others.)
Levels can be created with a xml master file. The name of that file determines the BSL folder name (doublecheck this later).
onisplit -create:level onis master.xml
Onisplit can use already created *.oni files inside the classes folder, however not all file types can be used.
Ignored file types:
* CONS
* OBAN
* OFGA
* TXMP
* ?


Allowed file types:
==Exported Oni Level (ONLV*.xml)==
* M3GM
* ?
 
The xml master file links to dae and other xml files. Its used by onisplit to create *.oni files of ONLV, AKEV, TXMP and the object collections.
 
'''example of master.xml'''
<?xml version="1.0" encoding="utf-8" ?>
<Oni>
    <Level SharedPath="../classes">
        <Environment>
        <Model>
            <Import>level.dae</Import>
        </Model>
        <Rooms>
            <Import>level_bnv.dae</Import>
        </Rooms>
        <Textures>
            <Import>textures.xml</Import>
        </Textures>
        </Environment>
        <Sky>grimmnight</Sky>
        <Objects>
        <Import>Objects.xml</Import>
        <Import>BINACJBOCharacter.xml</Import>
        <Import>BINACJBODoor.xml</Import>
        <Import>BINACJBOFlag.xml</Import> 
        <Import>BINACJBOTriggerVolume.xml</Import>
        <Import>BINACJBOConsole.xml</Import>
        <Import>BINACJBOFurniture.xml</Import>
        <Import>BINACJBOParticle.xml</Import>
        <Import>BINACJBOPatrol Path.xml</Import>
        <Import>BINACJBOPowerUp.xml</Import>
        <Import>BINACJBOTurret.xml</Import>
        <Import>BINACJBOTrigger.xml</Import>
        <Import>BINACJBOParticle.xml</Import>
        <Import>BINACJBOSound.xml</Import>
        </Objects>
    </Level>
</Oni>
 
'''example of textures.xml'''
 
<GunkFlags> should be AGQG flags of [[OBD_talk:ONLV#AKEV:_Akira_Environment|AKEV]], also listed at "onisplit -help enums"
 
<?xml version="1.0" encoding="utf-8" ?>
<Oni>
    <Textures>
    <Texture Name="china_lava">
            <GunkFlags>NoCollision</GunkFlags>
            <Format>RGBA</Format>
            <Image>china/TXMPchina_lava.jpg</Image>
        </Texture>
    </Textures>
</Oni>
 
 
'''example of Objects.xml'''
 
<Geometry> holds a OFGA file linking to M3GM file(s)
 
<Flags> should be OBOA flags of [[OBD_talk:ONLV#ONLV:_Oni_Level|ONLV]], also listed at "onisplit -help enums"
 
<Physics> should be OBOA physics flags of [[OBD_talk:ONLV#ONLV:_Oni_Level|ONLV]], also listed at "onisplit -help enums"
 
<?xml version="1.0" encoding="utf-8"?>
<Oni>
    <Physics>
<Object Name="single_heli_rotorblades_center">
                <Geometry>heli_rotorblades</Geometry>
                <Animation>single_heli_rotorblades_center</Animation>
                <Flags>InUse</Flags>
                <Physics>Animated</Physics>
                <ScriptId>1</ScriptId>
                <Position>800 600 2420</Position>
                <Rotation>-0.07206057 0.656310439 -0.06319542 0.7483784</Rotation>
                <Scale>3.69</Scale>
      </Object>
    </Physics>
</Oni>
 
 
'''additional information'''
* the import doesn't work with empty skybox tag; <Sky>clear</Sky> helps here (or maybe onisplit just wants a name and doesn't care if the resource really exists?)
* triangle limit: ca. 520.000 (500.000 to be on save side)
* actually this is not about the import but when the triangles are packed too tight then the cam will look at too many of them and glitches appear: the visible GQs limit is ca. 16.000, sooner or later higher numbers will cause render bugs and call BSL message "Exceeded max visible GQs ''number''" (you can decrease the gs_farclipplane_set value to avoid that problem)
* also, keep in mind that characters are visible ''only'' within 4099|4099|4099 and -4099|-4099|-4099 world units
* geometry stops at ca. X=4228|Z=4228 and -4228|-4228 (height not tested)
 
 
==ONLV: Oni Level==
{| border=0 cellspacing=20 cellpadding=0 style="float:right"
{| border=0 cellspacing=20 cellpadding=0 style="float:right"
| skybox file ONSKafternoon<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/ONSKafternoon.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/ONSKafternoon_tn.png]
| skybox file ONSKafternoon<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/ONSKafternoon.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/ONSKafternoon_tn.png]
|}
|}


file structure
File structure


* ONLV instance
* ONLV instance
Line 528: Line 491:




'''flags in the <OBOAObject> section'''
'''Flags in the <OBOAObject> section'''


these are also used for the physics.xml file
These are also used for the physics.xml file
: '''<Flags>'''
: '''<Flags>'''
:: <!-- None -->
:: <!-- None -->
Line 649: Line 612:




==AKEV: Akira Environment==
==Exported Akira Environment (AKEV*.xml)==
Somehow I would like to have the AKEV and ONLV information on one page (like the sound stuff on SNDD). Let's see how this turns out.
Somehow I would like to have the AKEV and ONLV information on one page (like the sound stuff on SNDD). Let's see how this turns out.


Line 731: Line 694:




===links to free texture resources===
==Ideas to test out==
* [http://www.tutorialsforblender3d.com/Textures/Textures_index.html various game textures]
None ATM.
* [http://forums.epicgames.com/threads/603122-Remus-high-resolution-skydome-texture-pack skies and objects of the solar system]
* [http://blenderartists.org/forum/showthread.php?224065-New-High-resolution-sky-pack-for-Blender skies] <!-- (http://www.wuala.com/Olson/Photos/Optikz_360_Skies/) -->
* [http://blenderartists.org/forum/showthread.php?24038-Free-high-res-skymaps-%28Massive-07-update!%29 skies]
* [http://www.cgtextures.com/ CG Textures for 3D]
* '''''to be expanded'''''
 
==ideas to test out==
===seamless, individual ground textures===
{| border=0 cellspacing=20 cellpadding=0 align=right
| screenshot from Aion:<br>individual textures side by side<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/Aion.jpg http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/Aion_tn.jpg]
|}
 
Could be achieved by breaking the ground mesh into the single polygons and then 3D paint them. The amount of hand work (breaking, applying a material, UV, ...) would make everyone go crazy so some scripting would be needed to reduce the work to a minimum. Mod Tool supports VBS, python and java script. The script could be bound to two buttons: one for breaking everything, another for breaking only a selection of polygons. Mudbox doesn't seem to support any scripting so the scene would need to get transfered back to Mod Tool (easier with the retail/student version). Mod Tool seems to have a buggy texture export. I was able to get only png images and those gets their black parts as alpha exported. So here we need extra caution. A script in PS could add a black layer to each image and then do the final texture export.
 
A bunch of links to scripting pages:
* http://softimage.wiki.softimage.com/sdkdocs/script_editor_RunningScripts.htm
* http://www.adobe.com/devnet/photoshop/scripting.html
* http://matthiasschuetz.com/photoshop-eigene-scripts-und-panels
* http://www.tutorialized.com/view/tutorial/How-to-apply-an-action-to-multiple-images-using-scripts/75340
 
 
===pathfinging on uneven ground===
It would be ridicules if Oni don't allow AIs to run over a hill. If one ramp is okay, why not two ''ramps'' or more in a row/next to each other. The idea simply deserves to become double-checked.




==ideas that has been tested==
==Ideas that has been tested==
===sky dome - it's a fail===
===Sky dome - it's a fail===
{| border=0 cellspacing=20 cellpadding=0 align=right
{| border=0 cellspacing=20 cellpadding=0 align=right
| sky box<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/ugly_skybox_lines.jpg http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/ugly_skybox_lines_tn.jpg]
| sky box<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/ugly_skybox_lines.jpg http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/ugly_skybox_lines_tn.jpg]
Line 795: Line 735:




==ideas for onisplit==
==Ideas for onisplit==
Neo might update OniSplit so that it is searching specific strings in object names of a dae level file.
Neo might update OniSplit so that it is searching specific strings in object names of a dae level file.


8,315

edits