User talk:Neo: Difference between revisions

From OniGalore
Jump to navigation Jump to search
No edit summary
m (marked dead link)
 
(244 intermediate revisions by 11 users not shown)
Line 1: Line 1:
I am sorry to bother, but this can help to make h2w system look better. When character collides with wall, what REALLY collide ??? For me it seems that for char->wall collision there is some invisible bounding box. Where is this bounding box, if you know (or correct me if I am wrong). How can I change it? I ask because for me (it is my guess in next sentence, nothing proven ) it seems that this "bounding box" looks like invisible sphere which is around pelvis bone. That is why you can fall and stick your torso/head/legs into next room. Engine ignores bones in char->wall coll. Is this correct? + please answer if you know how to change it. Thanks a lot in any case
'''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]]


P.S.:Just a curious question, no explanation needed: I know that AI2 powered characters can push away weapons which are on ground. Can it be (from engine-possibilities point of view) that in ONI we should have movable furniture (objects which can be pushed by chars)?
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.


--[[User:Loser|Loser]] 11:34, 20 June 2008 (CEST)
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.


Umm... many questions, time for a brain dump :)
reported by Samer on July 10 2011


;Character - Wall collision


:this is always sphere tree-quad collision. You probably know that the sphere tree can be seen with "chr_debug_sphere=1". One thing to note about that sphere tree is that it always "stays up" (even when the character is fallen). That's why fallen characters pass through walls, their body gets outside the sphere when that happens.


:As for changing the radius of that sphere tree: it may be possible but it won't solve anything.
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).


;Character - Floor collision
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>


:characters also have a special function to detect floor collision which checks if a 3x3 quad intersects the floor. This is done to avoid "strange" sinking when the sphere's lowest point goes outside the floor. This is the probable cause why sometimes fallen characters hang on an edge (their 3x3 quad still intersects the floor) or fall of the edge even if their feet or head are still on the floor (the 3x3 quad is too small to cover the feet and head when the character is fallen).
It should be:
        <DirectAnimations>
            <Link>TRAMKONCOMcomb_p_p_p</Link>
            <Link>TRAMKONCOMcomb_p_p_k</Link>
        </DirectAnimations>


;Particle - Wall collision
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.


:this is always point-quad collision (the point is the position of the particle)
: 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)


;Particle - Object collision (where object is anything with a physics context that supports collision: characters, [[OBOA]] objects, powerups, weapons)
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)


:this can be sphere-obbox or sphere-sphere collision depending on what the object has (obbox or sphere tree). The radius of the particle sphere is taken from Collision Radius property of the particle class. It can be 0 and then the collision degenerates to point-obbox/point-sphere collision.
: 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)


;Environment collision (general)


:The engine can only do point-quad and spheretree-quad collision detection.


;Object collision (general)
----


:All objects (that have a physics context) have a sphere tree attached to them and some objects created through OBOA also have an obbox.


;Moveable furniture
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)


:Yes and no. It can be done to some extent using [[OBOA]].
-----
Pathfinding issue fixed, though it seems to be still slightly off:


:Basically an OBOA object can be pushed if it's not animated (no OBAN link) and it has "physics type" 2 or 4 (I don't know what's the difference).
[[Image:junkyard_PFG.jpg]]


:What doesn't work:
There is still the issue of falling through the ground.
:*characters fall through objects (the character-floor collision function does not see objects)
:*since the environment only supports sphere-quad collision you tipically cannot push an object very close to the wall (unless of course the object itself is a sphere or close enough to one)
:*objects can fall but because of sphere-quad collision detection they'll get stuck somewhere above the floor
:*an object can fall on another object but a third object will fall through both of them; in general multiple object interaction is buggy
:*if I remember correctly there is 128 physics context limit. That means the number of active characters + objects + powerups and whatever else needs a physics context is limited to 128. Anyway it will very likely crawl before you reach that limit.


[[User:Neo|Neo]]
level files are here: http://edt.oni2.net/testlevel/junkyard.zip
 
[http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.18|_beta4.zip Beta4]
 
Oh boy, were Mono developers lazy or not... :)
 
[[User:Neo|Neo]]
 
Thank you! BINACJBOCharacter.oni works fine, now to take a look at the melee profile file...
 
Ed
 
The melee profile is much more understandable. The moves are clearly identified. So  I assume, now we will be able to create a new melee profile or at the very least add new techniques to an existing profile.
 
Again, THANK YOU on your awesome work on OniSplit.


[[User:EdT|EdT]] 06:17, 22 June 2008 (CEST)
[[User:EdT|EdT]] 03:14, 18 June 2011 (CEST)


2 notes about melee:


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


Other stuff:
Hi Neo,


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


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


[[User:Neo|Neo]]
The bnv itself is correct:


Hey Neo, do you have any idea what the flag "Boss" does?
[[Image:junkyard_bnv.png]]


[[User:Gumby|Gumby]] 18:02, 22 June 2008 (CEST)
Here are my files: http://edt.oni2.net/testlevel/TestLevel.zip


Not sure. It mai be connected to ai2_boss_battle script variable. And I'm not sure those flags are 100% correct, it looks to me that Boss/NoAutoDrop/Omniscient are mixed up.
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)


Hello again. I am thinking of writing the Windows GUI for Onisplit. What scripting language would you suggest I write it in?
-----


[[User:Gumby|Gumby]] 02:55, 23 June 2008 (CEST)


Hmm... the only scripting language to do a Windows GUI that comes to mind is Tcl/Tk but you really don't want to use that :). There are Perl/Python/Ruby etc. implementations for Windows but I have no idea if they can be used to make a GUI. It's likely that you'll have to use one of the "usual" languages: C/C++/C#/VB/Java/Delphi...


Maybe I'll do a GUI one day but it's not on my priority list, I'm more interested in making importers/exporters for now.
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. --[[User:Loser|Loser]] 13:00, 11 July 2010 (UTC)


[[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]]


  the only scripting language to do a Windows GUI that comes to mind is Tcl/Tk but you really don't want to use that :)


You can also try AutoIt3: http://www.autoitscript.com/autoit3/
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)


It's easy to create a GUI with both of them, but AutoIt3 can't work with binary files, only text files (as far as I know). And in case of tcl/tk: It's a pain to install it. I tried and failed.
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:


[[User:Ssg|Ssg]] 11:44, 23 June 2008 (CEST)
  onisplit -extract:xml out -anim-body:ONCCbarabus.oni TRAMsomething.oni


I've worked with AutoIt3 before and I would recommend it. The GUI creation functions are both powerful and easy to use. It can work with binary files using:
:* New -recurse option for the xml exporter. Have fun :)
FileOpen("filename", 16)
If you need any help with AutoIt post a message on my talk page.
[[User:RossyMiles|rossy]] 12:55, 23 June 2008 (CEST)


Why would I want to open binary files? O_o. For detecting the type of .oni file I give it?
  onisplit -extract:xml out -recurse ONCCbarabus.oni
I have not worked with AutoIt3 before, but it doesn't look too hard, and I'm sure my conglamerated knowledge of random scripting languages will help me...


[[User:Gumby|Gumby]] 16:57, 23 June 2008 (CEST)
:* 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.


http://gumby701.googlepages.com/gui.exe
New OniSplit version: OniSplit v0.9.41


Look, its a GUI! That doesn't do anything...
What's new:


...and needs properly aligned and formatted...:D
:* fixed the Collada importer to work with 3DSMax exported files


[[User:Gumby|Gumby]] 02:23, 24 June 2008 (CEST)
New OniSplit version: OniSplit v0.9.40


What's new:


One more beta for OBJC: [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.18|_beta5.zip Beta 5].
:* support for exporting/importing [[OBD:BINA/SABD|sound animations]] to/from xml files
 
:* better Collada export for environment
Fixed character flags and added move type names and parameters names to melee (instead of numbers and Param0, Param1 etc.).
:* 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 :)


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


This makes reading the melee much easier. I wish I had some time to play around with making a new melee profile.
New OniSplit version: OniSplit v0.9.37


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


<Technique>
:* support for transparency in the environment importer
<Name>Back Kick</Name>
<Flags />
<Weight>40</Weight>
<Offset_0660>10</Offset_0660>
<RepeatDelay>0</RepeatDelay>
<Moves>
<Position Type="CloseBack" MinRunInDist="0" MaxRunInDist="10" ToleranceRange="4.5" />
<Attack Type="PB" />
</Moves>
</Technique>


Even though it says Back Kick, the attack is Punch Back.
[[User:EdT|EdT]]


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


[[User:Neo|Neo]]
What's new:


Hey. I got a bit of the Windows GUI done. It wasn't too hard...and tell me if the icons arent there (either for the explorer icon, or the one in the top right corner)
:* conversion of recorded films (.dat binary files) to xml files that can be used to create FILM .oni files


http://gumby.oni2.net/GUI/LevelRecombine.exe
    OniSplit film2xml out_dir film.dat


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


Yes, the icons are OK. But is it supposed to do anything? That recombine button appears to have no effect.
I get this error message using the command create:tram


[[User:Neo|Neo]]
  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)


I was looking at the attack moves on this page: http://wiki.oni2.net/OBD:BINA/OBJC/MELE/MoveList
The dae files are here: <nowiki>http://www.filefront.com/14507129/dae.rar</nowiki> (dead link)
And I gave one a try, Attack Move #28 KF KF, but got an error in OniSplit.


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


[[User:EdT|EdT]] 03:56, 30 June 2008 (CEST)
Thanks [[User:EdT|EdT]]


It's KF_KF, I cannot have spaces in those names.
Yep, caused by Z-up. I'll see what I can do.


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


Thanks, now do you think the names of the moves on the MoveList page should match the ones in OniSplit?
Hi Neo,
For example on the MoveList page it has '''Throw-P Behind Disarm''' but OniSplit has it as '''P_BehindDisarm'''.
There are many differences between the MoveList and OniSplit syntax.


I'm sure others will have the same issue as they start modifying the melee profile.
When you have time, can you take a look at this:


[[User:EdT|EdT]] 16:16, 30 June 2008 (CEST)
[[Image:TRBSproblem.jpg]]


Well, spaces and - are not allowed in there. As for the Throw- prefix I just removed because it's kind of dumb to write <Throw Type="Throw_P_BehindDisarn".../>.
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.


The best I can do is to make sure that space is consistenly converted to _ so instead of RunLeft you get Run_Left which is closer to that table.
Thanks [[User:EdT|EdT]]


[[User:Neo|Neo]]
Oh boy, the new converter uses matrix transforms instead of individual scale/rotate/translate transforms. I'll see what I can do...
 
I think we should change the syntax on the wiki to match OniSplit. Like for example change the wiki entry Throw-P Behind Disarm to P_BehindDisarm.  The reason for this is when we want to modify the melee profile, we will look at the wiki and use the syntax there and put it in OniSplit, then we get errors.  But if the wiki has the syntax the OniSplit will use, that will eliminate the problem.
 
Is there a way to get the moves syntax from OniSplit?  Then I can start updating the wiki.
 
[[User:EdT|EdT]] 22:48, 30 June 2008 (CEST)
 
[http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.18.zip OniSplit 0.9.18]
 
I added a "-help enums" option which dumps a list with all enums and flags used in XML files. Since otherwise it seems to work fine I dropped the "beta" label.
 
Feel free to update the wiki if you want but I'd say to leave it like it is. The wiki is about Oni internals, not about OniSplit.
 
[[User:Neo|Neo]]
 
I had an interesting idea today. If the only difference between a .dat file and a .oni file is that in a .oni file the .raw entries and .sep entries are stored at the end of the file, it might be possible to write a small engine hack which allows Oni to load .oni files directly as level plugins. The problem is, I'm not sure whether it would be useful or possible yet.
 
[[User:RossyMiles|rossy]] 12:56, 2 July 2008 (CEST)
 
Well, in theory it is possible but:
- we may need to add the raw/sep parts at the end of existing .dat files too because supporting both styles of loading raw/sep is more difficult to implement
- what about Mac? I may as well rewrite all the .dat loader and replace the original one by means of vtuneapi.dll/daodan but I don't know how new code can be loaded on Macs.
 
[[User:Neo|Neo]]
 
So what will you be working on next?
 
[[User:EdT|EdT]] 06:23, 3 July 2008 (CEST)
 
Don't know, it depends on how much free time I have and my mood :).


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


Neo, I remember you wrote about having a folder inside the levelX_Final folder that will not be included when recompiling, I must be blind, I can't seem to find it.  What was the name for it?
Any chance that you can find out how to add more level plugins for the Mac version.  Since Oni originally was going to have more levels, the Mac engine should be able to handle more levels without crashing.
Thanks
[[User:EdT|EdT]] 07:48, 10 July 2008 (CEST)


That directory is called noimport or _noimport.
----


Oni may very well had more than 16 levels. For Bungie, who had the source code, it was a matter of changing one line of code to adjust the max number of levels. The story is quite different if you want to change the compiled thing.
The Iron Demon walks! Sorta...


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


Hi there Neo,
Files here: http://edt.oni2.net/ID/ID_Files.zip
again I am here to seek your advice, this time it is about AI2, ONCC and MELE.
 
First of all, I have tested it and it seems that AI2 powered characters can jump (they have attacks from air) but they can do only '''basic tap jump'''([[ONCC]], offset 0x010), like if you just tap spacebar. Question is: is there possibility to make them use '''jetpack timer'''(to make them 'hold spacebar') in order to jump higher/further ?
 
Second, if AI2 character is far from you, it runs to you and uses pathfinding mode. With help of pathfinding grid it moves in space, avoids obstacles etc. Question is: Do AI2 characters ignore grid when they have MELE mode on? Do they ignore it completely/partially/they don't ignore it? I ask because when in MELE mode active, AI2 characters can pursue you even '''outside''' area with pathfinding grid, but then they won't move if you run away from them, but start attacking you(and moving) if you come close to them again. Also, in MELE mode AI2 characters can run across red pathfinding tiles (impassable) but if you get away they get stuck as if they were outside the grid (won't move until you get close). BUT, there are pathfinding tiles which look like they could be used only for jumping (border 1/2/3/4). And jumping is avilable (as far as I know) only when in MELE mode ^_~. Also, I have tested this: player is in BNV1, standing on top of some box (so he is surrounded by red tiles). AI2 is in BNV2, which is next to BNV1 but there is NO direct transition quad between those two BNVs, only there are 'border' tiles in BNV1 near the line between BNV1 and BNV2. Now tell AI2 to attack player. If player is too far from AI2 character, AI2 will use pathfinding and it will take some long way in order to get to the player. But if player is close enough AND AI2 has in MELE some jumping attack, this AI2 will run towards border and JUMP directly to the player. So it looks like border tiles indicate space where jump attacks are prefered in order to reach enemy. Also, in devmode if you bring MELE debugging window, you can see(if AI2 is in 'border' tiles) that next to other info about technique (like DELAY, UNBLOCKED etc.) there are also informations WORRY-FWD and DANGER-FWD which looks like they correspond to blue (border) and then orange (danger) grids.
 
So question(s) for this part once again: is pathfinding grid ignored by AI2 when in MELE? If not, is there relation between some pathfinding tiles (border, danger) and MELE messages WORRY-FWD, DANGER-FWD ??? Next, how these tiles affect (if they affect) MELE attacks selection? Do they make AI2 prefer jumping attacks?
 
All these questions have their sense. I am tired of being able to escape unarmed enemy just by simple jump onto nearest obstacle. I have tried to make AI2s jump, but they can do only tap jump which is not too high and they cannot jump too far + if you escape from them, they get stuck. So if You can answer me, I will see what I can do. I have done some exeriments already (see [http://www.youtube.com/watch?v=rwF0FynUhgQ THIS] video) but it is not enough IMO. Thanks for any info.
 
--[[User:Loser|Loser]] 21:03, 14 July 2008 (CEST)
 
The short answer: I don't know.
 
The long answer:
I haven't looked too much into Oni's AI code partly because it is quite large and complex (in fact it's probably the largest piece of code in Oni). I don't think AI can do more than simple tap jump but that really depends on how the AI controls the character:
 
:*simply tell the character to execute an animation: that makes doing more than tap jumps impossible because there isn't a special animation for "jetpack" jump.
:*simulate keypresses and mouse input: that means that it might possible but the AI needs to simulate holding the jump key which I have no idea if it can.
 
The "simulate keypresses" method is more likely to be used in Oni. In fact I know for sure it does simulate some keypresses but I don't know if that's the only way.
 
 
Pathfinding & stuff: I know there is something called "local movement" which may be what happens when the character is close by. This code seems to do character - environment collision detection so it may be true the pathfinding grid is ignored sometimes bacause there's not much point in AI doing collision detection if it always used the grid.
 
Nice video anyway :)
 
[[User:Neo|Neo]]
 
Neo, can you program OniSplit so that it can import ONWC?  Let's say I wanted to change the 3D model of a current weapon, how could I import that 3D model?
Also, didn't you at one time mention about importing of M3GM with its texture map in an easier fashion?
 
Thanks,
 
[[User:EdT|EdT]] 06:38, 24 July 2008 (CEST)
 
 
M3GM/ONWC: you can do that already. Export the ONWC to xml, remove all the M3GM related stuff (M3GM, PNTA, VCRA, TXCA) and replace the M3GM id in ONWC with a name of your choice:
 
        <Geometry>M3GMgun_x</Geometry>
 
instead of
 
        <Geometry>#2</Geometry>
 
Now you can create M3GM files to be used with ONWC as usual.
 
 
M3GM/TXMP: yes, I have some plans but right now nothing is implemented.
 
[[User:Neo|Neo]]
 
Thank you!
 
If you have some time...
In the Mac Oni engine, there are a few strings I've always wondered about: at offset 0x1D9D55InitializeDeveloperKeys,  0x1D9f2C UnbindDeveloperKeys, 0x1DE24C DeveloperAccess, 0x173BBC, bad parameters on chr_location. Do the first 3 refer to Developer Mode or something else? The last one about chr_location, could that script command could somehow be enabled?


[[User:EdT|EdT]]
[[User:EdT|EdT]]


You probably mean: _LIrInitializeDeveloperKeys, _LIrUnbindDeveloperKeys and _ONgDeveloperAccess. The _LIr* names are functions that are supposed to be called from the "cheater" code. _ONgDevloperAccess is a variable that controls the calling of those 2 functions, it's basically the equivalent of "the day is mine" cheat.
: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)
 
bad parameters on chr_location is printed from the function that set the location of a character (_iSetAnyCharacterLocation or something like that). In theory it can be made to work by registering it with the scripting engine but it's rather complicated.
 
[[User:Neo|Neo]]
 
Thank you. Oh well, I guess the Mac engine will remain limited compared to the PC engine.
 
[[User:EdT|EdT]] 04:40, 25 July 2008 (CEST)
 
There is a user on OCF that has a problem with OniSplit http://oni.bungie.org/community/forum/viewtopic.php?pid=8417
Can you take a look and post the answer here, then I'll make a reply on OCF.
 
Thanks,
 
[[User:EdT|EdT]] 15:53, 25 July 2008 (CEST)
 
Umm... absolutely no idea. Since it works for me and others I assume it's something about his game files. Maybe some file is corrupted or he has some strange version I have never seen before.
 
[[User:Neo|Neo]]
 
Sorry to bother you.
I exported ONWCw1_tap as .xml, and I was comparing the output with http://wiki.oni2.net/ONWC. 
One thing I can't find are the weapon options 0x0D4 to 0x0D6 in the xml. I want to enable secondary fire but can't figure that out. Not for this weapon, but a new one.
I got the model for the assault rifle from Halo, I used as a base the chaingun weapon, but now want to add grenades as secondary fire.
 
[[User:EdT|EdT]] 07:10, 27 July 2008 (CEST)
 
I found it: <Flags>180272</Flags>


[[User:EdT|EdT]] 05:04, 28 July 2008 (CEST)


OniSplit v0.9.21
----


XML export/import for particles added.
Hi Neo,


[[User:Neo|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. <nowiki>http://edt.oni2.net/temp/NeoTRAM.zip</nowiki>


I've a bug for you. I converted BINA3RAPsuperglow_e01 into xml and back into oni again. The link "h2h_murglow_e02" is missing now.
I was trying to make new animations, whenever you have time, please take a look. Thanks [[User:EdT|EdT]]
[http://paradox.oni2.net/particle_bug_report.rar Here] are the files. (The blue glow can be seen only for one or two seconds.)


[[User:Paradox-01|Paradox-01]] 17:04, 10 August 2008 (CEST)


Fixed
----
 
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:
[http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.22.zip OniSplit v0.9.22]
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&)
[[User:Neo|Neo]]
   at System.Drawing.GDIPlus..cctor () [0x00000]  
 
   --- End of inner exception stack trace ---
Hm, it wasn't the murglow-thingy but you fixed it whatever it was, thanks.
   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)
[[User:Paradox-01|Paradox-01]] 17:54, 10 August 2008 (CEST)
   at Oni.Imaging.SysExporter.ExportInstance (Oni.InstanceDescriptor descriptor) [0x00000]  
 
The particle are still a bit too big. [http://paradox.oni2.net/particle_bug_report_2.rar Here] are the files and screenshots. (Only converted to xml and back again.)
 
[[User:Paradox-01|Paradox-01]] 18:34, 11 August 2008 (CEST)
 
Paradox, it might help if you provided a proper link ^_^. Have you tried reducing the size? >_> (Though that is probably the issue you are having, not being able to do that :P)
 
[[User:Gumby|Gumby]] 18:47, 11 August 2008 (CEST)
 
I forgot the file suffix. Thanks for checking. ^_^
 
[[User:Paradox-01|Paradox-01]] 19:08, 11 August 2008 (CEST)
 
Just noticed there is a new version 0.9.23, what has changed?
 
[[User:EdT|EdT]] 04:59, 12 August 2008 (CEST)
 
:There was an erroneous field type in [[OBAN]], which I discovered in XML while setting up the DeLorean for the trailer.
::[[User:Geyser|geyser]] 05:57, 12 August 2008 (CEST)
 
Particle size fixed: [http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.24.zip OniSplit v0.9.24]
 
[[User:Neo|Neo]]
 
Just curious, do you have a list of binary data files that can be exported and imported as .xml?
 
[[User:EdT|EdT]] 07:15, 25 August 2008 (CEST)
 
That's quite simple: all [[OBD:BINA/OBJC|object collections]] and [[OBD:BINA/PAR3|particles]].
 
[[User:Neo|Neo]]
 
Sorry to bother you, but, I'd appreciate it if/when you have time to look into this. I got an error when trying to export BINACJBOFlag.oni from level3. I have been able to export the same file from other levels. I wanted to add a few more flags, since the Mac doesn't support chr_location.
 
Here is my level3 file: http://edt.oni2.net/OniSplit/level3BINACJBOFlag.oni.zip
 
The error message:
 
  System.ArgumentException: Input contains invalid character at 94 : &#x1B;
  at System.Xml.XmlTextWriter.WriteCheckedBuffer (System.Char[] text, Int32 idx, Int32 length) [0x00000]
   at System.Xml.XmlTextWriter.WriteCheckedString (System.String s) [0x00000]
  at System.Xml.XmlTextWriter.WriteEscapedString (System.String text, Boolean isAttribute) [0x00000]
  at System.Xml.XmlTextWriter.WriteString (System.String text) [0x00000]
   at System.Xml.XmlWriter.WriteValue (System.String value) [0x00000]
  at Oni.Xml.RawXmlExporter.Oni.Metadata.IMetaTypeVisitor.VisitString (Oni.Metadata.MetaString type) [0x00000]  
   at Oni.Metadata.MetaString.Accept (IMetaTypeVisitor visitor) [0x00000]
   at Oni.Xml.RawXmlExporter.WriteFields (Oni.Metadata.Field[] fields) [0x00000]
  at Oni.Xml.RawXmlExporter.Oni.Metadata.IMetaTypeVisitor.VisitStruct (Oni.Metadata.MetaStruct type) [0x00000]  
   at Oni.Metadata.MetaStruct.Accept (IMetaTypeVisitor visitor) [0x00000]
  at Oni.Xml.ObjcXmlExporter.WriteFlag () [0x00000]
  at Oni.Xml.ObjcXmlExporter.Export () [0x00000]
  at Oni.Xml.ObjcXmlExporter.Export (Oni.FileReader reader, System.Xml.XmlWriter writer) [0x00000]
  at Oni.Xml.XmlExporter.ExportBINAInstance (Oni.InstanceDescriptor descriptor) [0x00000]
  at Oni.Xml.XmlExporter.ExportDescriptors (System.Collections.Generic.List`1 referencedDescriptors, System.Xml.XmlWriter writer) [0x00000]
   at Oni.Xml.XmlExporter.ExportInstance (Oni.InstanceDescriptor descriptor) [0x00000]  
   at Oni.Exporter.ExportInstanceList (System.Collections.Generic.List`1 descriptors) [0x00000]  
   at Oni.Exporter.ExportInstanceList (System.Collections.Generic.List`1 descriptors) [0x00000]  
   at Oni.Exporter.Export (Oni.FileManager fileManager, System.String sourceFilePath, System.String filter) [0x00000]  
   at Oni.Exporter.Export (Oni.InstanceFileManager fileManager, System.String sourceFilePath, System.String filter) [0x00000]  
   at Oni.Program.ExtractXml (System.String[] args) [0x00000]  
   at Oni.Program.ExtractTextures (System.String[] args) [0x00000]  
   at Oni.Program.Main (System.String[] args) [0x00000] (1)
   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)


Thanks again. [[User:EdT|EdT]] 04:52, 30 August 2008 (CEST)
: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]]


Well...My level 3 flag file works. Yours sounds like it is corrupted. Here is what I get when I use your file:
: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]]


Reading file C:\Users\Franz Media Center\Desktop\BINACJBOFlag.oni
::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)
Exporting 1 instance(s) to C:\xml
System.ArgumentException: '←', hexadecimal value 0x1B, is an invalid character.
  at System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize)
  at System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd)
  at System.Xml.XmlUtf8RawTextWriter.WriteString(String text)
  at System.Xml.XmlUtf8RawTextWriterIndent.WriteString(String text)
  at System.Xml.XmlRawWriter.WriteValue(String value)
  at System.Xml.XmlWellFormedWriter.WriteValue(String value)
  at Oni.Xml.RawXmlExporter.Oni.Metadata.IMetaTypeVisitor.VisitString(MetaString type)
  at Oni.Metadata.MetaString.Accept(IMetaTypeVisitor visitor)
  at Oni.Xml.RawXmlExporter.WriteFields(Field[] fields)
  at Oni.Xml.RawXmlExporter.Oni.Metadata.IMetaTypeVisitor.VisitStruct(MetaStruct type)
  at Oni.Metadata.MetaStruct.Accept(IMetaTypeVisitor visitor)
  at Oni.Xml.ObjcXmlExporter.WriteFlag()
  at Oni.Xml.ObjcXmlExporter.Export()
  at Oni.Xml.XmlExporter.ExportBINAInstance(InstanceDescriptor descriptor)
  at Oni.Xml.XmlExporter.ExportDescriptors(List`1 referencedDescriptors, XmlWriter writer)
  at Oni.Xml.XmlExporter.ExportInstance(InstanceDescriptor descriptor)
  at Oni.Exporter.ExportInstanceList(List`1 descriptors)
  at Oni.Exporter.Export(FileManager fileManager, String sourceFilePath, String filter)
  at Oni.Program.ExtractXml(String[] args)
  at Oni.Program.Main(String[] args)


Between the two error messages, I think you can see what went wrong. :)
----
[[User:Gumby|Gumby]] 05:48, 30 August 2008 (CEST)
Observations of importing TRAMs to XSI.


Gumby, can you post your file for comparison? All I can see is that there is an invalid character somewhere in my file. [[User:EdT|EdT]] 06:00, 30 August 2008 (CEST)
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


Yes, there is an invalid character (from XML point of view) in a flag description:
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


  only one of these end office thingys needs to exist. Snip one and change the stairwell too?  �2 hrs
One workaround is to insert keyframes to cause the animation to rotate in the correct direction.


That � (0x1B) is the problem because XML does not allow for such characters.  
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
I'll make a fix but I have to figure out if there are any other cases where this characters is actually needed and cannot be discarded. Until then you can use a hex editor to replace it with a space.


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


Thanks for the help.  How did you know where to find the character? In my hexeditor, it simply looked like a period. There are some funny notes in the flag description:
This is not the access point you seek, move on (A quote from Star Wars... These are not the droids you seek)
[[User:EdT|EdT]]
[[User:EdT|EdT]]


Use your hexeditor to search for "1B"
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:Gumby|Gumby]] 07:42, 30 August 2008 (CEST)
 
Hey, what about adding ieroglyphic support? All ieroglyphic symbols (or hebrew, or hindi) are replaced with '3F' (question mark). --[[User:Demos kratos|demos_kratos]] 20:53, 30 August 2008 (CEST)
 
In theory it is possible if we create new font files ([[TSFF]], [[TSFT]], [[TSFL]], [[TSGA]]) for each language. In practice I don't know if this really works. You'd need some sort of tool to generate all those font files and currenly I don't think such a tool exists. I'd like to add this to OniSplit in the future but currently it is not on my priority list.
 
[[User:Neo|Neo]]
 
OK. Thanx. I'll be waitin'. --[[User:Demos kratos|demos_kratos]] 21:37, 30 August 2008 (CEST)
 
Well, I've started a simple GUI for OniSplit, check it - [http://demoskratos.ifolder.ru/7931537 OniSplit Gui]
 
[[User:Demos kratos|demos_kratos]] 19:16, 31 August 2008 (CEST)
 
:I have not run the above application, but I thought someone might appreciate having it more easily-accessible, without the Russian and the obligatory visiting of a sponsor page: http://drop.io/demoskratos
:You can add other files there, too, demos kratos. Hopefully it works fine for you, because it is a much easier solution for us poor English speakers :-) --[[User:Iritscen|Iritscen]] 21:52, 31 August 2008 (CEST)
 
 
==OniSplit 0.9.25==
[http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.25.zip OniSplit v0.9.25]
 
Added support for exporting/importing animation to/from XML. The usual commands:
 
  onisplit -extract:xml xml_dir TRAMKONCOMcombo_k_k.oni
 
This will write a TRAMKONCOMcombo_k_k.xml file in the directory xml_dir which you can more or less edit. Obviously this won't load in a 3D application like Softimage or Blender but you can change shortcuts, attacks, damage, particles etc.
 
To create an .oni file from the .xml file:
 
  onisplit -create oni_dir TRAMKONCOMcombo_k_k.xml
 
Exporting/importing the actual animation to/from Collada files will come in a future version.
 
PS: the FLAG exporting/importing bug reported above is supposed to be fixed too
 
[[User:Neo|Neo]]
 
==OniSplit 0.9.26==
[http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.26.zip OniSplit v0.9.26]
 
Added XML support for TXMP/TXAN. Texture extraction/creation works like before but now you can also use the standard xml commands -extract:xml and -create.
 
Extracting a texture with -extract:xml produces an xml file and one or more tga files. The xml file will contains texture options like format and flags and a list of tga file names. More than one tga file is produced for animated textures and the filenames look like TXMPsmoke_001.tga, TXMPsmoke_002.tga etc.
 
Using the -create option with such an xml file will produce a normal TXMP.oni file but without the need to specify additional parameters on the command line like with -create:txmp. This comes in handy if you want to edit a bunch of textures:
 
- put all the xml and tga files in a single directory
- edit tga image files as you need
- in the directory you can run the command: onisplit -create oni *.xml to create all TXMP.oni files in the subdirectory oni.
 
Tip:
The exported xml file does not contain the witdh and height of the texture, this is obtained from the tga file. If you resize the tga file the texture will be resized too.
 
[[User:Neo|Neo]]
 
This is awesome!  Thanks for the updates!
 
Now do think it will be possible to export/import ONIE as .xml? We're never satisfied are we? :-)
 
[[User:EdT|EdT]] 22:58, 9 September 2008 (CEST)
 
I'll do that too sooner or later. The current problem with ONIE is that I'm not 100% sure how it works, I need to do a bit of hacking :)
 
[[User:Neo|Neo]]
 
 
Heh, EdT wants explosive barrels, right? Well, me too.
 
Nah, here comes my request. Is there possibility to increase total amount of spawned PAR3 ? Currently it is 1000. I think like 100 000 would be nice. Or is it short, limited to about 65 000 ??? That would be nice as well.
:REASON: 1000 particles maximum. Each decal is count as particle. We want to make AE shinier. That involves more particles spawned at one time, especially during gang fights. Even in original Oni, when playing arena scripts, sometimes you can see that victim is hit but no flash appears as all decals are used at that moment. So we should increase number of decals for those flashes. But then, when limit (1000) is hit, engine starts removing the oldest particles again.
 
:100 000 is maybe overrated, but I think it this way: 200 decals for each fight PAR3, 5 000 for each various bulletholes/burns/shrapnels/casing/shielding/etc.
 
Thank you in advance.
:P.S.: XML TRAMs? You rock! ^_^
:--[[User:Loser|Loser]] 07:23, 10 September 2008 (CEST)
 
For decals you can try changing this value in the exe:
 
  0x4EAD6: ff 8f 01 00 - int32, decal buffer size in bytes
 
For particles you can try changing these:
 
  0x55D63: 50 C3 00 00 - int32, particle memory block size
  0x55D9F: 50 C3 00 00
  0x55DAD: 50 C3 00 00
  0x582CF: 50 C3 00 00
 
 
The decals hack might work (try double that value) but I'm not sure about particles. It would be simpler to increase the number of 50000 bytes memory blocks (the default is 100) but that cannot be done so we need to increase the block size which can lead to unexpected problems.
 
And there's no way you can get 100000 particles unless you have a 100GHz processor :)
 
[[User:Neo|Neo]]
 
==OniSplit 0.9.27==
[http://cid-639aa31296681bfe.skydrive.live.com/self.aspx/Oni/OniSplit/OniSplit|_v0.9.27.zip OniSplit v0.9.27]
 
Bugfixes and xml export/import for [[OBD:BINA/TMBD|TMBD]].
 
[[User:Neo|Neo]]
 
Hey, testing out TRAM import right now...using it for an explosive barrel.
 
I have a 1 frame animation where the pelvis consists of this - <EKey>1 0 0 0</EKey> I know the first part is the number of frames, but what are the others? I need to rotate the barrel 90 degrees upward.
 
See this: http://i35.photobucket.com/albums/d159/gumbyWA/barrel.jpg
 
[[User:Gumby|Gumby]] 19:25, 11 September 2008 (CEST)
 
You can take a look here: [[OBD:TRAM/raw0x34]]. Appart from the fact that I swapped the number of frames with the rotations it's the same thing. To summarize:
 
The 3 values after number of frames are:
:*rotations around X, Y and Z axes
:*stored as signed integers with values between -32768 and 32767
 
To convert those values to degrees you need to multiply by (180 / 32767.5).
 
To convert from degrees you need to multiply by (32767.5 / 180).
 
You probably need to rotate the barrel by 90 degrees around X or Z axis. That probably means <EKey>1 16384 0 0</EKey> or <EKey>1 0 0 16384</EKey>


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


Hah! It worked. Thank you very much. I was wondering why they were so large, for being rotations. ^_^
: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]]


[[User:Gumby|Gumby]] 22:06, 11 September 2008 (CEST)
::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]]


A mystery: If you set a character to be invulnerable through the TRAM, the refuses to shoot you with the Black Adder. Do you know why?
:::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:Gumby|Gumby]] 01:16, 12 September 2008 (CEST)
::::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]]


Nope. Are you sure it is because of the invulnerability?
----


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


Thanks you for TRAM done. You are '''No.1'''
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)


Anyways, here is report on increasing particle memory blocks' size: Failure. Max value that was Oni able to withstand was FF|FF|00|00. Then there was maybe + 10 or so particles, but in exchange it was extremely unstable. More than 65535 resulted in crash when some particle was spawned. Dang it. This is 100% wrong way.
----
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.


Decal buffer incrementation: Failure as well. Tried 2x original value, then 1.5x. Oni hangs in both cases when there is too much decals. And last decal was weridly deformed.
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)


No use. We need new engine or source... but thank you for informations.
: 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)


P.S.: How can I find if I caused memory corruption ? I am modyfing throws now, and Geyser told me that in previous version of TRAM modifications, some TRAMs caused mem corruption. I don't want to repeat same mistakes. Thank you in advance.
::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:Loser|Loser]] 16:12, 12 September 2008 (CEST)
----
Hi Neo,


OK, I did some more checks:
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:
:*Particles: there's basically no way to have a particle block larger than 65535. However, to my knowledge the maximum size of a particle is 256 bytes so with this increase you should be able to get 600 more particles (60 / per block * 100 blocks).
:*Decals: in theory it is possible to increase the decal buffer size but the hack would be rather extensive. Basically you would need something like Daodan dll to replace some function in the exe.


'''Conversion of ONWC > OBJ and DAE:'''


TRAM and memory corruption: tipically you cannot find it until the game crashes. If you manage to make it crash consistently with new animations then give me the animations and I'll see what I can do.
  -extract:obj outputdir input_ONWC.oni


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


On the invulnerable TRAM: Yes, I am sure. The character has the invulnerable animation as a default. I commmand him to do another animation, he gets shot at. When the animation stops, and his invunerable idle animation starts, the shooting stops again.
both execute with sucess but don't generate output.


On something else:
'''Conversion of OBJ > M3GM:'''


I thought dangerous particle awareness was fixed, but avoiding them was broken? In this image: http://img134.imageshack.us/img134/5205/linesun5.jpg It seems that awareness is still broken, look at the blue (or used to be blue, until my image editing program messed up the colors) lines. They still point toward the origin. Aren't they supposed to point toward the danger? However, he does avoid it properly as long as you aren't standing between him and the origin.
  -create:m3gm outputdir input.obj


[[User:Gumby|Gumby]] 22:14, 12 September 2008 (CEST)
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)


Invulnerable TRAM: so, if my understanding is correct an AI character won't shoot at another character that runs an invulnerable animation and that happens only with Black Adder? Kind of strange if it happens only with one particular weapon.
Could these be fixed? Thanks. [[User:Script 10k|Script 10k]] ([[User talk:Script 10k|talk]]) 22:07, 3 January 2014 (CET)
 
Projectile awareness: there's another bug in that function, here's the fix
 
:*file offset 0x9C110, new value 0x6C
 
[[User:Neo|Neo]]


Thanks. I've only tested the TRAM against the Black adder, SBG, and Plasma Rifle. Let me go try the VDG and the Campbell.
----
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:Gumby|Gumby]] 23:04, 12 September 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)