Jump to content

XML talk:ONLV: Difference between revisions

3,576 bytes removed ,  2 November 2023
m
no edit summary
m (header level corrections)
mNo edit summary
 
Line 1: Line 1:
==Separated content about ONLV, level import and level reimport==
Talks on Discord during 1st Nov. of 2023 showed that users can confuse ONLV*.xml for a master.xml (project) file. Therefore, the sections were separated. Also, notes for reimports got their own page. They have a significant different workflow. --[[User:Paradox-01|paradox-01]] ([[User talk:Paradox-01|talk]]) 11:59, 2 November 2023 (CET)
==Searching vertex shading of animated door geometry==
==Searching vertex shading of animated door geometry==
Now with the source code it would be easier to find where the vertex shading is stored.
Now with the source code, it would be easier to find where the vertex shading is stored. This is also interesting for reimports.
 
==CRSA import==
'''Old talk:''' I simply put this section here because I hope Neo will soon integrate it. --[[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 local (<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/local_correct_pelvis.png</nowiki>, dead link) and global (<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/global.png</nowiki>, dead link) 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 [[Mod_Tool#Exchange_meshes_in_hierarchies|destroyed]] the hierarchy revealing the true local rotation values of each part.
 
:: Those rotations and positions where entered into Neo's matrix program (<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/OniMatrix_src.zip</nowiki>, dead link). I then put the matrix to into the CRSA instance of the extracted ONLV file, then reconverted to oni.
 
:: Ingame, the corpse was looking quite good (<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/CRSA_manually_imported.png</nowiki>, dead link). There were some tiny difference which possibly come from the fact that the matrix program works with integers and not float values.
 
::: Here's an example (<nowiki>https://dl.dropboxusercontent.com/u/139715/temp/snipers.dae</nowiki>, dead link) of an intact and a destroyed hierarchy.
 
::: Note to self: old code (<nowiki>https://dl.dropboxusercontent.com/u/139715/OniGalore/ModToolScript/CRSA_wip.txt</nowiki>, dead link) meant for intact hierarchies. Needs to be changed later for proper local values.
 
::: Let's take intact character for a new experiment.
 
::: When we apply null objects to each body part and compare its local values with the parts of the destroyed hierarchy, the values are the same, just multiplied by -1.
 
::: Second experiment. When the parts in the intact hierarchy becomes rotated, the values will not fit. Not until we reset the null's global values to 0; 0; 0 and multiply by -1 again.
 
::: What does this mean?
 
:::: Still I've no clue how to ''calculate'' the required values but with the null objects it got a lot easier to ''farm'' them.
 
:::: So coding a workaround became a feasible option.
 
'''Edit // 8th Feb 2014 // getting rid of the null objects:'''
 
It's possible to calculate the local rotations in a hierarchy using matrix multiplication. The final matrix must be inverted and the xyz values multiplied by -1.
 
Before calculations are started the rotation order of all objects must be changed from ZYX to XYZ.
 
What makes the code bulky is the need to go through all involved body parts and that 19 times.
 
'''Edit // 9th Feb 2014 // getting not rid of the null objects:'''
 
The code seemed to work fine until different rotations were used for all objects in the hierarchy. So for now there will be no simplification.
 


==Pathfinding with GridIgnore flagged objects==
==Pathfinding with GridIgnore flagged objects==
8,168

edits