OniSplit/Change log

From OniGalore
< OniSplit
Revision as of 23:30, 22 December 2021 by Iritscen (talk | contribs) (by (total lack of) popular demand, here's 32 more versions of OniSplit from Neo's talk page archives; this is all there is)
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.

v1.0 (WIP)

Really? Yes, really. Get the nightly HERE (1.0a2, 2021/12/17)
0. Possible introduction of aliases for the notoriously confusing -export and -import (easily mistaken for the -extract/-create functionality).
Historical synonyms for -export and -import are "unpack" and "pack", but I am leaning towards new aliases, most probably -split and -link.
OniSplit itself may be rebranded as GameDataTool, and a lightweight app (limited to the split/link functionality) may be dubbed (Oni)SpLink.
1. The required .NET framework is changed back to .NET 2.0 (a few past versions of OniSplit were built for .NET 4.0 for some reason, but it appears that 2.0 is sufficient).
2. A new packing format called -import:onix was added, which is the same as -import:sep (PC demo-like) but suppresses template checksums and replaces them with a new versioning system.
The produced .dat/.raw/.sep files are marked VR33 instead of VR31, only work with the OniX engine, and allow for new features in the game data format - provided that the OniX engine implements their support as well.
3. The misguided implementation of 32-bit transparent textures has been remastered, with a distinction between "rgba" and "bgra32" import formats: "rgba" corresponds to TXMP type 11 (directly supported by all Oni engines); "bgra32" is TXMP type 7, mistakenly used by previous versions of OniSplit (and Daodan/Mac patches) as a substitute for the overlooked type 11.
Old instances of type 7 TXMPs are automatically detected and repaired (replaced with type 11) at the first opportunity.
New TXMPs created with -format:bgra32 are stored as legitimate type 7, which will only be handled properly by the new OniX engine (or by an amended Daodan DLL).
4. Sound conversion is now (almost) fully featured, although with a strong bias towards the Windows platform (a.k.a. "PC") and MS ADPCM compression.
In addition to the previously available stream copying, you can now -extract:wav from a Mac SNDD (-extract:aif from a PC SNDD may be added later).
When using -extract:wav, an additional option -pcm decompresses the waveform and produces a .wav file with raw PCM storage.
Compressed ADPCM .wav-files (exported through -extract:wav) are now standard-compliant, and the importing of a .wav preserves custom (AD)PCM settings fully as well, meaning that third-party WAV files can now be roundtripped in and out of Oni (PC retail) without any issues. (However, the validation of corrupt third-party WAVs has not been thoroughly implemented or tested.)
In addition to the automatic creation of PC or Mac SNDDs through the -create command (depending on whether the input is a .wav or an .aif file), the -demo option can be used to generate a PC demo-like SNDD (short header, no custom sample rate or compression) both from a .wav and from an .aif file (useful when mass-converting sounds for VR33/OniX).
By default all SNDDs made with -create are ADPCM-compressed SNDDs even if the input is an uncompressed .wav file. The -pcm option allows uncompressed/decompressed storage for PC SNDDs, but this is not recommended: PCM sounds take up 4 times as much space as ADPCM, and their playback is currently broken for the PC demo and OniX engines.
Considering that, as of now, 18:55, 14 December 2021 (CET), all Oni engines play back SNDDs as 22.05 kHz waveforms (the PC retail engine only pretends to support custom sample rates, see HERE), it is now OniSplit's duty to report any waveforms that are not sampled at 22.05 kHz and to suggest the custom playback speed that should be used at OSGr level. 44.1 kHz sounds will automatically be downsampled to 22.05 kHz except when doing so would involve an additional round of decoding and reencoding; this potentially lossy operation must be explicitly requested with -forcestd.
When creating short-header SNDDs for the PC demo/OniX (using the -demo tag), incoming MS ADPCM files are ultimately required to have a standard block size of 512 bytes per channel. Here too, a potentially lossy reencoding must be explicitly requested through -forcestd, otherwise importing will fail with a report of the non-conformant block size.
Uncompressed PCM sounds can be imported from .wav, with support for the following bit depths: 16-bit (CD-quality), 24-bit (overkill) and 32-bit (super-overkill). Bit depth reduction is straightforward, practically non-lossy and therefore automatic, with merely a warning printed after the conversion. 8-bit linear PCM input (unsigned) is also supported, but don't tell anyone.
5. Subtitle files now have a custom XML format as requested by Script10k. You go from SUBT*.oni to XML using -extract:xml, and you import using -create (both the old .txt subtitles and the new XML format are accepted as input). Vanilla English SUBTs roundtrip exactly both through TXT and through XML. Non-Vanilla SUBTs and other language versions not tested.
6. The -fullname option is available for -extract:dae operations, prepending the 4-character template tag to the filename (TRBS, ONCC, AKEV, etc).
7. Level creation works again. The <Import> feature of Physics.xml has been repaired (it is the feature that lets you import several OBOA entries and their OBANs from the same Collada file) and enhanced with a couple of options, like explicit script IDs for each animated object and custom prefixes/suffixes for animations. As a minor convenience, all _marker textures are now imported automatically.
8. Interaction with Blender has been consolidated through the -blender option, available both when -extracting and -createing.
The primary use of -blender is to control the transition between Oni's and Blender's axis conventions, both in terms of scene orientation (Y-up for Oni, Z-up for Blender) and rotation order (X-then-Y-then-Z for Oni, Z-then-Y-then-X for Blender).
Another effect of -blender, exclusive to -extract, is to replace all instance of <technique_common> with <technique sid="common"> in the exported Collada files. When importing a Collada file through -create, both <technique_common> and <technique sid="common"> are accepted.
9. Characters/animations have been consolidated. Among minor improvements, quaternion math is more accurate (preventing "upside-down" pelvis animation and other artifacts), the identification of animation curves in Collada input is more robust, and OniSplit's internal animation buffer (for raw TRAM data) is no longer limited to 65535 bytes.
A new -keepkeys option is available for TRAM operations: for -extract it preserves Oni's sparse animation data instead of keying every frame; for -create it bypasses the keyframe reduction pass and uses the same keys as in the Collada file.
When -createing a TRBS, non-standard skeleton hierarchy is still allowed (controlled by the node tree in the Collada file), but standard sibling order is enforced for "thigh" and "shoulder" bones (if detected).
At this point there is still no proper skeletal setup (meaning it's still the same "nested" approach, with rigid body parts hinged to one another), and the rest pose is still the infamous "folded umbrella". A more intuitive rest pose may be implemented later.
At the time of writing, items (1) through (7) are done and ready for testing, whereas (8) and (9) are being finalized. The rebranding (0) is merely planned (subject to debate?). --geyser (talk) 13:11, 17 December 2021 (CET)

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 then you don't need the separate M3GM.
  • When exporting AKEV, quads that have script ids assigned to them are exported to separate files. This is related to 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:src\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.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.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