Jump to content

OBD talk:TRBS: Difference between revisions

11,225 bytes added ,  9 October 2012
m
no edit summary
(aha!)
mNo edit summary
Line 1: Line 1:
__TOC__
__TOC__
==XML section==
{{Template:XMLModdingHints}}
{| border=0 cellspacing=20 cellpadding=0 align=center
<!--|The xml code on this page is compatible with onisplit '''v????'''-->
|}
'''general information'''
* TRBS files are stored ''globally'' (in edition/GameDataFolder/level0_Final)
* these files are used by ONCC
* they contain 5 models differing in ("LOD") level of detail (triangle number)
'''extraction'''
onisplit -extract:xml ''output_folder input_folder''/TRBS''name''.oni
'''creation'''
onisplit -create ''output_folder input_folder''/TRBS''name''.xml
'''example'''
TRBSkonoko_body_high.xml (extracted with onisplit v0.9.68.0)
<?xml version="1.0" encoding="utf-8"?>
<Oni>
    <TRBS id="0">
        <Elements>
            <Link>TRBSkonoko_body_high_TRCM1.dae</Link> <nowiki><!-- 300 triangles --></nowiki>
            <Link>TRBSkonoko_body_high_TRCM2.dae</Link> <nowiki><!-- 842 triangles --></nowiki>
            <Link>TRBSkonoko_body_high_TRCM3.dae</Link> <nowiki><!-- 1250 triangles --></nowiki>
            <Link>TRBSkonoko_body_high_TRCM4.dae</Link> <nowiki><!-- 2038 triangles --></nowiki>
            <Link>TRBSkonoko_body_high_TRCM5.dae</Link> <nowiki><!-- 3294 triangles --></nowiki>
        </Elements>
    </TRBS>
</Oni>
===custom TRIA===
When extracting a TRBS with onisplit v0.9.41.0 the [[TRIA#Investigation|TRIA]] instance gets exposed. It can be modified to change the hierarchy of body parts.
Onisplit can create the TRIA instance on its own. The extracted xml code looks a bit different but ingame the model appears to have the same hierarchy.
A character with non-standard TRIA needs a complete set of new animations, those animations must be created based on that new TRIA.
{| class="wikitable" width=100%
| '''standard TRIA'''
| '''hexhound TRIA'''
| '''hexhound TRIA'''
|-
| original
| self-made
| onisplit-generated (v0.9.68.0)
|-
|
    <Instance id="8" type="TRIA">
        <Elements>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>1</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>2</Child>
                <Sibling>4</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>1</Parent>
                <Child>3</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>2</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>5</Child>
                <Sibling>7</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>4</Parent>
                <Child>6</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>5</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>8</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>7</Parent>
                <Child>9</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>8</Parent>
                <Child>10</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>9</Parent>
                <Child>0</Child>
                <Sibling>11</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>9</Parent>
                <Child>12</Child>
                <Sibling>15</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>11</Parent>
                <Child>13</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>12</Parent>
                <Child>14</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>13</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>9</Parent>
                <Child>16</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>15</Parent>
                <Child>17</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>16</Parent>
                <Child>18</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>17</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
        </Elements>
    </Instance>
|
    <Instance id="4" type="TRIA">
        <Elements>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>1</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>2</Child>
                <Sibling>3</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>1</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>4</Child>
                <Sibling>5</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>3</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>6</Child>
                <Sibling>7</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>5</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>8</Child>
                <Sibling>9</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>7</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>10</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>9</Parent>
                <Child>11</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>10</Parent>
                <Child>12</Child>
                <Sibling>14</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>11</Parent>
                <Child>13</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>12</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>10</Parent>
                <Child>15</Child>
                <Sibling>17</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>14</Parent>
                <Child>16</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>15</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>10</Parent>
                <Child>18</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>17</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
        </Elements>
    </Instance>
|
    <Instance id="4" type="TRIA">
        <Elements>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>1</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>2</Child>
                <Sibling>3</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>1</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>4</Child>
                <Sibling>5</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>3</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>6</Child>
                <Sibling>7</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>5</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>8</Child>
                <Sibling>9</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>7</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>0</Parent>
                <Child>10</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>9</Parent>
                <Child>11</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>10</Parent>
                <Child>12</Child>
                <Sibling>13</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>11</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>10</Parent>
                <Child>14</Child>
                <Sibling>16</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>13</Parent>
                <Child>15</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>14</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>10</Parent>
                <Child>17</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>16</Parent>
                <Child>18</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
            <TRIAElement>
                <Parent>17</Parent>
                <Child>0</Child>
                <Sibling>0</Sibling>
            </TRIAElement>
        </Elements>
    </Instance>
|}
==Old talk==
===New 19-bone TRIA===
Basically, a 4-legged (19-bone) character would be playable if we create enough new TRAM files. A simple test can be seen here: [http://dl.dropbox.com/u/139715/OniGalore/talk/simple_hex_model_walk_test.wmv vid] + [http://dl.dropbox.com/u/139715/OniGalore/talk/hex.h-test.zip files].
An open question is how we force the head to be the 11th part when we use the auto-TRIA-creation of onisplit v0.9.52.0. I dont't know whether head view animation are hardcoded or stored inside the TRAC/TRSC.
If you test the given files you can notice that the mouse axis are wrong. This might ceome from the mistake in the dae file. Haven't checked yet. --dox
:If by "head view animation" you mean aiming and looking around, then that information is in those special overlay TRAMs that are paired with a [[TRAS]] aiming screen (in that case, the keyframes of the TRAM do not correspond to a timeline, but rather to several looking/aiming directions: thus the pose for a generic direction is interpolated from several key poses). I may be out of touch, but I don't remember bone  number 11 (or is it 0x0A?) as being hardcoded, i.e., there is nothing special about the head AFAIK; however, weapons are hard-coded to be attached to the right (or left) wrist, i.e., they have the same parent as bone number 0x12 or 0x0E. Hope that helps (then again, no, what I ''really'' hope for is a game-ready Iron Demon ^_^ ) --[[User:Geyser|geyser]] 23:34, 22 May 2011 (UTC)


===How about more body parts?===
===How about more body parts?===
Line 19: Line 385:




====proposal for onisplit modifications====
'''Thought on Oni / Onisplit modifications'''
 
Maybe this whole 19+ thing requires engine modding too but that's what I think what should be tried before.
Maybe this whole 19+ thing requires engine modding too but that's what I think what should be tried before.


Line 30: Line 397:


http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/onisplit_stuff/no_raw_file_for_20-bones-TRAM.png
http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/onisplit_stuff/no_raw_file_for_20-bones-TRAM.png
===new 19-bone TRIA===
Basically, a 4-legged (19-bone) character would be playable if we create enough new TRAM files. A simple test can be seen here: [http://dl.dropbox.com/u/139715/OniGalore/talk/simple_hex_model_walk_test.wmv vid] + [http://dl.dropbox.com/u/139715/OniGalore/talk/hex.h-test.zip files].
An open question is how we force the head to be the 11th part when we use the auto-TRIA-creation of onisplit v0.9.52.0. I dont't know whether head view animation are hardcoded or stored inside the TRAC/TRSC.
If you test the given files you can notice that the mouse axis are wrong. This might ceome from the mistake in the dae file. Haven't checked yet. --dox
:If by "head view animation" you mean aiming and looking around, then that information is in those special overlay TRAMs that are paired with a [[TRAS]] aiming screen (in that case, the keyframes of the TRAM do not correspond to a timeline, but rather to several looking/aiming directions: thus the pose for a generic direction is interpolated from several key poses). I may be out of touch, but I don't remember bone  number 11 (or is it 0x0A?) as being hardcoded, i.e., there is nothing special about the head AFAIK; however, weapons are hard-coded to be attached to the right (or left) wrist, i.e., they have the same parent as bone number 0x12 or 0x0E. Hope that helps (then again, no, what I ''really'' hope for is a game-ready Iron Demon ^_^ ) --[[User:Geyser|geyser]] 23:34, 22 May 2011 (UTC)
8,018

edits