User talk:Neo

From OniGalore
Revision as of 22:36, 10 December 2008 by Neo (talk | contribs)
Jump to navigation Jump to search

New OniSplit (beta) version: OniSplit v0.9.34

What's new:

  • SNDD importer
-WAV files (.wav, mono/stereo, 22.05KHz/44.1KHz, uncompressed(PCM)/compressed(MS-ADPCM)) produce SNDD files that are compatible with Oni PC retail.
-AIFC files (.aif/.aifc/.afc, mono/stereo 22.05KHz, compressed(ima4)) produce SNDD files that are compatible with Oni Mac.
Example
 OniSplit -create out_dir test.aif
 OniSplit -create out_dir test.wav


  • LOD support for creating TRBS files. This can be done by creating an xml file containing the following:
 <?xml version="1.0" encoding="utf-8"?>
 <Oni Version="0.9.29.0">
     <Instance id="0" type="TRBS">
         <Elements>
             <Link>barabus_body_1.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_3.dae</Link>
             <Link>barabus_body_4.dae</Link>
             <Link>barabus_body_5.dae</Link>
         </Elements>
     </Instance>
 </Oni>
and running the command (assuming the created xml file's name is barabus_body.xml):
 OniSplit -create out_dir barabus_body.xml
It's not strictly necessary to create 5 different geometries for each LOD. The following works just as well:
 <?xml version="1.0" encoding="utf-8"?>
 <Oni Version="0.9.29.0">
     <Instance id="0" type="TRBS">
         <Elements>
             <Link>barabus_body_1.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_2.dae</Link>
             <Link>barabus_body_3.dae</Link>
         </Elements>
     </Instance>
 </Oni>


  • An xml file can contain "links" to other xml/obj/dae files. For example you can have the following line in an ONWC xml file:
 <Geometry>pistol.obj</Geometry>
Assuming the file pistol.obj exists in the same directory an M3GM .oni file will be automatically created from it.
Relative paths work just as well:
 <Geometry>geometry/pistol.obj</Geometry>


  • The -create:subt, -create:txmp and -create:m3gm are sort of obsolete. They still work but now you can simply use '-create' (or just 'create'):
 OniSplit -create out_dir crate.dae
 OniSplit create out_dir -format:bgr555 -genmipmaps pic.tga
 OniSplit create out_dir subtitles.txt


  • Work in progress: the AKEV importer now reads Collada materials so the resulting AKEV is textured.
Sample levels:
TestLevel1 -- This level should look like this in-game: Image 1 Image 2 Image 3
TestLevel2 -- This level should look like this in-game: Image 1
A zip file contains the minimum needed to get a new level running in Oni. To "compile" a level extract it to a folder and run the following commands:
 OniSplit -create out -genmipmaps -format:dxt1 *.xml
 OniSplit -import:nosep . Oni\GameDataFolder\level1_Final.dat
(Of course, you need to change the output .dat file path to match your Oni installation path)
Note1: The hexagon level needs to be scaled up to work properly. Use the envscale option for this:
 OniSplit -create out -genmipmaps -format:dxt1 -envscale:40 *.xml
Note2: I've updated the level files to contain 20 empty corpses to prevent crashes.

Neo


I tried to extract the .dae from AKEVhexagon2.oni and got the following error message from OniSplit:

mono onisplit.exe -extract:dae hex3d level7_Final/AKEVhexagon2.oni

 /level7_Final/AKEVhexagon2.oni
 /level7_Final/AGDBhexagon2.oni
 System.NullReferenceException: Object reference not set to an instance of an object
 at Oni.Imaging.Texture.Read (Oni.InstanceDescriptor txmp) [0x00000] 
 at Oni.Geometry.GeometryDaeExporter.WriteImageLibrary (Oni.InstanceDescriptor[] textures) [0x00000] 
 at Oni.Geometry.GeometryDaeExporter.WriteEnvironment (Oni.InstanceDescriptor descriptor, System.String filePath) [0x00000] 
 at Oni.Geometry.GeometryDaeExporter.ExportInstance (Oni.InstanceDescriptor descriptor) [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.Program.ExtractGeometry (System.String[] args) [0x00000] 
 at Oni.Program.Main (System.String[] args) [0x00000]

EdT 03:42, 12 November 2008 (CET)


Hi Neo, I apologize for bothering, but I have two questions.

1) I tried to make some trick with TRAMs, details omitted.

Subject - When character dies during some TRAM (throw), he cannot interpolate into another TRAM if there was set non-zero end interpolation.

Experiment:

  • Take KONCOMthrow_bk_k_tgt. Change its duration/number of frames to 0x69 and add end interpolation 0x10.
  • Now hurt (not kill) somebody with this backbreaker. Victim will interpolate into his fallen position.
  • next, kill him. Victim will get stuck in ending frame of KONCOMthrow_bk_k_tgt as his death position, he won't interpolate into his fallen TRAM.
  • Now remove end interpolation 0x10 (set 0x00).
  • kill victim now. When KONCOMthrow_bk_k_tgt animation ends, victim "jerks" into his fallen TRAM as his final resting position.

Is there any easy way to solve this, please? I ask because it looks like when character is dead, engine craps away its ability to interpolate. 5 seconds delay of this whould be enough. Or removing this restriction completely.

2)

Subject - Blue shield
Blue shield absorbs both damage and knockback. Is there a way how to make it absorb only damage, so character would be affected by knockback even tough he has blue shield?
I ask because then I could simulate throwing over obstacles with throws via PAR3. Now I cannot due to blue shield's knockback absorbtion.
Or is there any "cleaner" solution of throwing over obstacles (such as dynamic root height)?

Thank you for patience, --Loser 07:45, 30 November 2008 (CET)

I'll say what I can on the matter, if you don't mind. :)
@Blue Shield: Regardless of the ability to remove damage by knockback, you run into several problems:
  • Explosions would still knock you back
  • Explosions _might_ still do damage to you (I'd have to look at the asm, but from what I recall about PAR3, knockback is a type of damage. I never quite got how it worked specifically though, does it do actual damage?)
A better solution would be to somehow apply velocity to TRAMs. With velocity and the right flag (can't recall which...), the sphere tree would unstick.
Another thing: When a character goes over an edge, unsticking depends on either a time spent in the air or size of sphere (distance from ground), I can't tell which. I would hazard a guess that it has to do with time, but I'm not sure. :) If we can decrease whatever value it is, we could get what you are looking for. There is a chance it is a value in the ONCC or a constant in the engine. I'm not sure which. Gumby 10:04, 30 November 2008 (CET)
@TRAMs when characters die, they lose all ability to be animated at all. I know there exists a fix for characters losing MELE information on death (I lost it, gotta ask geyser next time he is on...), but there might also be a way to disable the disabling of animation on death. I know if you set a characters health to 0, attempt to animate it (fail), then set its health to something positive, the first thing he\she does is that animation you asked it to. So all hope is not lost. :) Then again, it might be a good thing you can't be animated after death. That could lead to some crazy bugs. :D Gumby 09:38, 30 November 2008 (CET)

Using the latest version of OniSplit 0.9.33 I get these error messages using the command "-create out -genmipmaps -format:dxt1 hexagon/*.xml"

Importing /hexagon/hexagon.dae
Cannot find texture file 'd:\Oni\hexagon\.\images\texture9.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture4.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture3.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture11.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture12.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture7.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture0.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture8.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture5.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture10.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture6.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture2.jpg'
Cannot find texture file 'd:\Oni\hexagon\.\images\texture1.jpg'

Did not have this problem in previous versions.

EDIT: Forgot to ask, how to fix the rotation of the hexagon.dae? Iritscen told me once, but I didn't make note of it. EdT 17:28, 7 December 2008 (CET)

Open hexagon.dae in a text editor, search for 'rotation_z', and you should be taken to nearly the end of the file. Set the fourth rotation_z number to 180 (probably best to leave the trailing zeroes after the decimal), and set rotation_x's fourth number to 90. --iritscen 17:59, 7 December 2008 (CET)

Image paths: OniSplit is OK in this case, the dae file is wrong, it contains full paths. You can open it in a text editor and fix the paths (you need to simply remove the D:\Oni\hexagon\ portion of the path). I'll update the zip file too.

Rotation: the dae file contained in the above zip is already rotated.

To explain a bit what's up with the rotation: it's likely that hexgon was created in a tool where the Z axis points up. The Collada file should contain the <up_axis>Z_UP</up_axis> setting but this particular file doesn't have it. Even if you have Z_UP in your file OniSplit doesn't always work correctly with Z_UP for now.

Neo

Neo, if you have time...

I tried to import some music into Oni and got different results. Here are the files: http://edt.oni2.net/OniSplit/SNDDBurn.zip

Burn1a.aif imports fine
Burn2a.aif produces this error:
 System.ArgumentOutOfRangeException: Argument is out of range.
 Parameter name: count is less than 0
 at System.IO.BinaryReader.ReadBytes (Int32 count) [0x00000] 
 at Oni.Sound.AifFile.ReadDataChunk (Oni.FileReader reader, Int32 chunkSize) [0x00000] 
 at Oni.Sound.AifFile.FromFile (System.String filePath) [0x00000] 
 at Oni.Sound.AifImporter.Import (System.String filePath, System.String outputDirPath) [0x00000] 
 at Oni.Program.CreateGeneric (System.String[] args) [0x00000] 
 at Oni.Program.Main (System.String[] args) [0x00000] 
Burntest.aif produces this error
 Unsupported AIF compression (0x0)
 System.NullReferenceException: Object reference not set to an instance of an object
 at Oni.Importer.get_Dependencies () [0x00000] 
 at Oni.Program.CreateGeneric (System.String[] args) [0x00000] 
 at Oni.Program.Main (System.String[] args) [0x00000] 

All the files were saved as compressed AIF (IMA4:1), 22.05KHz

Also, is it possible to convert OSBD to .xml files?

Thank you EdT 17:27, 10 December 2008 (CET)

I've posted a new version (0.9.34) that fixes the aif import bug. Please confirm it's working. OSBD files cannot be converted to xml yet.

Neo

OK, the new music files imports and exports without error. Now how to get it in the game? I duplicated OSBDmus_amasian.grp renamed it OSBDmus_burn.grp used a hex editor and changed the links to the new music file names (I kept the file name the same size) Placed all the files in level0_Final and rebuilt the level and used the command: sound_music_start mus_burn but no music... here are the files http://edt.oni2.net/OniSplit/mus_burn.zip What am I doing wrong? EdT 20:57, 10 December 2008 (CET)

The OSBD files appear to be correct but to be on the safe side you should simply replace exiting sounds (SNDD) to see if the sound really imported correctly.

[User:Neo|Neo]]