XML:ONLV
This page is unfinished. Can you fill in any missing information? |
Custom levels that have been created so far:
OCF threads about level creation:
- "Creating the Lair - A level tutorial"
- "Creating new levels"
- "Create levels with pathfinding grids"
- "More questions about levels"
- "Sketchup tutorials for making levels"
- "Modding Existing levels - Beta" ("Moveable furniture" post)
wiki pages about levels:
For praxis information see: "Creating the Lair - A level tutorial" link.
ONLV: Oni Level
file structure
- ONLV instance
- <Name> - this is your BSL folder (save game slot and level number are defined inside ONLD)
- <Environment> - link to AKEV file (solid level geometry)
- <Objects> - link to OBOA instance (animated level geometry, sometimes particles)
- <SkyBox> - link to skybox file
- <Characters> - link to AISA file (pendant of BINACJBOCharacter file), holds character spawn collection
- <ObjectQuadMap> - link to ONOA instance (maybe spawnable / function holding objects ?)
- <Particles> - link to ENVP instance (pendant of BINACJBOParticle), holds particle spawn collection, door lock lights are typically stored inside ENVP
- <Corpses> - link to CRSA instance (corpses consist of 19 body parts)
- OBOA instance
- ...
- ONOA instance
- ...
- ENVP instance
- ...
- CRSA instance
- ...
- M3GA
- ...
- IDXA
- ...
flags in the <OBOAObject> section
these are also used for the physics.xml file
- <Flags>
- InUse
- NoCollision
- NoGravity
- FaceCollision
- <PhysicsType>
- None
- Static
- Linear
- Animated
- Newton
Sample code from a trimmed warehouse level.
[...] mean another Corpse code block. There are usually 20 in total. They are somehow needed to prevent bugs.
<?xml version="1.0" encoding="utf-8"?> <Oni> <ONLV id="0"> <Name>EnvWarehouse</Name> <Environment>AKEVEnvWarehouse</Environment> <Objects>#1</Objects> <SkyBox>ONSKafternoon</SkyBox> <Characters>AISAlevel1_scripts</Characters> <ObjectQuadMap>#2</ObjectQuadMap> <Particles>#3</Particles> <Corpses>#4</Corpses> </ONLV> <OBOA id="1"> <Objects /> </OBOA> <ONOA id="2"> <Elements /> </ONOA> <ENVP id="3"> <Particles /> </ENVP> <CRSA id="4"> <FixedCount>0</FixedCount> <UsedCount>0</UsedCount> <Corpses> <CRSACorpse> <CharacterClass></CharacterClass> <Transforms> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> <Matrix4x3>0 0 0 0 0 0 0 0 0 0 0 0</Matrix4x3> </Transforms> <BoundingBox> <Min>0 0 0</Min> <Max>0 0 0</Max> </BoundingBox> </CRSACorpse> [...] </Corpses> </CRSA> </Oni>
not empty OBOA - example from level 19
(exported ONLV files seem to contain 32 empty <OBOAObject> sections)
If I remember correctly this one is only an object for the cutscene. Maybe the real floor(s) (those with collision) can be tracked down with the id used by bsl.
<OBOAObject> <Geometry>#347</Geometry> <Animation>OBANDishFloor01</Animation> <Particle></Particle> <Flags>InUse</Flags> <DoorGunkId>0</DoorGunkId> <DoorId>0</DoorId> <PhysicsType>Animated</PhysicsType> <ScriptId>204</ScriptId> <Position>-183 99.59154 -2501.25</Position> <Rotation>0.7071067 -1.545431E-08 1.545431E-08 0.7071068</Rotation> <Scale>1</Scale> <Transform>1 -4.371139E-08 -5.21253064E-16 0 1.19248806E-08 -1 4.371139E-08 1 1.19248806E-08 -183 99.5815353 -2501.25</Transform> <Name>object_DishFloor01</Name> </OBOAObject>
not empty ENVP - example from level 19
<ENVPParticle> <Class>locklight</Class> <Tag>mainchamber_locklight01</Tag> <Transform>1 -4.559326E-08 1.35404189E-05 -1.354042E-05 -2.03512554E-05 1 -4.53176945E-08 -1 -2.03512554E-05 -391.790527 58.0480423 -1364.412</Transform> <DecalScale>1 1</DecalScale> <Flags></Flags> </ENVPParticle>
<Transform> - the last 3 values are the position (x, y, z)
<Flags>
- NotInitiallyCreated
spawnable geometry
In Oni's last level, the platform of the big satellite dish can be spawned/deleted from BSL. Characters on it will fall down when the platform becomes deleted (tested long time ago).
If OBOA import is not allowed maybe we can add more such things with the physics.xml and then use the <ScriptId> for BSL?
Possible applications:
- grids in front of ventilation shafts (a little door object should be a good alternative here)
- ground/ceiling/objects for cutscenes that become partially destroyed
- destrucable walls like in Deus Ex 3 (trigger volume, replacing punch anim with punch-through-wall anim)
Perhaps this will help: http://oni.bungie.org/community/forum/viewtopic.php?pid=36765#p36765
In the textures.xml file you can set the environment's collision info by texture.
Also, you can add OBAN in the physics.xml file like this, though I have not fully tested this.
<Object Name="object_Zipthing01"> <ScriptId>71</ScriptId> <Geometry>M3GMZipthing01.oni</Geometry> <Animation>OBANZipthing01.oni</Animation> </Object>
If you extract the AKEV for the compound level, the big dish is part of the environment. env_show is used to show and hide the dish. However, currently, OniSplit does not support that feature.
EdT 01:11, 6 June 2012 (CEST)
- Okay, i see, another thing to wait for. Will test the physics.xml a bit during weekend. paradox-01 12:08, 6 June 2012 (CEST)
breakable glass with BSL recognition
Not tested.
BSL command:
- env_broken (ID_1, ID_N)
It's used in the training level and determines if glass got shot through or not. How do we set such things up?
texture exchange
Not tested.
BSL command supported by PC and Mac:
- env_texswap ID texture
Might be useful to switch on/off static and animated textures. (News screen: running or off or smashed. Lava stream: flowing or stagnating or cooled down. Etc.)
AKEV: Akira Environment
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.
AGQG flags - appears to be used by textures.xml <GunkFlags> (just some or all of them ?)
- DoorFrame (invisible quad that uses the TXMP_DOOR_FRAME texture)
- Ghost (pathfinding volume separator, see AKVA etc)
- StairsUp
- StairsDown
- Stairs
- Triangle
- Transparent
- TwoSided
- NoCollision
- Invisible
- NoObjectCollision
- NoCharacterCollision
- NoOcclusion
- Danger
- Horizontal (slope > 70°)
- Vertical (slope < 70°)
- GridIgnore
- NoDecals
- Furniture
- ProjectionBit0
- ProjectionBit1
- SoundTransparent
- Impassable
(Copied from hex page. Is this still up to date ?)
- Triangles
- Many quads are in fact triangles: the last two vertices have the same PNTA and TXCA entries, and the ARGB color is (255, 205, 205, 205) (80% gray, 100% opaque). There is also a flag specifying that.
- Ghost, StairsUp, StairsDown
- These flags are used for BNV adjacencies, see AKAA. Stairs up/down are used instead of Ghost when the quad is placed at the bottom/top of the stairs. These quads are not visibile. The script variable env_show_ghostgqs is intended to control the visibility of such quads but it requires "debug" level files.
- There are a couple of ghost quads that aren't referenced from AKAA. It's likely that those quads are useless.
- DoorFrame
- This appears to be another type of "ghost" quad (its visibility is controlled by the same env_show_ghostgqs variable). Sometimes it is used together with the Ghost flag but not always. Only the door frames that also have the Ghost flag are used as adjacencies so it's unclear if the rest of the door frames serve any purpose. In fact it appears that this flag has no effect other than making the quad invisible.
- Stairs
- This is applied to the invisible ramp quad that covers the stairs. In general this flag is also applied to the visible stairs geometry but there are some exceptions (errors? see level 19 stairs).
- NoOcclusion
- This flag tells the octtree raycaster to ignore the quad when doing ray/quad intersections. This is tipically used for small quads that are unlikely to affect the overall environment visibility.
- ProjectionBit
- These 2 flags can be 00, 01, 10 and 11. That means the values 0,1,2 and 3 which have the following meanings:
- 0 - No projection plane specified. One can be computed if needed. Never used in files, may slow down the game if used.
- 1 - Project quad on XY plane.
- 2 - Project quad on XZ plane.
- 3 - Project quad on YZ plane.
- The projection plane is used to determine if a point is in a quad (this point is usually the result of an intersection between a ray and the quad plane).
- GridIgnore
- Appears to be unused. Its likely purpose is to mark quads that don't count as obstacles in the pathfinding grid.
- Danger
- Appears to be unused. Its likely purpose is to create danger areas in the pathfinding grids. Usually there's a trigger volume nearby that hurts/kills the character. This quads are always invisible.
- Invisible
- Invisible quads have a couple of different uses:
- block player access to some parts of the environment
- stairs ramp
- collision geometry (used by some "complex" furniture)
- danger quads (see above)
- some other apparently useless quads
- Furniture
- Set for all quads that belong to a furniture object. It doesn't appear to be used. It is also redundant since all the furniture quads have an object id.
- NoDecals
- Prevents the creation of decals on the quad. Set for door quads because the decals would disappear when the door opens. That's why shooting a door doesn't leave a mark.
- Impassable
- Probably used by forcefields and end of level boundaries (like in state archive level).
import
- 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"
links to free texture resources
- various game textures
- skies and objects of the solar system
- skies
- skies
- CG Textures for 3D
- to be expanded
ideas to test out
seamless, individual ground textures
screenshot from Aion: individual textures side by side |
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
sky dome - it's a fail
sky box |
sky dome |
Maybe it's possible to create a very big sphere or dome that covers the entire level (and let Oni's skybox unused). If it's doable it could avoid ugly lines of the skybox coming from OpenGL rendering.
Update: 12 June 2012
New issues appeared that need to take care about:
- brightness:
- The brightness can be somewhat influenced by BSL commands like with gl_fog_..., gs_farclipplane and must be set adequately.
- texture size:
- The dome seen in the screenshot has a texture size of 512x512 and hence looks quite pixelated.
- The problem might be solved by splitting the dome into sectors and giving each sector its own texture.
gl_fog_start=.99999 |
test level over HERE |
Update: 14 June 2012
- texture boarder and distortions:
- Texture boarders have darker pixels so the UV must not reach them. Also after splitting the textures inside the editor there will be little distortions but they are still noticeable enough to make the sky look odd. Fine-tuning the UVs didn't really help.
- The gs_farclipplane max value makes the size of the dome quite limited: I think that the max radius here is somewhere between 2500 and 5000 world units.
I consider this as a fail. Oni would need bigger view range and a texture support of 2096x2096.
ideas for onisplit
Neo might update OniSplit so that it is searching specific strings in object names of a dae level file.
Cutscene cams
- string "cutsceneN" (e.g. cutscene231) -> OBAN
Doors
- string "door*" (e.g. doorBlastDoorMX2000) -> DOOR + BINACJBODoor + OBAN
- but if the string is "door*cloneN" then the DOOR and OBAN creation gets skipped (e.g. doorBlastDoorMX2000clone3), only class name, rotation and position get written into BINACJBODoor
Animated objects
- string "*_BeforeAnim": that's first static object with collision data (e.g. BlueCar1_BeforeAnim)
- string "*_InAnim": that's the animated cutscene object (e.g. BlueCar1_InAnim)
- string "*_AfterAnim": that's the second static object with collision data (e.g BlueCar1_AfterAnim)
Fake-destructible objects
- string "*_BeforeAnim": that's first static object with collision data (e.g. ConcreteWall2_BeforeAnim)
- string "*_FragmentN": that's the group of animated cutscene objects (fragments of the static object) (e.g. ConcreteWall2_Frag5)
- string "*_ColFragN": that's the group of static objects with collision data (e.g. ConcreteWall2_ColFrag5)
- string "*_NoColFragN": that's the group of static objects without character collision (e.g. ConcreteWall2_NoColFrag5)
NoColFrag would be useful if the fragments are quite numerous and small and hence would pose a problem to the pathfinding