User talk:Neo: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(thanks)
m (marked dead link)
 
(375 intermediate revisions by 13 users not shown)
Line 1: Line 1:
=0.9.0=
'''Talk page archives''': [[User_talk:Neo/Archive1|#1]] - [[User_talk:Neo/Archive2|#2]] - [[User_talk:Neo/Archive3|#3]] - [[User_talk:Neo/Archive4|#4]] - [[User_talk:Neo/Archive5|#5]]
OK, let's give it a try: OniSplit 0.9.0


What's new:
Hi Neo, In the latest oni split 0.9.55, there seems to be a problem with converting ONCC files,
It fails to convert ONCC.xml files made by earlier to oni files .. says something about jump fields, the ONCC xml created by older versions are different from the ones created by this one, different fields <Jump Constants> and <Air Constants> instead of <Physics>, that would be ok we could switch to the new layout. However onisplit v.55 also fails to convert ONCC.xml it created back to oni. .. convert any ONCC.oni to xml, try to convert that xml back to oni, it fails.


:a couple of fixes to the collada exporter
2- It is also unable to convert a TRAM.oni file made from a dae by older versions back to xml : Operation is not valid due to current state of object. (containing QKEYS) while 0.941 is able to convert them.
:-create:trbs option to create a TRBS file from a collada file


How to use:
reported by Samer on July 10 2011
 
  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:
Hi Neo, a bug has been ecountered by me in OniSplit's xml export. The bug applies on versions 0.9.50.0 and 0.9.52.0. If exported TRAM file has direct animation links, only the second direct link is written into XML file. The first direct link is ignored (is always an empty element).
:*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
This is an excerpt from KONCOMcomb_p_p XML file as created by OniSplit 0.9.52.0:
        <DirectAnimations>
            <Link />
            <Link>TRAMKONCOMcomb_p_p_k</Link>
        </DirectAnimations>


::-noanim prevents the export of the default idle animation. That's needed because Blender doesn't import animated objects correctly.
It should be:
::-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.
        <DirectAnimations>
            <Link>TRAMKONCOMcomb_p_p_p</Link>
            <Link>TRAMKONCOMcomb_p_p_k</Link>
        </DirectAnimations>


:*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.
Binary (*.oni) files contain both direct links. Exported XML files don't. Since usually only the first direct link is used, this bug poses quite a nuisance. Thank you in advance.


:*When exporting Collada files from Blender you need to select the "Triangles" option because OniSplit does not import polygons.
: It might be that the binary (oni/exe) are corrupted. My version of TRAMKONCOMcomb_p_p.oni was correctly extracted with onisplit 52. --[[User:Paradox-01|paradox-01]] 19:00, 8 July 2011 (CEST)


:*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.
While I'm here I will take the chance to also ask something. I'm trying to create a combo. The animations work fine with animation type Kick, Kick2, Kick3 but not with KickRight, KrKr*, KrKrKr**. Could it be that those* animation types are dead? I hope you will find out what's wrong. --[[User:Paradox-01|paradox-01]] 19:00, 8 July 2011 (CEST)


:*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.
: Loser: The problem more than likely was the fact that the TRAMKONCOMcomb_p_p_p.oni was not in the same directory as  TRAMKONCOMcomb_p_p. To test, I removed TRAMKONCOMcomb_p_p_p.oni and got the same result as you did, added it back and got the correct output.  OniSplit wants all the files to be in the same directory. [[User:EdT|EdT]] 23:36, 8 July 2011 (CEST)


:*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...
----


[[User:Neo|Neo]]


I knew that I forgot some "notes"...
Neo, do you think we can have something like a -nodeps argument added to OniSplit? We could use a way to prevent the program from automatically following all dependencies when exporting files like ONCCs to XML. --[[User:Iritscen|Iritscen]] 14:26, 6 July 2011 (CEST)
:Oops, never mind, it sounds like this is already OniSplit's default behavior.... --[[User:Iritscen|Iritscen]] 16:24, 6 July 2011 (CEST)


:*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.
-----
Pathfinding issue fixed, though it seems to be still slightly off:


:*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.
[[Image:junkyard_PFG.jpg]]


[[User:Neo|Neo]]
There is still the issue of falling through the ground.


This is great, I'll have time tomorrow to give it a try.
level files are here: http://edt.oni2.net/testlevel/junkyard.zip


Though I already have some questions. I want to make sure I understand the process:  
[[User:EdT|EdT]] 03:14, 18 June 2011 (CEST)


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,
Hi Neo,


EdT
I was able to create the pathfinding grids, however, they are offset from the geometry. Also, there is a spot where you will fall through the ground.


OK, most of what I said above relates to modifying Collada files exported with OniSplit.
[[Image:junkyard.png]]


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:
The bnv itself is correct:
:*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.
[[Image:junkyard_bnv.png]]


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.
Here are my files: http://edt.oni2.net/testlevel/TestLevel.zip


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.
EDIT: Tested OniSplit with the arena level data: <nowiki>http://mods.oni2.net/system/files/80200ArenaofHurt.zip</nowiki>
Extracted the AKEV, then used create:akev to import the level. The pathfinding grids were offset from the geometry and there were areas where the player will fall through the floor.  


[[User:Neo|Neo]]
[[User:EdT|EdT]] 01:03, 17 June 2011 (CEST)


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.


[[User:Neo|Neo]]
Hi Neo,
=0.9.2=
I have tried Your ".dae" to ".xml" animation importer. I keep getting message ".dae files cannot be imported as TRAM". Can you tell me please where is the problem? Thank you. --[[User:Loser|Loser]] 13:00, 11 July 2010 (UTC)
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).


[[User:Neo|Neo]]
Hello, to import an animation you need an xml file and a dae file. If you try to export a TRAM to xml you get both files and when importing you need to provide the xml file, not the dae file. The dae file is referenced from inside the xml file (see the DaeImport element) [[User:Neo|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
New OniSplit version: OniSplit v0.9.52 (<nowiki>https://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit%5E_v0.9.52.zip</nowiki>, dead link)


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


Then you can try to replace the head with something simple like a cube: [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/head-in-a-box.png Head in a box] :)
  onisplit -extract:xml out -anim-body:ONCCbarabus.oni TRAMsomething.oni


So
:* New -recurse option for the xml exporter. Have fun :)
:*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...
  onisplit -extract:xml out -recurse ONCCbarabus.oni


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.
:* 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.


[[User:Neo|Neo]]
New OniSplit version: OniSplit v0.9.41


Please take a look at these files:
What's new:


http://edt.oni2.net/OS/MCKonoko.blend  I replaced Konoko's head with MasterChief.
:* fixed the Collada importer to work with 3DSMax exported files


http://edt.oni2.net/OS/MCKonoko.dae  The exported Collada file.
New OniSplit version: OniSplit v0.9.40


Error message from OniSplit when creating a TRBS file:
What's new:


  System.IO.InvalidDataException: No scene found
:* support for exporting/importing [[OBD:BINA/SABD|sound animations]] to/from xml files
  at Oni.Files.Geometry.BodyImporter.ReadBodyParts (Oni.Files.Dae.Scene scene) [0x00000]
:* better Collada export for environment
  at Oni.Files.Geometry.BodyImporter.Import (System.String filePath, System.String outputDirPath) [0x00000]  
:* support for full color transparent textures (-format:bgra32 on the command line, ARGB8888 format in an xml file)
  at Oni.Files.Program.CreateBody (System.String[] args) [0x00000]  
:* different (hopefully better) xml export format for animations (this one is actually from 0.9.38 but since that wasn't mentioned here...)
  at Oni.Files.Program.Main (System.String[] args) [0x00000]
:* 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)
Different test and error message.
::when you do
 
   onisplit -create:tram target_dir animation.dae
I imported ONCCkonoko_generic.dae into Blender and then exported it out as Collada 1.4, with no changes.
::in the target dir you'll get a TRAManimation.xml file.
This time I got the following message from OniSplit:
::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.
  System.Xml.XmlException: 'Element' is an invalid node type. file:///Oni/ExportedGameData/MCKonoko.dae Line 1743, position 4.
::-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.
  at System.Xml.XmlReader.ReadEndElement () [0x00000]
::-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.
  at Oni.Files.Dae.Reader.ReadEntity[Scene] (System.Action`1 entityReader) [0x00000]
::-Everything else that I forgot :)
  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.


[[User:Neo|Neo]]
[[User:Neo|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 [http://colladablender.illusoft.com/cms/content/blogcategory/18/44/ progress list] and you realize how incomplete it is, not to mention the bugs. I mean, getting Blender's axes wrong? Ridiculous.
New OniSplit version: OniSplit v0.9.37
: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 [[:Image:Poly_Mods-Griffin_Master_Comp.jpg|HD Griffin]] at the moment, in case you aren't aware). --[[User:Iritscen|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:
What's new:


"Vertex normals Vertex normals t t "
:* support for transparency in the environment importer


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.
New OniSplit version: OniSplit v0.9.35


[[User:Neo|Neo]]
What's new:
 
: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. --[[User:Iritscen|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.
::[[User:Geyser|geyser]] 07:47, 21 April 2008 (CEST)
 
Oops, fixed: [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit_v0.9.6.zip OniSplit 0.9.6]
 
[[User:Neo|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.
 
http://edt.oni2.net/AE/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


Thanks,
:* conversion of recorded films (.dat binary files) to xml files that can be used to create FILM .oni files


EdT
    OniSplit film2xml out_dir film.dat
: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.
::[[User:Geyser|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


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. 
I get this error message using the command create:tram
 
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 :-)
 
[[User:EdT|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.


[[User:Neo|Neo]]
  System.NotSupportedException: Invalid rotation axis {X:0 Y:0 Z:-1} for rotate transform in animation pelvis-node-ry
:'''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...)
  at Oni.Totoro.AnimationDaeReader.FindRotations () [0x00000]
:'''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.
  at Oni.Totoro.AnimationDaeReader.Import (System.String filePath, System.String outputDirPath) [0x00000]
:'''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.
  at Oni.Program.CreateGeneric (System.String[] args) [0x00000]
::[[User:Geyser|geyser]] 16:15, 3 May 2008 (CEST)
  at Oni.Program.Main (System.String[] args) [0x00000] (1)
=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.
The dae files are here: <nowiki>http://www.filefront.com/14507129/dae.rar</nowiki> (dead link)


Thanks
xml animation file here: <nowiki>http://www.filefront.com/14507115/ID%20walking.xaf</nowiki> (dead link)


[[User:EdT|EdT]] 17:26, 8 May 2008 (CEST)
Thanks [[User:EdT|EdT]]


I'm a bit busy these days so I haven't touch it lately. Here's the latest version I have: [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit_v0.9.9.zip 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.
Yep, caused by Z-up. I'll see what I can do.


[[User:Neo|Neo]]
[[User:Neo|Neo]]


Crap, I forgot to say how it works:
Hi Neo,


Extract to xml:
When you have time, can you take a look at this:


onisplit -extract:xml xml_dir level0_Final\Characters\ONCCbarabus.oni
[[Image:TRBSproblem.jpg]]


Import from xml:
When I use the latest FBX Converter 2010.2 to convert FBX to DAE, I get this problem.  However, when I use an older version, it works fine.  Here are the DAEs from both version: http://edt.oni2.net/temp/TRBSproblem.zip G2 is uses the new version, G1 uses the old.


onisplit -create oni_dir xml\ONCCbarabus.xml
Thanks [[User:EdT|EdT]]


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.
Oh boy, the new converter uses matrix transforms instead of individual scale/rotate/translate transforms. I'll see what I can do...
 
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 :)


[[User:Neo|Neo]]
[[User:Neo|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 http://wiki.oni2.net/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.


[[User:EdT|EdT]] 06:58, 9 May 2008 (CEST)


Hmm... now that was one weird bug. Here's the fixed version: [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit_v0.9.10.zip OniSplit v0.9.10]
----


[[User:Neo|Neo]]
The Iron Demon walks! Sorta...


Thank you. The .xml import/export is really amazing! Its much easier to use than a hex editor! :-)
You can see the video here: http://edt.oni2.net/ID/IDwalk.wmv


[[User:EdT|EdT]] 06:30, 10 May 2008 (CEST)
I converted the files from Bobbysoon (TRAMID_run1stepb.DAE, TRAMID_runstart.DAE, TRAMID_runstop.DAE) to xml.   The XML gave the pelvis height as <Height>-2175.5</Height>, so I removed the negative and divided the height by 100.  But as you can see, the model floats above the groundAlso, the velocity has some large numbers in the first part <Velocity>-4.076141 0</Velocity> I think that is the cause of the ID moving sideways not forward.
=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)
Files here: http://edt.oni2.net/ID/ID_Files.zip
  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
[[User:EdT|EdT]]


[[User:EdT|EdT]] 18:15, 10 May 2008 (CEST)
:Ha ha, that's going in my album of weird modding results. Anyway, I didn't even realize that animations were supposed to work yet, I thought we were waiting for an update to OniSplit. --[[User:Iritscen|Iritscen]] 14:33, 29 November 2009 (UTC)


I think I fixed it: [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit_v0.9.11.zip OniSplit v0.9.11]


[[User:Neo|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.
Hi Neo,
  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]


[[User:EdT|EdT]]
Having problems converting DAEs to trams.  I put all the files in a zip and included a ReadMe with the description of the errors. <nowiki>http://edt.oni2.net/temp/NeoTRAM.zip</nowiki>


OK, one more fix: [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit_v0.9.12.zip OniSplit 0.9.12]. If you still get errors please post the xml file you are using.
I was trying to make new animations, whenever you have time, please take a look.  Thanks [[User:EdT|EdT]]


[[User:Neo|Neo]]


Its fixed, thanks!
----
Hmm... I just discovered that I can't export TXMPs from a .dat file to the PNG format. I am attempting to use the -extract:png command on a virgin .dat file. The -extract:tga options works fine, but the -extract:png option gives:
System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus --->  System.DllNotFoundException: gdiplus.dll
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x00000]
  --- End of inner exception stack trace ---
  at System.Drawing.Bitmap..ctor (Int32 width, Int32 height, PixelFormat format) [0x00000]
  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (int,int,System.Drawing.Imaging.PixelFormat)
  at Oni.Imaging.SysExporter.ExportInstance (Oni.InstanceDescriptor descriptor) [0x00000]
  at Oni.Exporter.ExportInstanceList (System.Collections.Generic.List`1 descriptors) [0x00000]
  at Oni.Exporter.Export (Oni.InstanceFileManager fileManager, System.String sourceFilePath, System.String filter) [0x00000]
  at Oni.Program.ExtractTextures (System.String[] args) [0x00000]
  at Oni.Program.Main (System.String[] args) [0x00000]
This occurred in both 0.9.38 and 0.9.41 on my Mac. I used to always extract TXMPs as TGA, so I don't know when this actually worked for me. --[[User:Iritscen|Iritscen]] 17:54, 2 January 2010 (UTC)


[[User:EdT|EdT]]
:TGA always works because it's all done in OniSplit. For PNG/JPG I'm using the framework (.NET/Mono) and Mono seems to have a problem. [[User:Neo|Neo]]


Found a bug:
:I just tested it myself and I was able to extract all the textures from a virgin .dat file as PNG.  I'm using the latest version 0.9.45 and the latest Mono framework.  OSX 10.5.8 and 10.6.2 [[User:EdT|EdT]]


  System.InvalidOperationException: Node type Element is not supported in this operation.
::Okay, after many aborted attempts at updating mono (I was running 2.0.1) by building from source or using their binary installer, I realized that the installer was putting the files in some meaningless directory, and I ended up copying them to the right system directories, hoping I didn't overwrite libraries that were supposed to stay unchanged. Who knows what the consequences will be down the road for other stuff, but OniSplit now exports PNGs properly for me! --[[User:Iritscen|Iritscen]] 20:28, 3 January 2010 (UTC)
  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.
----
Observations of importing TRAMs to XSI.


http://edt.oni2.net/OniSplit/TRACkonokocore_animations.xml
Sometimes, imported TRAMs will have odd rotations mainly related to the pelvis and thighs.  Here is one example, the Striker's walking TRAM:
http://edt.oni2.net/TRAMS/WalkOS.wmv  As you can see the pelvis and thighs are rotating in an odd fashion.  This is due to euler vs quaternion rotations.  To see it correctly in XSI, you can use the option to "Convert Euler Rotation to Quaternion" on the pelvis and thighs, then the animation appears correct: http://edt.oni2.net/TRAMS/WalkQT.wmv  However, when importing a converted animation back to Oni, you get this result: http://edt.oni2.net/TRAMS/WalkOni.wmv


[[User:EdT|EdT]] 04:26, 18 May 2008 (CEST)
When a TRAM is imported to XSI, to "unwrap" a model from the default animation state, the right thigh is rotated 180 on the X axis and -180 on the Z axis, the left is rotated -180 on the X and -180 on the Z axis. Somehow, from this starting point, whenever XSI moves the thigh from a negative to a positive angle (or in the case of this example from positive to negative), the part would rotate the long way around as shown here: http://edt.oni2.net/TRAMS/ThighXZaxis.wmv


Um, can anyone else open the ZIP file for OniSplit 0.9.12? Both my Windows and Mac programs say it's bad. --[[User:Iritscen|Iritscen]] 15:54, 19 May 2008 (CEST)
One workaround is to insert keyframes to cause the animation to rotate in the correct direction.
:Ed obviously had no problems opening it, and neither have I. Try and download it again, maybe. --[[User:Geyser|geyser]] 18:07, 19 May 2008 (CEST)
::Okay, Ed gave me another copy of the file and it works for me. --[[User:Iritscen|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>


[[User:Neo|Neo]]
I found another approach that seems to work, if you are making an animation from scratch. That is to rotate the thighs down 180 on the Y axis.  So far in my testing, there are no odd rotations: http://edt.oni2.net/TRAMS/ThighYaxis.wmv


That didn't work, got the same error message.  Only difference is the location: column 25 instead of column 10.
The Striker DAE files and the XSI scene files are here: http://edt.oni2.net/TRAMS/TRAMfiles.zip
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)
 
[[User:EdT|EdT]]
[[User:EdT|EdT]]


This should fix it: [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit_v0.9.14.zip OniSplit 0.9.14]
I'm still unsure how the XZ animation was produced. There's a keyframe (for the Z rotation of left_thigh) that causes this. It's value is 135 while all the other keyframes for Z are well below 0 (-150..-180). If you move that keyframe to something like -215 then the animation works fine. Or so it appears to me...  


[[User:Neo|Neo]]
[[User:Neo|Neo]]


Thank you.  
:That's true about changing the keyframe to -215, however, for all the TRAMs exported from Oni, the number for the rotations are always less than 180 or -180. When the thigh is positioned in front of the body, the rotation on the Z axis is negative, between the range of -0.x to -179.x and when it is positioned behind the body, the rotation number is positive, between the range of 0.x to 179.x. So my XZ animation was reflecting that aspect. [[User:EdT|EdT]]


You mentioned in an earlier comment: BINA and OSBD - I'll try to make the current xml exporter/importer work with them too
::Ah, I didn't think about that. I don't think it matters if those angles are between -180..180 or not, I haven't seen any problems while trying to import the animation with -215. [[User:Neo|Neo]]


Will it soon be possible to extract/import BINACJBOMelee Profile.oni and BINACJBOCharacter.oni?
:::Then my question is, would it be possible to program OniSplit one day, so that it can produce a TRAM DAE that will import into XSI without any of those odd rotations of the pelvis and thighs? Or for OniSplit to import a TRAM DAE that was converted from Euler to Quaternion rotation?  It will be much easier to modify existing TRAMs without having to deal with those odd rotations. Thanks [[User:EdT|EdT]]


[[User:EdT|EdT]]
::::TRAM DAE: yes, I think so. I have an idea though I've yet to test it. Euler to Quaternion: I don't know why that doesn't work, I'll check. In theory there should be no problem. [[User:Neo|Neo]]
::::Found another solution (in XSI): use "Make rotation keys continuous" (in the same menu as Euler to Quaternion). [[User:Neo|Neo]]
:::::I tested the it, however, TRAMs converted that way do not appear correctly in Oni: http://edt.oni2.net/TRAMS/WalkRot.wmv files:http://edt.oni2.net/TRAMS/TRAMfiles2.zip  [[User:EdT|EdT]]
:::::Not to say that this is the only problem but... you're .dae files for left and right are identical :) [[User:Neo|Neo]]
::::::"The Make rotation keys continuous"is working great, no problems.  Except for the stupid user error with the Striker's walk... lol [[User:EdT|EdT]]
::::::: Googled a possible solution and fitted it to one method. I have already checked it for some quaternions, which should result in euler angles, which contains values greater than 180 degrees, and it works fine. Here it is:
    public static Vector3 FromQ2(Quaternion q1)
    {
        float sqw = q1.w * q1.w;
        float sqx = q1.x * q1.x;
        float sqy = q1.y * q1.y;
        float sqz = q1.z * q1.z;
        float unit = sqx + sqy + sqz + sqw; // if normalised is one, otherwise is correction factor
        float test = q1.x * q1.w - q1.y * q1.z;
        Vector3 v;
        Func<float, float> NormalizeAngle = new Func<float, float>(angle =>
        {
            while (angle > 360)
                angle -= 360;
            while (angle < 0)
                angle += 360;
            return angle;
        });
        Func<Vector3,Vector3> NormalizeAngles = new Func<Vector3,Vector3>(angles =>
        {
            angles.x = NormalizeAngle(angles.x);
            angles.y = NormalizeAngle(angles.y);
            angles.z = NormalizeAngle(angles.z);
            return angles;
        } );
        if (test > 0.4995f * unit)
        { // singularity at north pole
            v.y = 2f * Mathf.Atan2(q1.y, q1.x);
            v.x = Mathf.PI / 2;
            v.z = 0;
            return NormalizeAngles(v * Mathf.Rad2Deg);
        }
        if (test < -0.4995f * unit)
        { // singularity at south pole
            v.y = -2f * Mathf.Atan2(q1.y, q1.x);
            v.x = -Mathf.PI / 2;
            v.z = 0;
            return NormalizeAngles(v * Mathf.Rad2Deg);
        }
        Quaternion q = new Quaternion(q1.w, q1.z, q1.x, q1.y);
        v.y = (float)Math.Atan2(2f * q.x * q.w + 2f * q.y * q.z, 1 - 2f * (q.z * q.z + q.w * q.w));    // Yaw
        v.x = (float)Math.Asin(2f * (q.x * q.z - q.w * q.y));                            // Pitch
        v.z = (float)Math.Atan2(2f * q.x * q.y + 2f * q.z * q.w, 1 - 2f * (q.y * q.y + q.z * q.z));      // Roll
        return NormalizeAngles(v * Mathf.Rad2Deg);
    }
p.s. sorry, not found any code tags or something like that.
p.s.s. Mathf.Rad2Deg must be 57.2958f. other Mathf stuff is similar to Math
p.s.s.s anyway, looks like the root of evil is not in quaternion -> euler conversion. i will try to investigate that.
[[User:TwinkerTinker|6opoDuJIo]]


Yes, it will be possible. Not sure how "soon" though...
[[User:Neo|Neo]]
----
----
Hey Neo, I can't get Onisplit to work on Vista properly :( Any suggestions?


[[User:Gumby|Gumby]]
Hi Neo,


Huh?? I'm using Vista myself and it works fine. What problems are you having more exactly?
I have thought of adding a point to your todo list if you don't mind. Since the throw target is sort of reversed played in Oni (body rotated by 180 degrees, reversed movement, if I remember correctly), it would come handy if Onisplit can reverse it. Doing it in XSI would be a load of unnecessary work each time. Onisplit could easily recognize this special animation in the XML tags (<Flag>... ThrowTarget ...</Flag>). --[[User:Paradox-01|Paradox-01]] 15:21, 29 March 2010 (UTC)


[[User:Neo|Neo]]
----
Here's a mystery [which has been solved, see edits below this one]: what is wrong with Oni's sound occlusion with 44Khz sounds in Windows (and possibly all occlusion on Macs)? Here are two alternate versions of a package: <nowiki>http://iritscen.oni2.net/temp/06000MissingSoundsNoOcc.zip</nowiki> (dead link) and <nowiki>http://iritscen.oni2.net/temp/06000MissingSoundsOcc.zip</nowiki> (dead link). This package simply adds a sound to the gears at the end of Science Prison. There are probably any number of ways to test for this issue, but this is how I noticed the problem, so I can vouch for its reproducibility.
# Install the Occ version of the package. This uses 22Khz sound.
# Load Science Prison SP1 so there's no music or enemies around, and do "chr_location 0 676.3 64.7 -1898.3". You're now on top of the gears.
# Run into one of the nearby rooms with windows. The sound comes from the point you teleported to, so position yourself so the "ray" from the sound can reach you through a window. If you are standing with part of the room's wall in the way, the sound may cut out completely, which you don't want.
# Listen to the sound. Isn't it soothing? Now shoot the glass out (the M. Bow is a nice choice, it's quiet so you can hear the gears more clearly). The sound should get louder. You can hear this in my movie <nowiki>http://iritscen.oni2.net/temp/GearsTestWindows.mp4</nowiki> (dead link) (though the gears sound was distorted at the time because I didn't set the .grp properly, that's besides the point in this case).
# Now replace the Occ package with the NoOcc package and install it. This one uses 44Khz sound.
# Performing the same test, you should hear the gears at the same volume through glass as without the glass in the way. You can hear this issue in my movie <nowiki>http://iritscen.oni2.net/temp/GearsTestMac.mp4</nowiki> (dead link). Obviously in the Mac test I was using 22Khz sound, and yet I experienced the same issue. I suspect something was changed in the occlusion code between the Windows and Mac releases, perhaps in tandem with the removal of 44Khz sound support, that glommed the Windows 44Khz bug onto the Mac 22Khz sound code.


Just wondering, any updates to OniSplit?
Now, is it definitely a problem with Oni? I guess it is if we're sure that the sounds and .grp I provided are formatted and imported correctly. Or perhaps I'm totally mixed up here and don't know what I'm talking about. I've never done sound work before in Oni. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 15:36, 25 April 2013 (CEST)


[[User:EdT|EdT]] 05:48, 30 May 2008 (CEST)
: Iritscen: Try your test again with the command sound_show_debug=1 you will see a list of sounds and the sound level for each one.  When you are in front of the gears the level is 1 for gears, gears.aif .  Then move into one of the rooms behind the glass, the sound level will drop to around .6 or .7 depending on how far away you are.  Shoot out the glass and then the sound level will return to 1.[[User:EdT|EdT]] ([[User talk:EdT|talk]]) 17:02, 25 April 2013 (CEST)


http://img234.imageshack.us/img234/1438/errorkd5.jpg
::D'oh. I was wondering if I should have put this on Paradox's page but I felt that it was probably an Oni bug and I shouldn't distract 'dox anymore. I guess you would have had a simple solution to the problem no matter where I put it, EdT. So here's what happened: the NoOcc package has a custom .grp so that I can specify "2" channels, AKA 44Khz sound, since Oni's .grp expects 22Khz. What I had forgotten that I also tried to turn up the volume of the gears noise by setting the .grp's Volume to 2 instead of 1. Because a sound's maximum actual volume in Oni is 1, what happens with a >1 volume setting is that a sound will reach 100% volume from farther away than if the sound was set to a volume of 1. Because I was standing within the >1 apparent volume range of the NoOcc package's louder gears, I couldn't hear any difference in sound volume when a window got in the way. That's because the volume was still greater than 1 even though the sound was in fact being occluded from say, 1.9 to 1.4.
::Well, I learned something about sound today! Sorry for cluttering your talk page unnecessarily, Neo (I know you won't be seeing this until the weekend anyway). The funny thing is that I just got done telling someone on the forum about sound_show_debug, but I had no idea that the numbers in the left column were apparent volume so I didn't think of using the debug display on my package. Well, thanks EdT, at least I know everything is working properly. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 18:06, 25 April 2013 (CEST)


[[User:Gumby|Gumby]]
----
Hi Neo,


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.
I've tried a couple of OniSplit commands but I couldn't get some to work with latest public version (0.9.94.0). The commands are the follow:


EdT: No updates yet.
'''Conversion of ONWC > OBJ and DAE:'''


[[User:Neo|Neo]]
  -extract:obj outputdir input_ONWC.oni


Hmm. Well I was using it from AE's install level_0 files. Interesting.
  -extract:dae outputdir input_ONWC.oni


[[User:Gumby|Gumby]]
both execute with sucess but don't generate output.


Not explicit or accurate enough, Gumby. Try again. ("level_0"? WTF. "using it from AE's install level_0 files"? WTF.)
'''Conversion of OBJ > M3GM:'''
:[[User:Geyser|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?
:[[User:Geyser|geyser]] 13:57, 31 May 2008 (CEST)


  -create:m3gm outputdir input.obj


=0.9.15=
I get the exception:
Quick update: [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.15.zip OniSplit v0.9.15].
  System.ArgumentOutOfRangeException: O ¡ndice estava fora do intervalo. Tem de ser nÆo negativo e inferior ao tamanho da colec?Æo.
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).
  Nome do par?metro: index
  em System.ThrowHelper.ThrowArgumentOutOfRangeException()
  em Oni.Dae.IO.ObjReader.ReadVertices(String[] tokens)
  em Oni.Dae.IO.ObjReader.ReadFace(String[] tokens)
  em Oni.Dae.IO.ObjReader.ReadObjFile(String filePath)
  em Oni.Dae.IO.ObjReader.ReadFile(String filePath)
  em Oni.Motoko.GeometryImporter.Import(String filePath, String outputDirPath)
  em Oni.Program.ExecuteTasks(String[] args, String outputDirPath, Set`1 importedFiles, Queue`1 taskQueue)
  em Oni.Program.CreateGeneric(String[] args)
  em Oni.Program.Main(String[] args)


[[User:Neo|Neo]]
Could these be fixed? Thanks. [[User:Script 10k|Script 10k]] ([[User talk:Script 10k|talk]]) 22:07, 3 January 2014 (CET)


"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 [[wiktionary:to_whom_it_may_concern|WIMC]]: let's use [[AE:OMNI|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).
----
 
Hi Neo, do you still stop by the wiki? Not sure if you will see this. I sent you an email at what I'm pretty sure is your Yahoo! address, but I don't know if you still check that email, and it doesn't seem that you use Yahoo! Messenger anymore. I'm trying to get back in touch with you to ask you some questions about OniSplit, etc. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 00:02, 27 September 2016 (CEST)
[[User:Geyser|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?
::[[User:Iritscen|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 [[AE:OMNI]].
::[[User:Geyser|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? [http://gumby.oni2.net/Videos/AA.wmv Yes it is misnamed]
::[[User:Gumby|Gumby]] 06:50, 9 June 2008 (CEST)
:My laptop's GFX card is a bit special ([http://www.thinkwiki.org/wiki/ATI_Mobility_FireGL_T2 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 [http://www.driverheaven.net/mobility-radeon-drivers-support/76736-ati-mobility-firegl-t2-hp-nw8000.html HERE] some day.
::[[User:Geyser|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
::[[User:Gumby|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! --[[User:Iritscen|Iritscen]] 20:46, 5 June 2008 (CEST)
 
[http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.16.zip 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). --[[User:Geyser|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=
[http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.17.zip 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...
 
[[User:Neo|Neo]]
 
Thank you, its fixed and the -list command is handy.


[[User:EdT|EdT]] 04:20, 10 June 2008 (CEST)
[[Category:Userspace]]

Latest revision as of 15:27, 7 May 2023

Talk page archives: #1 - #2 - #3 - #4 - #5

Hi Neo, In the latest oni split 0.9.55, there seems to be a problem with converting ONCC files, It fails to convert ONCC.xml files made by earlier to oni files .. says something about jump fields, the ONCC xml created by older versions are different from the ones created by this one, different fields <Jump Constants> and <Air Constants> instead of <Physics>, that would be ok we could switch to the new layout. However onisplit v.55 also fails to convert ONCC.xml it created back to oni. .. convert any ONCC.oni to xml, try to convert that xml back to oni, it fails.

2- It is also unable to convert a TRAM.oni file made from a dae by older versions back to xml : Operation is not valid due to current state of object. (containing QKEYS) while 0.941 is able to convert them.

reported by Samer on July 10 2011


Hi Neo, a bug has been ecountered by me in OniSplit's xml export. The bug applies on versions 0.9.50.0 and 0.9.52.0. If exported TRAM file has direct animation links, only the second direct link is written into XML file. The first direct link is ignored (is always an empty element).

This is an excerpt from KONCOMcomb_p_p XML file as created by OniSplit 0.9.52.0:

       <DirectAnimations>
           <Link />
           <Link>TRAMKONCOMcomb_p_p_k</Link>
       </DirectAnimations>

It should be:

       <DirectAnimations>
           <Link>TRAMKONCOMcomb_p_p_p</Link>
           <Link>TRAMKONCOMcomb_p_p_k</Link>
       </DirectAnimations>

Binary (*.oni) files contain both direct links. Exported XML files don't. Since usually only the first direct link is used, this bug poses quite a nuisance. Thank you in advance.

It might be that the binary (oni/exe) are corrupted. My version of TRAMKONCOMcomb_p_p.oni was correctly extracted with onisplit 52. --paradox-01 19:00, 8 July 2011 (CEST)

While I'm here I will take the chance to also ask something. I'm trying to create a combo. The animations work fine with animation type Kick, Kick2, Kick3 but not with KickRight, KrKr*, KrKrKr**. Could it be that those* animation types are dead? I hope you will find out what's wrong. --paradox-01 19:00, 8 July 2011 (CEST)

Loser: The problem more than likely was the fact that the TRAMKONCOMcomb_p_p_p.oni was not in the same directory as TRAMKONCOMcomb_p_p. To test, I removed TRAMKONCOMcomb_p_p_p.oni and got the same result as you did, added it back and got the correct output. OniSplit wants all the files to be in the same directory. EdT 23:36, 8 July 2011 (CEST)




Neo, do you think we can have something like a -nodeps argument added to OniSplit? We could use a way to prevent the program from automatically following all dependencies when exporting files like ONCCs to XML. --Iritscen 14:26, 6 July 2011 (CEST)

Oops, never mind, it sounds like this is already OniSplit's default behavior.... --Iritscen 16:24, 6 July 2011 (CEST)

Pathfinding issue fixed, though it seems to be still slightly off:

Junkyard PFG.jpg

There is still the issue of falling through the ground.

level files are here: http://edt.oni2.net/testlevel/junkyard.zip

EdT 03:14, 18 June 2011 (CEST)


Hi Neo,

I was able to create the pathfinding grids, however, they are offset from the geometry. Also, there is a spot where you will fall through the ground.

Junkyard.png

The bnv itself is correct:

Junkyard bnv.png

Here are my files: http://edt.oni2.net/testlevel/TestLevel.zip

EDIT: Tested OniSplit with the arena level data: http://mods.oni2.net/system/files/80200ArenaofHurt.zip Extracted the AKEV, then used create:akev to import the level. The pathfinding grids were offset from the geometry and there were areas where the player will fall through the floor.

EdT 01:03, 17 June 2011 (CEST)



Hi Neo, I have tried Your ".dae" to ".xml" animation importer. I keep getting message ".dae files cannot be imported as TRAM". Can you tell me please where is the problem? Thank you. --Loser 13:00, 11 July 2010 (UTC)

Hello, to import an animation you need an xml file and a dae file. If you try to export a TRAM to xml you get both files and when importing you need to provide the xml file, not the dae file. The dae file is referenced from inside the xml file (see the DaeImport element) Neo


New OniSplit version: OniSplit v0.9.52 (https://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit%5E_v0.9.52.zip, dead link)

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

New OniSplit version: OniSplit v0.9.41

What's new:

  • fixed the Collada importer to work with 3DSMax exported files

New OniSplit version: OniSplit 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

New OniSplit version: OniSplit v0.9.37

What's new:

  • support for transparency in the environment importer


New OniSplit version: OniSplit 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

Neo

I get this error message using the command create:tram

 System.NotSupportedException: Invalid rotation axis {X:0 Y:0 Z:-1} for rotate transform in animation pelvis-node-ry
 at Oni.Totoro.AnimationDaeReader.FindRotations () [0x00000] 
 at Oni.Totoro.AnimationDaeReader.Import (System.String filePath, System.String outputDirPath) [0x00000] 
 at Oni.Program.CreateGeneric (System.String[] args) [0x00000] 
 at Oni.Program.Main (System.String[] args) [0x00000]  (1)

The dae files are here: http://www.filefront.com/14507129/dae.rar (dead link)

xml animation file here: http://www.filefront.com/14507115/ID%20walking.xaf (dead link)

Thanks EdT

Yep, caused by Z-up. I'll see what I can do.

Neo

Hi Neo,

When you have time, can you take a look at this:

TRBSproblem.jpg

When I use the latest FBX Converter 2010.2 to convert FBX to DAE, I get this problem. However, when I use an older version, it works fine. Here are the DAEs from both version: http://edt.oni2.net/temp/TRBSproblem.zip G2 is uses the new version, G1 uses the old.

Thanks EdT

Oh boy, the new converter uses matrix transforms instead of individual scale/rotate/translate transforms. I'll see what I can do...

Neo



The Iron Demon walks! Sorta...

You can see the video here: http://edt.oni2.net/ID/IDwalk.wmv

I converted the files from Bobbysoon (TRAMID_run1stepb.DAE, TRAMID_runstart.DAE, TRAMID_runstop.DAE) to xml. The XML gave the pelvis height as <Height>-2175.5</Height>, so I removed the negative and divided the height by 100. But as you can see, the model floats above the ground. Also, the velocity has some large numbers in the first part <Velocity>-4.076141 0</Velocity> I think that is the cause of the ID moving sideways not forward.

Files here: http://edt.oni2.net/ID/ID_Files.zip

EdT

Ha ha, that's going in my album of weird modding results. Anyway, I didn't even realize that animations were supposed to work yet, I thought we were waiting for an update to OniSplit. --Iritscen 14:33, 29 November 2009 (UTC)



Hi Neo,

Having problems converting DAEs to trams. I put all the files in a zip and included a ReadMe with the description of the errors. http://edt.oni2.net/temp/NeoTRAM.zip

I was trying to make new animations, whenever you have time, please take a look. Thanks EdT



Hmm... I just discovered that I can't export TXMPs from a .dat file to the PNG format. I am attempting to use the -extract:png command on a virgin .dat file. The -extract:tga options works fine, but the -extract:png option gives:

System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus --->  System.DllNotFoundException: gdiplus.dll
 at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
 at System.Drawing.GDIPlus..cctor () [0x00000] 
 --- End of inner exception stack trace ---
 at System.Drawing.Bitmap..ctor (Int32 width, Int32 height, PixelFormat format) [0x00000] 
 at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (int,int,System.Drawing.Imaging.PixelFormat)
 at Oni.Imaging.SysExporter.ExportInstance (Oni.InstanceDescriptor descriptor) [0x00000] 
 at Oni.Exporter.ExportInstanceList (System.Collections.Generic.List`1 descriptors) [0x00000] 
 at Oni.Exporter.Export (Oni.InstanceFileManager fileManager, System.String sourceFilePath, System.String filter) [0x00000] 
 at Oni.Program.ExtractTextures (System.String[] args) [0x00000] 
 at Oni.Program.Main (System.String[] args) [0x00000]

This occurred in both 0.9.38 and 0.9.41 on my Mac. I used to always extract TXMPs as TGA, so I don't know when this actually worked for me. --Iritscen 17:54, 2 January 2010 (UTC)

TGA always works because it's all done in OniSplit. For PNG/JPG I'm using the framework (.NET/Mono) and Mono seems to have a problem. Neo
I just tested it myself and I was able to extract all the textures from a virgin .dat file as PNG. I'm using the latest version 0.9.45 and the latest Mono framework. OSX 10.5.8 and 10.6.2 EdT
Okay, after many aborted attempts at updating mono (I was running 2.0.1) by building from source or using their binary installer, I realized that the installer was putting the files in some meaningless directory, and I ended up copying them to the right system directories, hoping I didn't overwrite libraries that were supposed to stay unchanged. Who knows what the consequences will be down the road for other stuff, but OniSplit now exports PNGs properly for me! --Iritscen 20:28, 3 January 2010 (UTC)

Observations of importing TRAMs to XSI.

Sometimes, imported TRAMs will have odd rotations mainly related to the pelvis and thighs. Here is one example, the Striker's walking TRAM: http://edt.oni2.net/TRAMS/WalkOS.wmv As you can see the pelvis and thighs are rotating in an odd fashion. This is due to euler vs quaternion rotations. To see it correctly in XSI, you can use the option to "Convert Euler Rotation to Quaternion" on the pelvis and thighs, then the animation appears correct: http://edt.oni2.net/TRAMS/WalkQT.wmv However, when importing a converted animation back to Oni, you get this result: http://edt.oni2.net/TRAMS/WalkOni.wmv

When a TRAM is imported to XSI, to "unwrap" a model from the default animation state, the right thigh is rotated 180 on the X axis and -180 on the Z axis, the left is rotated -180 on the X and -180 on the Z axis. Somehow, from this starting point, whenever XSI moves the thigh from a negative to a positive angle (or in the case of this example from positive to negative), the part would rotate the long way around as shown here: http://edt.oni2.net/TRAMS/ThighXZaxis.wmv

One workaround is to insert keyframes to cause the animation to rotate in the correct direction.

I found another approach that seems to work, if you are making an animation from scratch. That is to rotate the thighs down 180 on the Y axis. So far in my testing, there are no odd rotations: http://edt.oni2.net/TRAMS/ThighYaxis.wmv

The Striker DAE files and the XSI scene files are here: http://edt.oni2.net/TRAMS/TRAMfiles.zip

EdT

I'm still unsure how the XZ animation was produced. There's a keyframe (for the Z rotation of left_thigh) that causes this. It's value is 135 while all the other keyframes for Z are well below 0 (-150..-180). If you move that keyframe to something like -215 then the animation works fine. Or so it appears to me...

Neo

That's true about changing the keyframe to -215, however, for all the TRAMs exported from Oni, the number for the rotations are always less than 180 or -180. When the thigh is positioned in front of the body, the rotation on the Z axis is negative, between the range of -0.x to -179.x and when it is positioned behind the body, the rotation number is positive, between the range of 0.x to 179.x. So my XZ animation was reflecting that aspect. EdT
Ah, I didn't think about that. I don't think it matters if those angles are between -180..180 or not, I haven't seen any problems while trying to import the animation with -215. Neo
Then my question is, would it be possible to program OniSplit one day, so that it can produce a TRAM DAE that will import into XSI without any of those odd rotations of the pelvis and thighs? Or for OniSplit to import a TRAM DAE that was converted from Euler to Quaternion rotation? It will be much easier to modify existing TRAMs without having to deal with those odd rotations. Thanks EdT
TRAM DAE: yes, I think so. I have an idea though I've yet to test it. Euler to Quaternion: I don't know why that doesn't work, I'll check. In theory there should be no problem. Neo
Found another solution (in XSI): use "Make rotation keys continuous" (in the same menu as Euler to Quaternion). Neo
I tested the it, however, TRAMs converted that way do not appear correctly in Oni: http://edt.oni2.net/TRAMS/WalkRot.wmv files:http://edt.oni2.net/TRAMS/TRAMfiles2.zip EdT
Not to say that this is the only problem but... you're .dae files for left and right are identical :) Neo
"The Make rotation keys continuous"is working great, no problems. Except for the stupid user error with the Striker's walk... lol EdT
Googled a possible solution and fitted it to one method. I have already checked it for some quaternions, which should result in euler angles, which contains values greater than 180 degrees, and it works fine. Here it is:
   public static Vector3 FromQ2(Quaternion q1)
   {
       float sqw = q1.w * q1.w;
       float sqx = q1.x * q1.x;
       float sqy = q1.y * q1.y;
       float sqz = q1.z * q1.z;
       float unit = sqx + sqy + sqz + sqw; // if normalised is one, otherwise is correction factor
       float test = q1.x * q1.w - q1.y * q1.z;
       Vector3 v;
       Func<float, float> NormalizeAngle = new Func<float, float>(angle =>
       {
           while (angle > 360)
               angle -= 360;
           while (angle < 0)
               angle += 360;
           return angle;
       });
       Func<Vector3,Vector3> NormalizeAngles = new Func<Vector3,Vector3>(angles =>
       {
           angles.x = NormalizeAngle(angles.x);
           angles.y = NormalizeAngle(angles.y);
           angles.z = NormalizeAngle(angles.z);
           return angles;
       } );
       if (test > 0.4995f * unit)
       { // singularity at north pole
           v.y = 2f * Mathf.Atan2(q1.y, q1.x);
           v.x = Mathf.PI / 2;
           v.z = 0;
           return NormalizeAngles(v * Mathf.Rad2Deg);
       }
       if (test < -0.4995f * unit)
       { // singularity at south pole
           v.y = -2f * Mathf.Atan2(q1.y, q1.x);
           v.x = -Mathf.PI / 2;
           v.z = 0;
           return NormalizeAngles(v * Mathf.Rad2Deg);
       }
       Quaternion q = new Quaternion(q1.w, q1.z, q1.x, q1.y);
       v.y = (float)Math.Atan2(2f * q.x * q.w + 2f * q.y * q.z, 1 - 2f * (q.z * q.z + q.w * q.w));     // Yaw
       v.x = (float)Math.Asin(2f * (q.x * q.z - q.w * q.y));                             // Pitch
       v.z = (float)Math.Atan2(2f * q.x * q.y + 2f * q.z * q.w, 1 - 2f * (q.y * q.y + q.z * q.z));      // Roll
       return NormalizeAngles(v * Mathf.Rad2Deg);
   }

p.s. sorry, not found any code tags or something like that. p.s.s. Mathf.Rad2Deg must be 57.2958f. other Mathf stuff is similar to Math p.s.s.s anyway, looks like the root of evil is not in quaternion -> euler conversion. i will try to investigate that. 6opoDuJIo


Hi Neo,

I have thought of adding a point to your todo list if you don't mind. Since the throw target is sort of reversed played in Oni (body rotated by 180 degrees, reversed movement, if I remember correctly), it would come handy if Onisplit can reverse it. Doing it in XSI would be a load of unnecessary work each time. Onisplit could easily recognize this special animation in the XML tags (<Flag>... ThrowTarget ...</Flag>). --Paradox-01 15:21, 29 March 2010 (UTC)


Here's a mystery [which has been solved, see edits below this one]: what is wrong with Oni's sound occlusion with 44Khz sounds in Windows (and possibly all occlusion on Macs)? Here are two alternate versions of a package: http://iritscen.oni2.net/temp/06000MissingSoundsNoOcc.zip (dead link) and http://iritscen.oni2.net/temp/06000MissingSoundsOcc.zip (dead link). This package simply adds a sound to the gears at the end of Science Prison. There are probably any number of ways to test for this issue, but this is how I noticed the problem, so I can vouch for its reproducibility.

  1. Install the Occ version of the package. This uses 22Khz sound.
  2. Load Science Prison SP1 so there's no music or enemies around, and do "chr_location 0 676.3 64.7 -1898.3". You're now on top of the gears.
  3. Run into one of the nearby rooms with windows. The sound comes from the point you teleported to, so position yourself so the "ray" from the sound can reach you through a window. If you are standing with part of the room's wall in the way, the sound may cut out completely, which you don't want.
  4. Listen to the sound. Isn't it soothing? Now shoot the glass out (the M. Bow is a nice choice, it's quiet so you can hear the gears more clearly). The sound should get louder. You can hear this in my movie http://iritscen.oni2.net/temp/GearsTestWindows.mp4 (dead link) (though the gears sound was distorted at the time because I didn't set the .grp properly, that's besides the point in this case).
  5. Now replace the Occ package with the NoOcc package and install it. This one uses 44Khz sound.
  6. Performing the same test, you should hear the gears at the same volume through glass as without the glass in the way. You can hear this issue in my movie http://iritscen.oni2.net/temp/GearsTestMac.mp4 (dead link). Obviously in the Mac test I was using 22Khz sound, and yet I experienced the same issue. I suspect something was changed in the occlusion code between the Windows and Mac releases, perhaps in tandem with the removal of 44Khz sound support, that glommed the Windows 44Khz bug onto the Mac 22Khz sound code.

Now, is it definitely a problem with Oni? I guess it is if we're sure that the sounds and .grp I provided are formatted and imported correctly. Or perhaps I'm totally mixed up here and don't know what I'm talking about. I've never done sound work before in Oni. --Iritscen (talk) 15:36, 25 April 2013 (CEST)

Iritscen: Try your test again with the command sound_show_debug=1 you will see a list of sounds and the sound level for each one. When you are in front of the gears the level is 1 for gears, gears.aif . Then move into one of the rooms behind the glass, the sound level will drop to around .6 or .7 depending on how far away you are. Shoot out the glass and then the sound level will return to 1.EdT (talk) 17:02, 25 April 2013 (CEST)
D'oh. I was wondering if I should have put this on Paradox's page but I felt that it was probably an Oni bug and I shouldn't distract 'dox anymore. I guess you would have had a simple solution to the problem no matter where I put it, EdT. So here's what happened: the NoOcc package has a custom .grp so that I can specify "2" channels, AKA 44Khz sound, since Oni's .grp expects 22Khz. What I had forgotten that I also tried to turn up the volume of the gears noise by setting the .grp's Volume to 2 instead of 1. Because a sound's maximum actual volume in Oni is 1, what happens with a >1 volume setting is that a sound will reach 100% volume from farther away than if the sound was set to a volume of 1. Because I was standing within the >1 apparent volume range of the NoOcc package's louder gears, I couldn't hear any difference in sound volume when a window got in the way. That's because the volume was still greater than 1 even though the sound was in fact being occluded from say, 1.9 to 1.4.
Well, I learned something about sound today! Sorry for cluttering your talk page unnecessarily, Neo (I know you won't be seeing this until the weekend anyway). The funny thing is that I just got done telling someone on the forum about sound_show_debug, but I had no idea that the numbers in the left column were apparent volume so I didn't think of using the debug display on my package. Well, thanks EdT, at least I know everything is working properly. --Iritscen (talk) 18:06, 25 April 2013 (CEST)

Hi Neo,

I've tried a couple of OniSplit commands but I couldn't get some to work with latest public version (0.9.94.0). The commands are the follow:

Conversion of ONWC > OBJ and DAE:

  -extract:obj outputdir input_ONWC.oni
  -extract:dae outputdir input_ONWC.oni

both execute with sucess but don't generate output.

Conversion of OBJ > M3GM:

  -create:m3gm outputdir input.obj

I get the exception:

  System.ArgumentOutOfRangeException: O ¡ndice estava fora do intervalo. Tem de ser nÆo negativo e inferior ao tamanho da colec?Æo.
  Nome do par?metro: index
  em System.ThrowHelper.ThrowArgumentOutOfRangeException()
  em Oni.Dae.IO.ObjReader.ReadVertices(String[] tokens)
  em Oni.Dae.IO.ObjReader.ReadFace(String[] tokens)
  em Oni.Dae.IO.ObjReader.ReadObjFile(String filePath)
  em Oni.Dae.IO.ObjReader.ReadFile(String filePath)
  em Oni.Motoko.GeometryImporter.Import(String filePath, String outputDirPath)
  em Oni.Program.ExecuteTasks(String[] args, String outputDirPath, Set`1 importedFiles, Queue`1 taskQueue)
  em Oni.Program.CreateGeneric(String[] args)
  em Oni.Program.Main(String[] args)

Could these be fixed? Thanks. Script 10k (talk) 22:07, 3 January 2014 (CET)


Hi Neo, do you still stop by the wiki? Not sure if you will see this. I sent you an email at what I'm pretty sure is your Yahoo! address, but I don't know if you still check that email, and it doesn't seem that you use Yahoo! Messenger anymore. I'm trying to get back in touch with you to ask you some questions about OniSplit, etc. --Iritscen (talk) 00:02, 27 September 2016 (CEST)