User talk:Neo

From OniGalore
Revision as of 03:10, 17 April 2013 by TwinkerTinker (talk | contribs) (damn error in typing!)
Jump to navigation Jump to search

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. link. --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? Here are the plugin/file to test for you guys. 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

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

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

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. 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>). Something you could work with? --Paradox-01 15:21, 29 March 2010 (UTC)