XML:ONLV: Difference between revisions

2,217 bytes added ,  28 December 2013
my first successful corpse import via xml
mNo edit summary
(my first successful corpse import via xml)
Line 1,132: Line 1,132:
* OBANmotorcycle02_stop01.oni
* OBANmotorcycle02_stop01.oni
* OBANmotorcycle02_stop02.oni
* OBANmotorcycle02_stop02.oni




Line 1,157: Line 1,156:
  obj_kill 8 10 # delete animated parts
  obj_kill 8 10 # delete animated parts
  env_show 9 1 # show static motorcycle parts
  env_show 9 1 # show static motorcycle parts
====corpse array (CRSA)====
As far as I know, direct CRSA import is not yet supported. --[[User:Paradox-01|paradox-01]] ([[User talk:Paradox-01|talk]]) 17:28, 28 December 2013 (CET)
(You can try to edit the final ONLV*.oni on your own. See [[XML:ONLV#CRSA|HERE]].)
I only tried it once like an year ago, probably something was wrong with it.
Recently I tried to do similar with xml editing.
:Oni gets body parts by reading the referenced ONCC file and its links until it gets the 3D content
:So far the theory. In praxis the model will appear differently.
:While a folded (not ''animated'') corpse imports fine, a corpse with rotated bones becomes a mess.
:I tried rotations with [https://dl.dropboxusercontent.com/u/139715/OniGalore/local_correct_pelvis.png local] and [https://dl.dropboxusercontent.com/u/139715/OniGalore/global.png global] values, both ended up in a messed up state.
:With local values at least the pelvis looks correct.
:So what's the problem?
:: When we look at character animations (TRAM), for instance, the rotations of the right fist are just delta values of the right wrist, and right wrist holds only the delta values of the right arm, and so on.<br>So the final x y z rotation of the right fist is its own rotation plus all rotations down to the pelvis.
:: This method doesn't seem true for CRSA. With local rotations used, the pelvis was spawned correctly but not the other parts.
:: Due to this observations I think each body part is looked up separately which means for Oni to build the corpse with no hierarchal structure.
:: To test this I took a character, rotated the parts, and destroyed the hierarchy revealing the true local rotation values of each part.
:: Those rotations and positions where entered into [https://dl.dropboxusercontent.com/u/139715/OniGalore/OniMatrix_src.zip Neo's matrix program.] I then put the matrix to into the CRSA instance of the extracted ONLV file, then reconverted to oni.
:: Ingame, the corpse was [https://dl.dropboxusercontent.com/u/139715/OniGalore/CRSA_manually_imported.png looking quite good.] There were some tiny difference which possibly come from the fact that the matrix program works with integers and not float values.




8,452

edits