XML talk:TRAM: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(dumping old methods)
 
(Iritscen, you know what to do. XD)
Line 1: Line 1:
==Problem with exporting a textured character with non-native TRAC animation==
This problem occurs with OniSplit v0.9.99.0 and earlier.
There are basically two commands:
OniSplit -extract:dae outputPath -anim:TRAMname.oni inputPath/ONCCorTRBSname.oni
OniSplit -extract:xml outputPath -anim-body:ONCCorTRBS.oni
First one cannot export TRAMs that aren't listed in character's TRAC.
The second cannot export characters with textures at all.
A textual comparison with WinMerge reveals that the outputs of native TRAMs are almost the same.
Except the chunks of <library_images>, <library_effects> and <library_materials> are missing in the second dae.
It follows <visual_scene> where the id has a different name which is not that interesting.
Inside, there are <instance_geometry> nodes which are pretty much empty for the first dae.
Here you can see Konoko performing Barabus' super kick. I restored only a few bones. Proof of concept.
https://dl.dropboxusercontent.com/u/139715/OniGalore/recover_textures_for_characters_with_non-native_animation.png
In other words: for a complete textured and animated character you need to post-edit the dae which is actually xml code.
If we doesn't get Neo to fix it we will have to export the character twice automatically and let the OniSplit GUI provide the final dae.
[https://dl.dropboxusercontent.com/u/139715/OniGalore/recover_textures_for_characters_with_non-native_animation.zip HERE] are the two different exports you can experiment with.
==old==
==old==
===how convert dae to xml / oni ...===
===how convert dae to xml / oni ...===

Revision as of 09:16, 18 August 2016

Problem with exporting a textured character with non-native TRAC animation

This problem occurs with OniSplit v0.9.99.0 and earlier.

There are basically two commands:

OniSplit -extract:dae outputPath -anim:TRAMname.oni inputPath/ONCCorTRBSname.oni
OniSplit -extract:xml outputPath -anim-body:ONCCorTRBS.oni

First one cannot export TRAMs that aren't listed in character's TRAC.

The second cannot export characters with textures at all.

A textual comparison with WinMerge reveals that the outputs of native TRAMs are almost the same.

Except the chunks of <library_images>, <library_effects> and <library_materials> are missing in the second dae.

It follows <visual_scene> where the id has a different name which is not that interesting.

Inside, there are <instance_geometry> nodes which are pretty much empty for the first dae.

Here you can see Konoko performing Barabus' super kick. I restored only a few bones. Proof of concept.

recover_textures_for_characters_with_non-native_animation.png

In other words: for a complete textured and animated character you need to post-edit the dae which is actually xml code.

If we doesn't get Neo to fix it we will have to export the character twice automatically and let the OniSplit GUI provide the final dae.

HERE are the two different exports you can experiment with.


old

how convert dae to xml / oni ...

... using batch files

Download this modding environment so you know that the following lines are about.

Before you can run those files you need to put your source files into the "input_folder".

"dae + xml(not 41) to oni.bat" will generate files with QKeys.

"dae to xml(41).bat" will generate files with EKeys.


... using the Windows address bar

modding_via_Windows_address_bar_tn.png

The batch file code and the code used for the address bar are identical.

Look at this image and you will understand.

If you use the windows address bar you should have onisplit alway alongside your essential modding folders to have short commands like

onisplit41 -create:tram output_folder input_folder/*.dae

We want to type as less as necessary, don't we? =)


... using onisplit GUI

Keep in mind that the GUI is only a mask for onisplit. New onisplit versions - v0.52.9.0 or newer don't have the command -create:tram.


normal animations

You can convert such animation by choosing one of the two methods. (normal = no overlay anims)

- To create QKeyed-animation you need a helper xml file to be placed alongside the dae animation file.
- EKeyed-animations don't need a helper xml file but edits afterwards the creation.

In any case the amount of needed hand work is quite the same for both methods.

QKeyed-animation refuse to become edited. There's somehow a bug like Samer pointed out on the forums. (Is this still the case? - 5th Dec 2011) But that's not so tragic. You can edit the dae or the xml helper file and then merge them into an oni file again.

Like EdT said an advantage of the xml helper method is that you can breakdown a single dae file into smaller pieces. It's a comfortable way to create multiple animations from one source. E.g. you make combo animations in one dae - let's say punch (p), kick (pk), punch (pkp) - then you make 3 xml helpers. First file goes from frame 0 to 40, second file from 41 to 86, and third file from 77 to 140. The dae file has 120 frames but not the 3 oni files that will be created.

Some lines for the hypothetical second combo animation:

   	<DaeImport>
           <Path>TRAM######combo.dae</Path>
           <Start>41</Start>
           <End>78</End>
       </DaeImport>
       <Lookup>
           <Type>PK</Type>
           <AimingType>PK</AimingType>
           <FromState>Standing</FromState>
           <ToState>Standing</ToState>
           <Varient>Combat</Varient>
           <FirstLevel>0</FirstLevel>
           <Shortcuts />
       </Lookup>
       <Flags>Attack</Flags>


Don't forget to add types, variants, particle etc. to your xml file before you convert it to the oni format.


testing the created files

Either put them into an AE package or create a plugin.

There's a batch file available that create level0 plugins. Put the created plugin files in your GameDataFolder and run the game.