OniSplit/Change log

From OniGalore
< OniSplit
Revision as of 20:13, 26 June 2022 by Iritscen (talk | contribs) (→‎v0.9.90: correct error in command syntax)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Here is a list of changes to some past versions of OniSplit, to the extent that these were documented by the developer.

v0.9.99.2

  • Adds Blender support using the tag -blender. First release by geyser.

v0.9.99.0

  • Supports alternate style for physics.xml (file included).
  • Potential fix for single OBAN creation from *.dae (needs more testing).

v0.9.96

  • Adds support for adding corpses. In a section of the master.xml file, add the generated corpses.xml. Sample corpses.xml included.

v0.9.95

  • Fixes bugs converting OBJ to M3GM and converting ONWC to OBJ or DAE.

v0.9.94

  • Makes BGR and RGBA the default texture formate for level import.
  • Auto-scales textures that aren't power of two or which are bigger than 512x512.

v0.9.93

  • Adds -debug to level creation; now env_show_ghostgqs=1 will display ghost quads in Oni.

v0.9.92

  • Fixes two bugs: error with degenerated polygons and wrong pelvis height in character import.

v0.9.90

What's new:

  • Fixes bugs with import/export of M3GMs (OBJ files).
  • Fixes Euler angle issues with exported TRAMs.
  • Fixes -noanim command to produce a standing pose.
  • In the ONWC file, you should be able to reference the DAE/OBJ file directly so you don't need the separate M3GM.
  • When exporting AKEV, quads that have script IDs assigned to them are exported to separate files. These are the IDs seen in BSL commands such as env_show 540 0.
  • Adds option -anim-merge to export multiple animations to a single DAE. Useful in dealing with walk/run or combo animations.
  onisplit -extract:xml <destination directory> -anim-merge -anim-body:Path_To\TRBSkonoko_body_high.oni Path_To\TRAMKONCOMcomb_k.oni  Path_To\TRAMKONCOMcomb_k_k.oni Path_To\TRAMKONCOMcomb_k_k_k.oni
  • Adds a scene exporter:
  OniSplit -extract:dae <destination directory> scene.xml

For example, if the scene.xml file looks like this :

  <Scene>
  <Node Name="camera">
       <Camera />
       <Animation>OBANCamout01.oni</Animation>
       <Animation>OBANCamout02.oni</Animation>
       <Animation>OBANCamout03.oni</Animation>
       <Animation>OBANCamout04.oni</Animation>
       <Animation>OBANCamout05.oni</Animation>
       <Animation>OBANCamout06.oni</Animation>
   </Node>
   <Node Name="motorcycle02">
       <Geometry>M3GMmotorcycle02.oni</Geometry>
       <Animation>OBANmotorcycle02.oni</Animation>
       <Animation>OBANmotorcycle02_stop.oni</Animation>
       <Node Name="hubs">
           <Geometry>M3GMhubs.oni</Geometry>
           <Animation>OBANhubs.oni</Animation>
           <Animation>OBANhubs_stop.oni</Animation>
       </Node>
       <Node Name="hubs_rear">
           <Geometry>M3GMhubs_rear.oni</Geometry>
           <Animation>OBANhubs_rear.oni</Animation>
           <Animation>OBANhubs_rear_stop.oni</Animation>
       </Node>
   </Node>
   </Scene>

When you load the DAE in XSI you'll find the motorcycle and the lab level intro camera. If you select the camera and press play you'll get to see the motorcycle into animation like you see it in-game.

v0.9.86

  • Can import/export OBAN as DAE.
  • Can export saved_filmxx.dat files to XML.

v0.9.68

  • Improved level creation.

v0.9.61

  • Automatic calculation of attack extents.

v0.9.58

  • Various bug fixes
  • Adds autogenerated pathfinding grids and compressed animation frames.
  • Supports SketchUp files with groups.

v0.9.54

  • Used to create QKeys for TRAM then OBAN.

v0.9.52

What's new:

  • When a TRBS file is exported to xml the geometry is exported to separate .dae files, one .dae file for each LOD
  • New -anim-body option. This allows a particular body (ONCC or TRBS) to be specified when exporting animations:
  onisplit -extract:xml out -anim-body:ONCCbarabus.oni TRAMsomething.oni
  • New -recurse option for the xml exporter. Have fun :)
This extracts all linked files e.g. it starts with ONCC, goes to TRAC and then extracts all TRAMs too. (This works by replacing classes file links.)
Recursive extracted files can be re-converted recursively again.
  onisplit -extract:xml out -recurse ONCCbarabus.oni
  • Changed light color in the environment importer to white (it used to be blueish)
  • New -env-notxmp option. This prevents the automatic creation of TXMP files while importing the environment.
  • Made -normals work when importing TRBS from xml + dae files.
  • Fixed the Collada importer to work with 3DSMax exported files

v0.9.41

  • Reliable EKey creation
  • Last version with -create:tram?

v0.9.40

What's new:

  • support for exporting/importing sound animations to/from xml files
  • better Collada export for environment
  • support for full color transparent textures (-format:bgra32 on the command line, ARGB8888 format in an xml file)
  • different (hopefully better) xml export format for animations (this one is actually from 0.9.38 but since that wasn't mentioned here...)
  • a more or less complete animation importer. This one deservers some notes:
-unlike other importers that produce .oni files this one produces and .xml file (similar to the one you get when exporting a TRAM)
when you do
 onisplit -create:tram target_dir animation.dae
in the target dir you'll get a TRAManimation.xml file.
You need to add some stuff to that file to make it actually work as an animation. In particular the animation type, from/to states and varient needs to be set.
-For all I know this works with animations exported from Oni and modified in Softimage. If you come up with a completly new animation it should work as long as the skeleton is similar to the one used in Oni.
-Note that the geometry that is present inside the Collada file is used to compute the "vertical extents" so it better be the same or close to the one the animation is intended for.
-The biggest problem are the attacks. While it's not difficult to add attacks to the xml file, computing the necessary "extents" is not going to be easy. I guess in the end I'll have to add some command to OniSplit to do it.
-Everything else that I forgot :)

Neo

v0.9.37

What's new:

  • support for transparency in the environment importer

v0.9.35

What's new:

  • conversion of recorded films (.dat binary files) to xml files that can be used to create FILM .oni files
   OniSplit film2xml out_dir film.dat

v0.9.34

What's new:

  • SNDD importer
-WAV files (.wav, mono/stereo, 22.05KHz/44.1KHz, uncompressed(PCM)/compressed(MS-ADPCM)) produce SNDD files that are compatible with Oni PC retail.
-AIFC files (.aif/.aifc/.afc, mono/stereo 22.05KHz, compressed(ima4)) produce SNDD files that are compatible with Oni Mac.
Example
 OniSplit -create out_dir test.aif
 OniSplit -create out_dir test.wav
  • LOD support for creating TRBS files. This can be done by creating an xml file containing the following:
 <?xml version="1.0" encoding="utf-8"?>
 <Oni Version="0.9.29.0">
     <Instance id="0" type="TRBS">
         <Elements>
             <Link>barabus_body_1.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_3.dae</Link>
             <Link>barabus_body_4.dae</Link>
             <Link>barabus_body_5.dae</Link>
         </Elements>
     </Instance>
 </Oni>
and running the command (assuming the created xml file's name is barabus_body.xml):
 OniSplit -create out_dir barabus_body.xml
It's not strictly necessary to create 5 different geometries for each LOD. The following works just as well:
 <?xml version="1.0" encoding="utf-8"?>
 <Oni Version="0.9.29.0">
     <Instance id="0" type="TRBS">
         <Elements>
             <Link>barabus_body_1.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_3.dae</Link>
         </Elements>
     </Instance>
 </Oni>
  • An xml file can contain "links" to other xml/obj/dae files. For example you can have the following line in an ONWC xml file:
 <Geometry>pistol.obj</Geometry>
Assuming the file pistol.obj exists in the same directory an M3GM .oni file will be automatically created from it.
Relative paths work just as well:
 <Geometry>geometry/pistol.obj</Geometry>
  • The -create:subt, -create:txmp and -create:m3gm are sort of obsolete. They still work but now you can simply use '-create' (or just 'create'):
 OniSplit -create out_dir crate.dae
 OniSplit create out_dir -format:bgr555 -genmipmaps pic.tga
 OniSplit create out_dir subtitles.txt
  • Work in progress: the AKEV importer now reads Collada materials so the resulting AKEV is textured.
Sample levels:
TestLevel1 -- This level should look like this in-game: Image 1 Image 2 Image 3
TestLevel2 -- This level should look like this in-game: Image 1
A zip file contains the minimum needed to get a new level running in Oni. To "compile" a level extract it to a folder and run the following commands:
 OniSplit -create out -genmipmaps -format:dxt1 *.xml
 OniSplit -import:nosep . Oni\GameDataFolder\level1_Final.dat
(Of course, you need to change the output .dat file path to match your Oni installation path)
Note1: The hexagon level needs to be scaled up to work properly. Use the envscale option for this:
 OniSplit -create out -genmipmaps -format:dxt1 -envscale:40 *.xml
Note2: I've updated the level files to contain 20 empty corpses to prevent crashes.

v0.9.28

  • added xml support for ONIE.
  • -help enums now lists particle related values

Neo

v0.9.27

Bugfixes and xml export/import for TMBD.

Neo

v0.9.26

Added XML support for TXMP/TXAN. Texture extraction/creation works like before but now you can also use the standard xml commands -extract:xml and -create.

Extracting a texture with -extract:xml produces an xml file and one or more tga files. The xml file will contains texture options like format and flags and a list of tga file names. More than one tga file is produced for animated textures and the filenames look like TXMPsmoke_001.tga, TXMPsmoke_002.tga etc.

Using the -create option with such an xml file will produce a normal TXMP.oni file but without the need to specify additional parameters on the command line like with -create:txmp. This comes in handy if you want to edit a bunch of textures:

- put all the xml and tga files in a single directory - edit tga image files as you need - in the directory you can run the command: onisplit -create oni *.xml to create all TXMP.oni files in the subdirectory oni.

Tip: The exported xml file does not contain the witdh and height of the texture, this is obtained from the tga file. If you resize the tga file the texture will be resized too.

Neo

v0.9.25

Added support for exporting/importing animation to/from XML. The usual commands:

 onisplit -extract:xml xml_dir TRAMKONCOMcombo_k_k.oni

This will write a TRAMKONCOMcombo_k_k.xml file in the directory xml_dir which you can more or less edit. Obviously this won't load in a 3D application like Softimage or Blender but you can change shortcuts, attacks, damage, particles etc.

To create an .oni file from the .xml file:

 onisplit -create oni_dir TRAMKONCOMcombo_k_k.xml

Exporting/importing the actual animation to/from Collada files will come in a future version.

PS: the FLAG exporting/importing bug reported above is supposed to be fixed too

Neo

v0.9.24

The particle are still a bit too big. Here are the files and screenshots. (Only converted to xml and back again.)

Paradox-01 18:34, 11 August 2008 (CEST)

Particle size fixed: OniSplit v0.9.24

Neo

v0.9.23

Just noticed there is a new version 0.9.23, what has changed?

EdT 04:59, 12 August 2008 (CEST)

There was an erroneous field type in OBAN, which I discovered in XML while setting up the DeLorean for the trailer.
geyser 05:57, 12 August 2008 (CEST)

v0.9.22

I've a bug for you. I converted BINA3RAPsuperglow_e01 into xml and back into oni again. The link "h2h_murglow_e02" is missing now. Here are the files. (The blue glow can be seen only for one or two seconds.)

Paradox-01 17:04, 10 August 2008 (CEST)

Fixed: OniSplit v0.9.22

Neo

v0.9.21

XML export/import for particles added.

Neo

v0.9.20

I got this error message while importing an ONCC.xml file using version 0.9.19. However, the file is created and works fine in Oni.

System.ArgumentNullException: Argument cannot be null.
Parameter name: Byte buffer is a null reference.
 at System.IO.BinaryWriter.Write (System.Byte[] value) [0x00000] 
 at Oni.Xml.XmlImporter.WriteRawParts (Oni.FileWriter writer) [0x00000] 
 at Oni.Importer.Write (System.String filePath, System.Byte[] data, Boolean hasRawParts) [0x00000] 
 at Oni.Importer.WriteFile (System.String outputDirPath, System.Byte[] data, Boolean hasRawParts) [0x00000] 
 at Oni.Xml.XmlImporter.Import (System.String filePath, System.String outputDirPath) [0x00000] 
 at Oni.Program.CreateFromXml (System.String[] args) [0x00000] 
 at Oni.Program.Main (System.String[] args) [0x00000]  (1)

This happens even with an unmodified ONCC file.

EdT 19:55, 2 July 2008 (CEST)

Fixed: OniSplit 0.9.20

And yes, the created files are OK even if it throws error.

Neo

v0.9.19

Thanks for the -help enums. I found a difference between the wiki movelist and the OniSplit enums.

Wiki: Attack#43 KKP and Attack#51 HK, OniSplit does not have them. Thus the wiki has a total of 83 attacks and OniSplit has 81 attacks.

I was in the process of making a movelist page for OniSplit users.

EdT 01:59, 2 July 2008 (CEST)

Oops. Fixed: OniSplit 0.9.19

Neo

v0.9.18

You can try this beta for OBJC export. Mostly works as far as I know except that the resulting XML for MELE kind of sucks.

Neo

I got this error when extracting BINACJBOMelee Profile:

 System.NotImplementedException: Argument value is System.Single[]
 at System.Xml.XmlWriter.WriteValue (System.Object value) [0x00000] 
 at Oni.XmlExporter.Oni.Metadata.IMetaTypeVisitor.VisitVector3 (Oni.Metadata.MetaVector3 type) [0x00000] 
 at Oni.Metadata.MetaVector3.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.XmlExporter.WriteFields (Oni.Metadata.Field[] fields) [0x00000] 
 at Oni.XmlExporter.Oni.Metadata.IMetaTypeVisitor.VisitStruct (Oni.Metadata.MetaStruct type) [0x00000] 
 at Oni.Metadata.MetaStruct.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.Objects.CollectionExporter.ExportInstance (Oni.InstanceDescriptor descriptor) [0x00000] 
 at Oni.XmlExporter.ExportInstance (Oni.InstanceDescriptor descriptor) [0x00000] 
 at Oni.Exporter.ExportInstanceList (System.Collections.Generic.List`1 descriptors) [0x00000] 
 at Oni.Exporter.Export (Oni.FileManager fileManager, System.String sourceFilePath, System.String filter) [0x00000] 
 at Oni.Program.ExtractXml (System.String[] args) [0x00000] 
 at Oni.Program.Main (System.String[] args) [0x00000]  (1)

Also the .xml file looks like this:

 <?xml version="1.0" encoding="utf-8"?>
 <ObjectCollection version="0.9.18.0">
   <Object Id="630" Type="MELE">
       <Header>
           <Flags>0</Flags>
           <Position />
       </Header>
   </Object>
 </ObjectCollection>

EdT

v0.9.18 Beta2

Neo

Yes!!!! Thanks

EdT

v0.9.18 Beta3

Import done. You should be able to create BINACJBO*.oni files from xml files.

Neo

Wonderful. Now my scripting can continue. Good job Neo.

Gumby 20:07, 21 June 2008 (CEST)

I got this error, I exported BINACJBOCharacter.oni from level 3 and then imported again with no changes:

 System.ArgumentException: Specified type 'System.Single[]' is not supported.
 at System.Xml.XmlReader.ValueAs (System.String text, System.Type type, IXmlNamespaceResolver resolver) [0x00000] 
 at System.Xml.XmlReader.ReadElementContentAs (System.Type type, IXmlNamespaceResolver resolver) [0x00000] 
 at Oni.Xml.RawXmlImporter.Oni.Metadata.IMetaTypeVisitor.VisitVector3 (Oni.Metadata.MetaVector3 type) [0x00000] 
 at Oni.Metadata.MetaVector3.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.Xml.RawXmlImporter.ReadFields (Oni.Metadata.Field[] fields) [0x00000] 
 at Oni.Xml.RawXmlImporter.Oni.Metadata.IMetaTypeVisitor.VisitStruct (Oni.Metadata.MetaStruct type) [0x00000] 
 at Oni.Metadata.MetaStruct.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.Xml.ObjcXmlImporter.ReadObject () [0x00000] 
 at Oni.Xml.ObjcXmlImporter.Import () [0x00000] 
 at Oni.Xml.ObjcXmlImporter.Import (System.Xml.XmlReader reader) [0x00000] 
 at Oni.Xml.XmlImporter.ReadObjectCollection () [0x00000] 
 at Oni.Xml.XmlImporter.Import (System.String filePath, System.String outputDirPath) [0x00000] 
 at Oni.Program.CreateFromXml (System.String[] args) [0x00000] 
 at Oni.Program.Main (System.String[] args) [0x00000]  (1)

EdT

v0.9.18 Beta4

Oh boy, were Mono developers lazy or not... :)

Neo

2 notes about melee:

  • I've yet to make move types to show up as names instead of numbers. Remebering all those is not fun.
  • The original melee files contain what appears to be orphaned moves. Since currently moves are exported as children of techniques the orphaned moves are not exported. I don't think those moves are used by the engine but if someone knows otherwise I'll see what can be done to export them too.

Other stuff:

  • The general xml export was updated to export names instead of number for several enum and flags fields. For example the class of a dialog item in WMDD was previously exported as a number but now it's a string like Button, Edit etc. Flags fields are exported as a list of names (names separated by whitespace) like in this WMDD state field:
  <State>Visible Disabled</State>

This simplifies editing but currently there is now way to discover what names are available (unless you take a look at the source code :)). I'll try to make OniSplit display such a list as part of the help or something.

Neo

One more beta for OBJC: v0.9.18 Beta 5.

Fixed character flags and added move type names and parameters names to melee (instead of numbers and Param0, Param1 etc.).

Neo

This makes reading the melee much easier. I wish I had some time to play around with making a new melee profile.

Is this a bug or just an error in the original code. In the NINJA_Easy profile I found this technique:

<Technique>
<Name>Back Kick</Name>
<Flags />
<Weight>40</Weight>
<Offset_0660>10</Offset_0660>
<RepeatDelay>0</RepeatDelay>
<Moves>
<Position Type="CloseBack" MinRunInDist="0" MaxRunInDist="10" ToleranceRange="4.5" />
<Attack Type="PB" />
</Moves>
</Technique>

Even though it says Back Kick, the attack is Punch Back.

EdT

The wiki has some pages about various melee profiles and it contains the same thing: OBD:BINA/OBJC/MELE/NINJA. So either it is just a mistake in the melee profile or the move type wiki tables are wrong, I'll have to check with the executable.

Neo

Is there a way to get the moves syntax from OniSplit? Then I can start updating the wiki.

EdT 22:48, 30 June 2008 (CEST)

OniSplit 0.9.18

I added a "-help enums" option which dumps a list with all enums and flags used in XML files. Since otherwise it seems to work fine I dropped the "beta" label.

Neo

v0.9.17

- fix for the above xml error
- more field names in xml (instead of stupid Offset_08 stuff)
- -list command to list the named instances from a dat file; maybe useful for something like AE:Anniversary_Edition_Tools?
 onisplit -list level2_Final.dat

PS: Yes, probably this stuff should go in the discussion page for OniSplit. I'll cleanup/move later...

Neo

v0.9.16

Sorry, Neo, this isn't probably the right place for non-OniSplit-related talk, but your whole Talk page is kinda devoted to OniSplit ^_^'. I've posted some files that are linked to from my own Talk page (near the bottom), which are before&after .daes. The "before" .dae is extracted from a working .oni file, and the "after" .dae is what Blender produces after importing the before .dae and exporting it back out. I'm new to how the format works, but there's definitely some issues there, and you might be able to provide some words of wisdom as to what I or the Collada plug-in are doing wrong. If you have the time. Thanks! --Iritscen 20:46, 5 June 2008 (CEST)

OniSplit v0.9.16: displays a warning if the generated M3GM have too many points for Oni (over 2048); fixes bug with -normals feature (use -normals to minimize the point count). --geyser 20:17, 7 June 2008 (CEST)

v0.9.15

Quick update: Now it should display the file path when errors like "Invalid template checksum" occur. Another small addition is a "-large" option for "-create:txmp" to allow creation of textures larger than 256x256 (normally it scales down to 256x256 if the image is larger).

Neo

v0.9.14

Found a bug:

 System.InvalidOperationException: Node type Element is not supported in this operation. 
 file:///Oni/ExtractedGameData/XMLfiles/TRACkonokocore_animations.xml (line 4, column 10)
 at System.Xml.XmlReader.ReadContentString (Boolean isText) [0x00000] 
 at System.Xml.XmlReader.ReadContentString () [0x00000] 
 at System.Xml.XmlReader.ReadContentAsString () [0x00000] 
 at Oni.Files.XmlImporter.Oni.Files.Metadata.IMetaTypeVisitor.VisitLink (Oni.Files.Metadata.MetaLink type) [0x00000] 
 at Oni.Files.Metadata.MetaLink.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.Files.XmlImporter.ReadFields (Oni.Files.Metadata.Field[] fields) [0x00000] 
 at Oni.Files.XmlImporter.Oni.Files.Metadata.IMetaTypeVisitor.VisitStruct (Oni.Files.Metadata.MetaStruct type) [0x00000] 
 at Oni.Files.Metadata.MetaStruct.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.Files.XmlImporter.ReadInstance () [0x00000] 
 at Oni.Files.XmlImporter.ReadOniFile () [0x00000] 
 at Oni.Files.XmlImporter.Import (System.String filePath, System.String outputDirPath) [0x00000] 
 at Oni.Files.Program.CreateFromXml (System.String[] args) [0x00000] 
 at Oni.Files.Program.Main (System.String[] args) [0x00000]  (1)

Here is the file, I did not make any changes to it after I extracted it.

http://edt.oni2.net/OniSplit/TRACkonokocore_animations.xml

EdT 04:26, 18 May 2008 (CEST)

Ed, I don't have time to fix that bug right now but you can workaround it by changing the following line in the xml file

 <ParentCollection/>

to

 <ParentCollection></ParentCollection>

Neo

That didn't work, got the same error message. Only difference is the location: column 25 instead of column 10. Don't worry about it, when you have time...

 System.InvalidOperationException: Node type EndElement is not supported in this operation.
 file:///Oni/ExtractedGameData/XMLfiles/TRACmotokocore_animations.xml (line 4, column 25)
 

EdT

This should fix it: OniSplit 0.9.14

Neo

v0.9.12

Sorry, now I get this error:

 System.Xml.XmlException: 'Element' is an invalid node type. file://Oni/ExportedGameData/xml_dir/ONCCkonoko_generic.xml Line 214, position 14.
 at System.Xml.XmlReader.ReadEndElement () [0x00000] 
 at Oni.Files.XmlImporter.ReadArray (Oni.Files.Metadata.MetaType elementType, Int32 maxCount) [0x00000] 
 at Oni.Files.XmlImporter.Oni.Files.Metadata.IMetaTypeVisitor.VisitArray (Oni.Files.Metadata.MetaArray type) [0x00000] 
 at Oni.Files.Metadata.MetaArray.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.Files.XmlImporter.ReadFields (Oni.Files.Metadata.Field[] fields) [0x00000] 
 at Oni.Files.XmlImporter.Oni.Files.Metadata.IMetaTypeVisitor.VisitStruct (Oni.Files.Metadata.MetaStruct type) [0x00000] 
 at Oni.Files.Metadata.MetaStruct.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.Files.XmlImporter.ReadInstance () [0x00000] 
 at Oni.Files.XmlImporter.ReadOniFile () [0x00000] 
 at Oni.Files.XmlImporter.Import (System.String filePath, System.String outputDirPath) [0x00000] 
 at Oni.Files.Program.CreateFromXml (System.String[] args) [0x00000] 
 at Oni.Files.Program.Main (System.String[] args) [0x00000] 

EdT

OK, one more fix: OniSplit 0.9.12. If you still get errors please post the xml file you are using.

Neo

v0.9.11

I was testing the.xml import/export of ONCC and when I tried to create a ONCC I got this message:

 System.InvalidOperationException: Node type Element is not supported in this operation. file:///Oni/ExportedGameData/xml_dir/ONCCkonoko_generic.xml  (line 214, column 14)
 at System.Xml.XmlReader.ReadContentString (Boolean isText) [0x00000] 
 at System.Xml.XmlReader.ReadContentString () [0x00000] 
 at System.Xml.XmlReader.ReadContentAsString () [0x00000] 
 at Oni.Files.XmlImporter.Oni.Files.Metadata.IMetaTypeVisitor.VisitString (Oni.Files.Metadata.MetaString type) [0x00000] 
 at Oni.Files.Metadata.MetaString.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.Files.XmlImporter.ReadArray (Oni.Files.Metadata.MetaType elementType, Int32 maxCount) [0x00000] 
 at Oni.Files.XmlImporter.Oni.Files.Metadata.IMetaTypeVisitor.VisitArray (Oni.Files.Metadata.MetaArray type) [0x00000] 
 at Oni.Files.Metadata.MetaArray.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.Files.XmlImporter.ReadFields (Oni.Files.Metadata.Field[] fields) [0x00000] 
 at Oni.Files.XmlImporter.Oni.Files.Metadata.IMetaTypeVisitor.VisitStruct (Oni.Files.Metadata.MetaStruct type) [0x00000] 
 at Oni.Files.Metadata.MetaStruct.Accept (IMetaTypeVisitor visitor) [0x00000] 
 at Oni.Files.XmlImporter.ReadInstance () [0x00000] 
 at Oni.Files.XmlImporter.ReadOniFile () [0x00000] 
 at Oni.Files.XmlImporter.Import (System.String filePath, System.String outputDirPath) [0x00000] 
 at Oni.Files.Program.CreateFromXml (System.String[] args) [0x00000] 
 at Oni.Files.Program.Main (System.String[] args) [0x00000] 

I did an extract of ONCCkonoko_generic.oni and without making any changes created an .oni file from the ONCCkonoko_generic.xml file

EdT 18:15, 10 May 2008 (CEST)

I think I fixed it: OniSplit v0.9.11

Neo

v0.9.10

The latest version almost works with TRAC. The file it creates just lacks the number of TRAM in the file and the 64 for each of the TRAM. For reference see OBD_talk:TRAC at Offset 0x8BE 69 00, in the TRAC created by OniSplit from the .xml, its 00 00 then all the following 64 that follows are 00. So all I did was manually enter the number of TRAM and the 64 to make the TRAC work.

EdT 06:58, 9 May 2008 (CEST)

Hmm... now that was one weird bug. Here's the fixed version: OniSplit v0.9.10

Neo

v0.9.9

Here's the latest version I have: OniSplit v0.9.9. As far as I know it works but I haven't test it too much. Also if you do "modifications" that you want to keep then you should keep the .oni files instead of the .xml files. For know I cannot guarantee that a future version will read xml file exported by previous versions.

Extract to xml:

onisplit -extract:xml xml_dir level0_Final\Characters\ONCCbarabus.oni

Import from xml:

onisplit -create oni_dir xml\ONCCbarabus.xml

where xml_dir and oni_dir are output directories like for other commands. Note that -create does not need a :ONCC like when importing from collada/obj files.

In theory it should work with any .oni file except those that have raw parts (AKEV, AGDB, BINA, OSBD, TRAM, TXMP, SNDD, SUBT). In practice I'm not sure :)

Neo

v0.9.6

Neo, FYI, OniSplit 0.9.5 has problems with the -import:sep command on the Mac. Here's the terminal output:

 Reading files from /Oni/GameDataFolder/level1_Final
 Removing duplicates
 Writing /Oni/GameDataFolder/level1_Final.dat
 System.NotSupportedException: Stream does not support reading
 at System.IO.FileStream.Read (System.Byte[] dest, Int32 dest_offset, Int32 count) [0x00000] 
 at Oni.Files.InstanceFileWriter.ConvertTXMPHack (Oni.Files.DescriptorTableEntry entry, System.IO.Stream stream) [0x00000] 
 at Oni.Files.InstanceFileWriter.WriteDataTable (Oni.Files.FileWriter writer, Int32 levelId) [0x00000] 
 at Oni.Files.InstanceFileWriter.Write (System.String filePath) [0x00000] 
 at Oni.Files.OniImporter.Import (Oni.Files.FileManager fileManager, System.String inputDirPath, System.String filePath, Int64 targetTemplateChecksum) [0x00000] 
 at Oni.Files.Program.Import (System.String[] args) [0x00000] 
 at Oni.Files.Program.Main (System.String[] args) [0x00000]
Edt
I second that. It also happens on PC, for the demo. And not only on -import but on -export, too:
Reading file D:\geyser\edition\pc.demo\edition\GameDataFolder\level1_Final.dat
Exporting 1827 instance(s) to D:\geyser\edition\pc.demo\edition\GameDataFolder\level1_Final
System.NotSupportedException: Stream does not support reading.
  at System.IO.__Error.ReadNotSupported()
  at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count)
  at Oni.Files.InstanceFileWriter.ConvertTXMPHack(DescriptorTableEntry entry, Stream stream)
  at Oni.Files.InstanceFileWriter.WriteDataTable(FileWriter writer, Int32 levelId)
  at Oni.Files.InstanceFileWriter.Write(String filePath)
  at Oni.Files.OniExporter.ExportCore(List`1 descriptors)
  at Oni.Files.Exporter.Export(FileManager fileManager, String sourceFilePath, String filter)
  at Oni.Files.Program.Export(String[] args)
  at Oni.Files.Program.Main(String[] args)
Apparently it bails out when processing the sep part of the first TXMP it encounters.
geyser 07:47, 21 April 2008 (CEST)

Oops, fixed: OniSplit 0.9.6

Neo

v0.9.3

Error message from OniSplit when creating a TRBS file:

 System.IO.InvalidDataException: No scene found
 at Oni.Files.Geometry.BodyImporter.ReadBodyParts (Oni.Files.Dae.Scene scene) [0x00000] 
 at Oni.Files.Geometry.BodyImporter.Import (System.String filePath, System.String outputDirPath) [0x00000] 
 at Oni.Files.Program.CreateBody (System.String[] args) [0x00000] 
 at Oni.Files.Program.Main (System.String[] args) [0x00000]

Different test and error message.

I imported ONCCkonoko_generic.dae into Blender and then exported it out as Collada 1.4, with no changes. This time I got the following message from OniSplit:

 System.Xml.XmlException: 'Element' is an invalid node type. file:///Oni/ExportedGameData/MCKonoko.dae Line 1743, position 4.
 at System.Xml.XmlReader.ReadEndElement () [0x00000] 
 at Oni.Files.Dae.Reader.ReadEntity[Scene] (System.Action`1 entityReader) [0x00000] 
 at Oni.Files.Dae.Reader.ReadLibrary[Scene] (ICollection`1 library, System.String elementName, System.Action`1 entityReader) [0x00000] 
 at Oni.Files.Dae.Reader.ReadLibrary () [0x00000] 
 at Oni.Files.Dae.Reader.Read (System.String filePath) [0x00000] 
 at Oni.Files.Dae.Reader.ReadFile (System.String filePath) [0x00000] 
 at Oni.Files.Geometry.BodyImporter.Import (System.String filePath, System.String outputDirPath) [0x00000] 
 at Oni.Files.Program.CreateBody (System.String[] args) [0x00000] 
 at Oni.Files.Program.Main (System.String[] args) [0x00000] 

EdT

You need to select the "Disabled Physics" option when exporting. I also made a fix to ignore the physics stuff: OniSplit 0.9.3.

v0.9.2

And another update to fix a small bug in the Collada exporter: OniSplit 0.9.2 (not really needed because most tools seem to ignore that error).

Neo

v0.9.1

I was able to extract the TRBS from Oni using the command: mono onisplit.exe -extract:dae TRBS -noanim -zup ../GameDataFolder/level0_Final/ONCCkonoko_generic.oni

However, when I tried to import it into Blender2.45 I got the following error Message: FEEDBACK: Illusoft Collada 1.4 Plugin v0.3.159 started Traceback (most recent call last):

 File "/blender-2.45-OSX-10.3-py2.3-powerpc/blender.app/Contents/MacOS/.blender/scripts/bpymodules/colladaImEx/cstartup.py", line 609, in ButtonEvent
   transl = translator.Translator(doImport,__version__,debug,fileName, useTriangles, usePolygons, bakeMatrices, exportSelection, newScene, clearScene, lookAt, usePhysics, exportCurrentScene, exportRelativePaths, useUV, sampleAnimation, onlyMainScene)
 File "/blender-2.45-OSX-10.3-py2.3-powerpc/blender.app/Contents/MacOS/.blender/scripts/bpymodules/colladaImEx/translator.py", line 61, in __init__
   self.__Import(fileName)
 File "/blender-2.45-OSX-10.3-py2.3-powerpc/blender.app/Contents/MacOS/.blender/scripts/bpymodules/colladaImEx/translator.py", line 67, in __Import
   documentTranslator.Import(fileName)
 File "/blender-2.45-OSX-10.3-py2.3-powerpc/blender.app/Contents/MacOS/.blender/scripts/bpymodules/colladaImEx/translator.py", line 247, in Import
   self.colladaDocument.LoadDocumentFromFile(fileName)
 File "/blender-2.45-OSX-10.3-py2.3-powerpc/blender.app/Contents/MacOS/.blender/scripts/bpymodules/colladaImEx/collada.py", line 86, in LoadDocumentFromFile
   self.asset.LoadFromXml(self,xmlUtils.FindElementByTagName(colladaNode,DaeSyntax.ASSET))
 File "/blender-2.45-OSX-10.3-py2.3-powerpc/blender.app/Contents/MacOS/.blender/scripts/bpymodules/colladaImEx/collada.py", line 284, in LoadFromXml
   self.created = xmlUtils.ReadDateTime(xmlUtils.FindElementByTagName(xmlNode,DaeSyntax.CREATED))
 File "/blender-2.45-OSX-10.3-py2.3-powerpc/blender.app/Contents/MacOS/.blender/scripts/bpymodules/colladaImEx/xmlUtils.py", line 68, in ReadDateTime
   return GetDateTime(ReadContents(node))
 File "/blender-2.45-OSX-10.3-py2.3-powerpc/blender.app/Contents/MacOS/.blender/scripts/bpymodules/colladaImEx/xmlUtils.py", line 101, in GetDateTime
   return datetime(int(date[0]), int(date[1]), int(date[2]),int(time[0]), int(time[1]), int(float(time[2])))

ValueError: invalid literal for float(): 35.8247380-07

EdT


Fixed: OniSplit 0.9.1.

Neo

v0.9.0

OK, let's give it a try: OniSplit 0.9.0

What's new:

a couple of fixes to the collada exporter
-create:trbs option to create a TRBS file from a collada file

How to use:

  onisplit -extract:dae some_dir level0_Final/ONCCkonoko_generic.oni
  

This will generate a ONCCkonoko_generic.dae collada file in the directory some_dir plus the tga texture files used by the specified character.

  onisplit -create:trbs dest_dir some_dir\ONCCkonoko_generic.dae

This will create a TRBSkonoko_generic.oni file in dest_dir

Notes:

  • Blender's Collada importer/exporter is buggy and you need to add the options -noanim and -zup when extracting collada files for use with Blender:
  onisplit -extract:dae some_dir -noanim -zup level0_Final/ONCCkonoko_generic.oni
-noanim prevents the export of the default idle animation. That's needed because Blender doesn't import animated objects correctly.
-zup exports a collada file with a coordinate system where Z axis points up instead of the default (Y up). This is needed because Blender uses Z up but the importer gets it wrong and convert to something else.
  • In the absence of the animation all bones are oriented along the X axis (no rotation applied to them) so the character will look kind of weird. You can rotate them any way you need/like, it won't affect the creation of TRBS files because only translations matter.
  • When exporting Collada files from Blender you need to select the "Triangles" option because OniSplit does not import polygons.
  • You can replace body parts by deleting existing ones and adding new ones but you need to set the parent bone and the name of the part correctly. In Blender you can see the bone hierarchy and names in the Outliner window.
  • Currently textures are exported to collada but they are ignored when importing. I'll add later an option to create TRMA files from some sort of input text file that specifies the images to be used.
  • If you are using XSI Mod Tool (that's what I use) you don't need/should specify the -zup option. While the collada file will load correctly in mod tool you won't be able to rotate the bones.
  • Blender's Collada importer is buggy chapter 2: it ignores the vertex normals so the model will look flat instead of smooth. Unfortunately this persists when exporting so the TRBS file will be flat too. I've no workaround for this. Maybe I'll try to fix that importer myself because the whole project appears to be somewhat dead.
  • TRBS files (can) contain different geometry for 5 different levels of detail. Currently OniSplit does not have any support for this. When exporting the highest LOD will be exported and when importing the same geometry will be used for all 5 levels. It's likely that in the future I'll add the possibility to export/import each level separatly.

Neo

v0.8.18

Neo, I was trying to import the delorean.obj that geyser made, but got the following error:

 mono onisplit.exe -create:m3gm test  delorean.obj
 System.ArgumentOutOfRangeException: Argument is out of range.
 Parameter name: index
 at System.Collections.Generic.List`1[System.Int32].get_Item (Int32 ) [0x00000] 
 at Oni.Files.Geometry.ObjFile.ReadVertices (System.String[] tokens) [0x00000] 
 at Oni.Files.Geometry.ObjFile.ReadFace (System.String[] tokens) [0x00000] 
 at Oni.Files.Geometry.ObjFile.ReadObjFile (System.IO.TextReader reader) [0x00000] 
 at Oni.Files.Geometry.ObjFile.FromFile (System.String filePath) [0x00000] 
 at Oni.Files.Geometry.GeometryImporter.Import (System.String filePath, System.String outputDirPath) [0x00000] 
 at Oni.Files.Program.CreateGeometry (System.String[] args) [0x00000] 
 at Oni.Files.Program.Main (System.String[] args) [0x00000] 

EDIT: False alarm, geyser just informed me the delorean was not triangulated.

EdT

Re:false alarm; actually it is triangulated, but it uses negative indices ;) :P
geyser 05:06, 4 March 2008 (CET)

Can someone pass me a link to that file so I can test?

Neo

Yeah, sorry. Here: http://geyser.oni2.net/edition/vehicles/delorean.zip
It's not quite the original OBJ: I deleted the interior and camera path.
But other than that it's the original thing that used minuses, not me.
geyser 18:05, 4 March 2008 (CET)

Fixed: OniSplit v0.8.18

Neo

v0.8.15

On a second thought: OniSplit v0.8.15. The TGA files I export are always in Bgra32 format so this means they will always be autoconverted to Bgra4444 which is not ideal. Also detecting if a TGA file has an alpha channel or not is not very reliable.

The end result is that one needs to specify a texture format when creating TXMP files no matter what. That is:

  • bgr555 (or dxt1) for most of the stuff
  • bgr32 for skyboxes
  • bgra4444 for transparent/reflective stuff (in a couple of places bgra5551 is used but probably it's not big deal if bgra4444 is used instead)

Neo

v0.8.14

To make things simpler here's a new version: OniSplit v0.8.14. It automatically switches to bgra4444 if the input texture is bgra32. One can still specify bgra5551 if needed. In addition to this I fixed a bug that caused bad mipmap generation for textures with alpha channel.

Neo

v0.8.13

New OniSplit version: OniSplit v0.8.13

Envmap problem: for now I added an "-envmap" option through which the name of the env map texture can be specified:

onisplit -create:txmp dest_dir -genmipmaps -envmap:envksface TXMPIteration%2FKS_face.tga

I'll try to figure out a better way to do it. Storing texture options in a tga file seems possible but I'm not sure if editing tools preserve that information.

The envmap name can have the TXMP prefix but it is not required, it is added automatically if missing.

Export/Import for Wavefront OBJ files:

  • Named M3GMs and (unfortunately unnamed) M3GM contained in ONWC files can be exported to obj file format:
 onisplit -extract:obj dest_dir M3GMnotfound.oni
 onisplit -extract:obj dest_dir ONWCw1_tap.oni

Or for greedy :) people:

 onisplit -extract:obj dest_dir level0_Final.dat
  • Importing obj files:
 onisplit -create:m3gm dest_dir TCTF_Shotgun.obj

For importing obj files the obj file must only contain triangles so when exporting a model from a 3D design tool it needs to be triangulated. If the obj file uses more than one texture then only one will be taken into consideration. If the obj file does not contain a texture or someone wants to use a different one then the texture name to be used can be specified with -tex option:

onisplit -create:m3gm dest_dir -tex:TCTF_Shotgun TCTF_Shotgun.obj

Just like in -envmap option case the texture name can start with TXMP but it is not required.

Note that in both -envmap and -tex cases a .oni file is not created for the specified texture. The .oni file for that texture must be create separatly.

Neo

v0.8.12

I think I fixed the flipping: OniSplit v0.8.12

Neo

v0.8.11

TGA fixed: OniSplit v0.8.11 Stupid me, I did y-- instead of y++ :).

Neo

v0.8.10

New OniSplit version: OniSplit v0.8.10

I did not look into that "illegal instruction" thing yet but I added a texture import option:

onisplit -create:txmp destination_directory [options] source_image_file

where options can be

  • -nouwrap - set the "U wrapping disabled" flag
  • -nowwrap - set the "V wrapping disabled" flag
  • -format:bgr32, -format:bgra32, -format:bgr555, -format:bgra5551, -format:bgra4444, -format:dxt1 - the texture format to generate
  • -genmipmaps - generate mipmaps if they are not already present in the source file and if the source file is not dxt1 compressed

Example:

onisplit -create:txmp imported -format:dxt1 -genmipmaps tga\concrete.tga

Notes:

  • I haven't seen any TXMP that use format bgra32 but it should work with Oni. Did not tested it yet.
  • DXT1 compression is kind of lousy (lousy not lossy :)).
  • source_image_file can be dds or tga. "Color indexed" and "black and white" tga files are not supported currently. Other image file formats (png, jpg, bmp, tif) may work depending on Mono/.NET support for them.
  • onisplit will automatically prepend TXMP to the output file name if the source file name does not start with TXMP already.

Neo

v0.8.8

New OniSplit version that make extracting easier: OniSplit v0.8.8

onisplit -extract:png destination_directory_for_image_files source_dat_file

TGA and DDS are also supported using -extract:tga and -extract:dds.

Neo