User talk:Neo/Archive2: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (link fix)
m (+cat)
Line 652: Line 652:


[[User:EdT|EdT]]
[[User:EdT|EdT]]
[[Category:Userspace]]

Revision as of 02:19, 4 May 2022

0.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.
  • Everything else that I forgot to mention :)
  • I think I should cleanup this page a bit...

Neo

I knew that I forgot some "notes"...

  • 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

This is great, I'll have time tomorrow to give it a try.

Though I already have some questions. I want to make sure I understand the process:

Let's say I import Owldreamer's Masterchief (Currently it doesn't have any texture maps, but at least I want to see if it can be imported to Oni) into Blender, then export it out as a Collada file. Then can I create a TRBS file from it? Will OniSplit also create the M3GM files that make up the object and link them to the TRBS file? Next, I will need to make an ONCC file for it, perhaps copy an existing one and change the TRBS link to the new one that was created, is that correct?

I suppose you can move the OniSplit discussions to the talk page for Onisplit.

Thanks,

EdT

OK, most of what I said above relates to modifying Collada files exported with OniSplit.

If you want to create something from scratch (or use an existing model but that has not been exported from Oni) you need a couple of things:

  • You need to have 19 pieces of geometry that fit the body parts used by Oni: pelvis, mid, chest etc.
  • Those pieces of geometry need to be parented correctly, load a Collada file exported from Oni and see the Outliner window.
  • Geometries (or more correctly the scene nodes that cotain the geometries) need to be named correctly: pelvis, mid etc. Again, see the Outliner window with an existing Oni model loaded.
  • "Advanced" models that use skeletons/skinning won't work. Oni does not support such things.

You should also check the TRIA page for more stuff about character models in Oni.

As for what OniSplit creates: it creates all the needed M3GM, TRCM, TRIA and TRTA. TRBS files are self contained, you don't need anything else.

And yes, the simplest way to create an ONCC file for a new TRBS is to copy and modify an existing ONCC file. Since TRBS files are linked to by name you'll need to use a hex editor to modify the TRBS name that's inside the ONCC file (somewhere at the end, you can find it by looking for "TRBS"). The only problem you may encounter is that you need to pick an ONCC file that's linked to a TRBS which has a name that's equal or longer than the new TRBS name otherwise you won't have space in the file for the new name.

Neo

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


0.9.1

Fixed: OniSplit 0.9.1.

Neo


0.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

Thanks, I am able to import the TRBS file into Blender. You're right, it does look weird at first, but rotating the different body parts to their correct position made it look right. I'm a newbie to 3D, so I have lots to learn before I can accomplish anything. I think the easiest thing for me is to try to replacing different body part from existing characters. I just have to figure how to do that in Blender.

EdT

The simplest thing to do is to try to modify the existing geometry, export from Blender and create the TRBS to see if it works correctly.

Then you can try to replace the head with something simple like a cube: Head in a box :)

So

  • delete the head
  • create a cube from Menu Add, Mesh, Cube
  • move it where the head was. Notice that you only need to move it along X axis.
  • rename the cube to "head". In the "Buttons Window" there should be a Link and Materials panel and in that panel there is a textbox that starts with OB: where you can type the name.
  • now you need to set the head's parent to be the neck. Select the head and then select the neck while holding the shift key and after you select them you can press ctrl + P (or menu Object, Parent, Make Parent)

To replace the head with something more interesting you'll probably need to import another file that contains what you need. The only problem is that what you import may end up in another scene and I haven't figured out how to move an object from one scene to another. In fact I haven't figured out how to copy/paste an object...

Note: The cube won't have texture coordinates so if you try to import in Oni you'll probably end up with a black head.

Neo

Please take a look at these files:

http://edt.oni2.net/OS/MCKonoko.blend (dead link) I replaced Konoko's head with MasterChief.

http://edt.oni2.net/OS/MCKonoko.dae (dead link) The exported Collada file.

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


0.9.3

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

Another thing you should do is to select "Only Current Scene" when exporting to avoid having all scenes exported to the Collada file. In any case you need to make sure the "current scene" is the one you want to export. In you file it seems that the current scene was the one with the MC.

Now for the more complex problem: I said that rotation and scaling transforms are ignored and only translations are used when creating TRBS file. That's because TRBS only use translations and it has the advantage that you can rotate stuff to allow for easier editing. But that also means that if you add new geometry then the new geometry must already be scaled and oriented correctly.

For example in your file the head now has a scaling of 2.355 (select the head and press N (or select Transform Properties from the Object menu) to see the applied transform). This scaling is ignored when creating the TRBS and the result is a very small head.

I'm not very familiar with Blender but it appears that you need to do the following:

  • select pelvis
  • rotate it so all rotations are 0 (or you can simply edit them in the Transform Properties window)

(why you need this? because otherwise you'll be mislead about the real position of the head)

  • select head
  • select ObData to Center from Object, Transform menu
  • select Apply Scale/Rotation tr to ObData from Object, Clear/Apply menu

Something along these lines. I got it working once but second time when I tried it still exported a strange -90 rotation around X despite the Transform Properties window showing all rotations to be 0. Probably I did something different or the crap Collada exporter is playing tricks.

Neo

One thing I do know, is that there's no way the Collada plug-in should be v1.4. More like v0.4. Seriously. Look at the progress list and you realize how incomplete it is, not to mention the bugs. I mean, getting Blender's axes wrong? Ridiculous.
Anyway, I don't have any feedback on how TRBS importing is working until I try it some more tonight, but I just wanted to thank you for all the work you've done in documenting OBD stuff and writing OniSplit. I love 3D modeling, so anything that lets me import models into Oni is super-welcome (working on an HD Griffin at the moment, in case you aren't aware). --Iritscen 17:58, 10 April 2008 (CEST)

It's v0.3.159 actually, v1.4 is the Collada version. Kind of confusing, indeed. As for that progress list, oh well, take a look at this for example:

"Vertex normals Vertex normals t t "

where t means "ready for testing". Ready for testing my #$%, the normals are completly ignored. The worst part is that the project appears to be dead. No updates in 8 months doesn't sound well.

I guess I'll try fixing the vertex normals and maybe the animation importing problem too if I manage to cut my way in that Python script jungle.

Neo

Oh, wow, so the plug-in really is pre-1.0. Well, at least they're being truthful. And you're right that the project seems dead. The site says that the work on the plug-in is for their own game project. Well, I guess maybe the whole game project thing didn't work out, ergo, the plug-in is useless to them now. What's amazing is that no one in the Blender community seems to care enough to pick up the work themselves. --Iritscen 16:46, 11 April 2008 (CEST)

Neo, please look at the OniSplit talk page for my continued discussion on OniSplit and TRBS. Your talk page is getting too LONG! :-)

EdT


0.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

Neo, Cel shading looks cool!

Please look at this screenshot, you will notice that the outline color for the head and biceps is not black, even though I have a black pixel at 0,0 on the TXMP. To test, I also put a yellow pixel at 0,0 and the outline was yellow. So I'm not sure, why I don't get a black outline.

GITS_Cel.jpg

Here are all my files related to this outfit. Its still WIP, but I thought the cel shader effect would look good with it.

http://edt.oni2.net/3D/Motoko.zip (dead link)

Thanks,

EdT

Actually, the cel-shading of the whole model is flawed, not just the head and upper arms: e.g., the outline of her wrists is actually dark gray, and you're getting true black only for a few body parts, by coincidence. You didn't get true yellow, either.
The reason is that unless you use the -nouwrap and -novwrap tags, the color at (0,0) is sampled from all 4 corner pixels, not just from the top left one. So, either use those tags (that's what I've been doing) or place a black pixel in every corner.
I'd like to say that no matter how hard you try, you can't retexture this body mesh to look like the Major: you'll have to pick better-fitting body parts and retexture them. Smooth vertex normals wouldn't hurt either: what tool are you using now?
Also note, for future troubleshooting, that the .dae format is more appropriate for sharing, since it's the actual source file Onisplit works with.
geyser 19:57, 28 April 2008 (CEST)

geyser: Thanks for explaining about the cel-shading. Regarding the Major, as you pointed out the "Major just can't be a serious ingredient", so I gave up on trying to import a model of her. Rather, this outfit is more of my tribute to GITS, than anything else.

For this model, I used a program called Cheetah3D. I first exported the ONCC for k3 and k4_K, then converted the .dae file to .fbx using the FBX Converter, then swapped the pelvis, from k3 to k4_K, exported as .fbx, then converted to .dae. Since Blender ignores the vertex normals as Neo states, I wanted to see if I could use Cheetah3D instead.

EdT


Neo, you mentioned that you plan on adding .xml import/export to OniSplit. I'm curious, which types of files will have that feature? Obviously, TRAC, so we don't have to go through all that hexediting to add another move.

But what about TRAM? Would that allow us to blend elements of combat moves from different characters? Of course, I don't know if what I'm asking is even possible :-)

EdT 01:52, 3 May 2008 (CEST)

Currently xml export/import is limited to files that do not have raw/sep parts and that means TRAM does not work currently. Other types that are not supported are AKEV, BINA, OSBD, SNDD, SUBT, TXMP. What will happens with these types?

TRAM - needs a custom importer/exporter that probably will involve both an xml file and a collada file
AKEV - again needs a custom importer/exporter to a collada file (hopefully without an xml file)
BINA and OSBD - I'll try to make the current xml exporter/importer work with them too
SNDD - I think they can be imported directly from wav/aif files but I did not bother too much this them since I kind of doubt that someone will create new sounds :)
SUBT and TXMP - they already have custom exporters/importers but I'd add a way to create a TXMP file from an xml and an image file to avoid the need of passing texture options on the command line

All other types should work but I did not get to try them all yet. I played a bit with WMDD for example and it seems to work fine. TURR seems to have some problems with some garbage it contains.

It even works on stuff like M3GM but it's not very usefull to export M3GM to xml since you can already export them to obj or collada.

Neo

But what about TRAM? Would that allow us to blend elements of combat moves from different characters? Of course, I don't know if what I'm asking is even possible I'm not sure what you mean by blending. Do you mean in a single TRAM? If so, it will all depend on how well your 3D tool interacts with COLLADA's animation support (basically, forget about Blender for now). And as for "bastardizing" fighting styles, you can already do so rather easily by hex-editing the TRAM filenames at the end of a TRAC*.oni (but probably you were asking about modding the animation tracks...)
Since Blender ignores the vertex normals as Neo states, I wanted to see if I could use Cheetah3D instead. Yeah, but the normals you got are nothing to be confident about. Konoko is clearly faceted, so either the normals are missing or they are not smooth enough in the FBX. You want to figure that out.
Rather, this outfit is more of my tribute to GITS, than anything else. Sure, but as far as tributes go, surely it doesn't have to look like Konoko dyed her hair and painted her jeans. You have to be more creative in your choice of body part meshes. I'll show you what I mean in a short while.
geyser 16:15, 3 May 2008 (CEST)


0.9.9

Neo,

Just wondering how you are progressing with the .xml import. I'm currently playing around with the TRAC, and entering the TRAM in an .xml file will be much easier.

Thanks

EdT 17:26, 8 May 2008 (CEST)

I'm a bit busy these days so I haven't touch it lately. 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.

Neo

Crap, I forgot to say how it works:

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


0.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

Thank you. The .xml import/export is really amazing! Its much easier to use than a hex editor! :-)

EdT 06:30, 10 May 2008 (CEST)


0.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


0.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

Its fixed, thanks!

EdT

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)

Um, can anyone else open the ZIP file for OniSplit 0.9.12? Both my Windows and Mac programs say it's bad. --Iritscen 15:54, 19 May 2008 (CEST)

Ed obviously had no problems opening it, and neither have I. Try and download it again, maybe. --geyser 18:07, 19 May 2008 (CEST)
Okay, Ed gave me another copy of the file and it works for me. --Iritscen 19:23, 19 May 2008 (CEST)


0.9.14

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

Thank you.

You mentioned in an earlier comment: BINA and OSBD - I'll try to make the current xml exporter/importer work with them too

Will it soon be possible to extract/import BINACJBOMelee Profile.oni and BINACJBOCharacter.oni?

EdT

Yes, it will be possible. Not sure how "soon" though...

Neo


Hey Neo, I can't get Onisplit to work on Vista properly :( Any suggestions?

Gumby

Huh?? I'm using Vista myself and it works fine. What problems are you having more exactly?

Neo

Just wondering, any updates to OniSplit?

EdT 05:48, 30 May 2008 (CEST)

errorkd5.jpg

Gumby

Gumby: I don't think that has anything to do with Vista. It looks like you have a corrupted .oni file in that folder. I'll make a new version of OniSplit that reports the file name for errors like this.

EdT: No updates yet.

Neo

Hmm. Well I was using it from AE's install level_0 files. Interesting.

Gumby

Not explicit or accurate enough, Gumby. Try again. ("level_0"? WTF. "using it from AE's install level_0 files"? WTF.)

geyser 13:53, 31 May 2008 (CEST)

I mean, you're obviously using OniSplit in a way that has little to do with AE. Whatever is in your "oni" folder?

geyser 13:57, 31 May 2008 (CEST)


0.9.15

Quick update: OniSplit v0.9.15. 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

"creation of textures larger than 256x256" Just a short note to the inquiring minds as for why this makes sense. Oni's engine has a limitation on texture size for everything but DXT1-compressed ones in the form of a buffer that's just enough for a 256x256 texture. The buffer is allocated dynamically, so its size can be tweaked with an in-place patch, and we can now have textures as large as 512x512 or even 1024x1024 (probably a bit overkill). To Ed and Neo and WIMC: let's use THIS PAGE for documenting the upgrades to OMNI's engine (download links of the most recent version, list of in-place patches, eventually Mach'O modules or whatever; if the lists get verbose, we'll move them to subpages).

geyser 23:54, 1 June 2008 (CEST)

Wow. That is really, truly awesome. I am also glad we hadn't made any progress yet with HD textures, as our cap was going to be 256x256. This news brings us in line with AlephOne, which allows Marathon's textures to be upgraded to (at least) 1024x1024. Having played the AlephOne Marathon with those HD textures, even though the level geometry is as primitive as always, I can say that it breathes new life into the look of the game. As geyser says, 1024x1024 might be overkill since Oni relies on a simpler art style when it comes to textures, preferring straight lines and flat colors that won't benefit as much from upscaling. Still, certain applications of 512x512 or 1024x1024 will definitely improve the game's look. Now, geyser, is this patch currently applicable to the Mac version as well as the PC version?
Iritscen 15:20, 2 June 2008 (CEST)
I am also glad we hadn't made any progress yet with HD textures And I guess you're waiting for Yet Another Revolution for 3D models as well, hmm? Maybe you're right... It's not like we can really import TRBS right now, after all ^_^
straight lines and flat colors that won't benefit as much from upscaling Actually, that kind of hi-res textures will typically look like crap without AF. I don't know about you, but I haven't gotten AF to work on my laptop (yet). So no WOW.
is this patch currently applicable to the Mac version Are you really so eager to lose focus again? ^_^ Neo hasn't located the buffer size in OMNI's engine yet, or at least hasn't documented it anywhere. Just keep an eye on OMNI.
geyser 16:57, 2 June 2008 (CEST)
Geyser, does your laptop have non-integrated video? AF should work fine as long as you have a seperate video card, there should be an option in your video card settings to force AF and a whole boatload of other things into Oni. Remember this video? Yes it is misnamed
Gumby 06:50, 9 June 2008 (CEST)
My laptop's GFX card is a bit special (Mobility FIRE GL T2) and is not recognized by ATI's Catalyst bundles. As for the drivers provided by IBM, the control panel doesn't let me enable AF for OpenGL (and DirectX controls have no effect on Oni). I'll try the few hacks outlined HERE some day.
geyser 09:05, 9 June 2008 (CEST)
Meh. That is a bit odd. But just because your computer is odd and won't let you doesn't mean that everybody has the same problem
Gumby


0.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)

I had a problem with the ONCCCopfemAa1 and A2 files. Here is the error message:

 System.InvalidOperationException: Node type Element is not supported in this operation.   file:///XMLfiles/ONCCCopfemA2.xml (line 213, column 14)
 at System.Xml.XmlReader.ReadContentString (Boolean isText) [0x00000] 
 at System.Xml.XmlReader.ReadContentString () [0x00000] 
 at System.Xml.XmlReader.ReadContentAsFloat () [0x00000] 
 at Oni.Files.XmlImporter.Oni.Files.Metadata.IMetaTypeVisitor.VisitFloat (Oni.Files.Metadata.MetaFloat type) [0x00000] 
 at Oni.Files.Metadata.MetaFloat.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)

This occurs even if I was to export the file and then import without making any changes. Here is the file: http://edt.oni2.net/OniSplit/ONCCCopfemA2.zip

OT: Wouldn't this page work better as the discussion page for OniSplit?

EdT


0.9.17

OniSplit 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

Thank you, its fixed and the -list command is handy.

EdT 04:20, 10 June 2008 (CEST)

Neo, a user on OCF has this gets this error message:

The url is http:// img233.imageshack.us/my.php?image=screenou3.jpg

Any ideas? Maybe my brain is not working right now :-)

Edit: he was using 0.8.2907 version

EdT 00:01, 13 June 2008 (CEST)

I'd say he's an archeologist. He somehow dug up a really old version of OniSplit :). You can suggest him to get the latest one or to run OniSplit -version to find out what version he has.

Neo


Other Topics

This is not related to Onisplit.

Do you think that some day it will be possible to increase the number of plugins levels that the Mac engine can accept? It seems that if the missing levels had been included in the original game, the Mac engine would have had to accept more levels, than currently.

Or for the Mac engine to accept TXMPs larger than 256x256? Since the last update for that feature didn't work.

Anyways, I just wanted to thank you for continuing to look into the Mac version of Oni and helping to improve it.

EdT 07:01, 10 June 2008 (CEST)

Hmm... I'm not sure why the TXMP hack didn't work but I still think it should be possible to get it to work. There is not much different between Oni PC and Oni Mac in this are so I see no reason for it not to work. Maybe I just got the wrong offsets or something.

Increasing the number of plugins for Mac is more complicated. Probably it can be done but I'm not that familiar with Power PC assembly/executable format to say when and how it may be possible.

Neo

Neo, perhaps we can create a new wiki page listing the improvements you want to make to the Mac engine and the info you need to accomplish it. Then I will ask around and post to other forums the link to the page and hopefully someone with PPC assembly experience will be able to answer your questions.

EdT 15:11, 11 June 2008 (CEST)

Well, if you happen to come across a good PPC reference you can pass it over. I searched the Internet but I'm not happy with what I found until now. Otherwise is just a lack of experience with PPC and that doesn't change overnight or by posting on forums :).

Neo

Can you tell me which PPC references you already have, so for those I find, I won't be giving you duplicates. Also, I still think its a good idea to have a page that shows what you want to improve (Such as increasing the number of plugins) and any questions you might have related to it. Or for example, we have the Mac Beta 4 which seems to be similar to the PC version at least in regards to the number of script commands available. I always wondered if it would be possible to run that engine in OSX and use the final data files. So we put such items on the wiki page and maybe, just maybe we can find a Mac programmer interested in helping to improve Oni. It never hurts to ask. :-)

EdT

PPC stuff: the latest documentation I found is this: [1]. What bugs me about it is that some instructions I see in the Mac executable don't appear to be listed there.

Mac Beta 4: never seen it so I can't say anything about it.

PPS:

I really need to cleanup this page :). Oh well, later...


Neo

MacBeta4: http://edt.oni2.net/beta/OniBeta4.zip (dead link) If you want to see all the beta level files, send an email to me edt@oni2.net and I will give you the info.

Have you ever tried to use Google to search for "unknown instruction" PowerPC assembly instruction or something similar?

Regarding PPC assembly info I found these pages [Replaced dead links with Archive.org versions --Iritscen]:

https://web.archive.org/web/20090622125037/https://developer.apple.com/documentation/DeveloperTools/CompilersDebuggers-date.html
https://web.archive.org/web/20161104101935/https://www.ibm.com/developerworks/linux/library/l-ppc/
http://web.archive.org/web/20210331181246/https://www.cs.uaf.edu/2006/fall/cs301/support/ppc/progenv.pdf
http://web.archive.org/web/20080705115313/http://the.wall.riscom.net/books/proc/ppc/cwg/cwg_toc.html

Hope one of these will help

P.S. I don't know if you ever looked at the jetpack hack: AE:Barabas#General_instructions There were 2 timers that geyser was looking for: the "flailing timer" and "that other timer that makes you die in mid-air when you've been falling for too long". He never mentioned if he found it, have you ever come across it?

EdT 04:39, 13 June 2008 (CEST)

PPC: The PDF link looks interesting, I'll take a look

Flailing timer: try changing 0x00 at 0x5E4C2 to 0x7F (Mac) and 0x00 at 0xF724B to 0x7F (PC)

Neo

Thanks for the flailing timer info.

EdT