EvilEngine/CSN: Difference between revisions

Add JDTM, MorphTarget and other small fixes
No edit summary
(Add JDTM, MorphTarget and other small fixes)
 
(2 intermediate revisions by the same user not shown)
Line 10:
{{AutoAssetInfobox}}
 
==Format: Header==
Because cutscenes can be quite big in size, they are loaded in chunks into RAM and therefore are 0x800aligned bytesto aligned2048/800h byte boundary.
 
==Format==
Because cutscenes can be quite big in size, they are loaded in chunks into RAM and therefore are 0x800 bytes aligned.
 
===Header===
CSN starts with a header, which is also present in the [[CTOC]] asset (without padding bytes).
 
Line 24 ⟶ 22:
|-
| 0x00 || u32 || '''Magic''' ||
* '''CTSN''' (Xbox/PlayStation 2), (little-endian)
* '''NSTC''' (GameCube), (big-endian)
|-
| 0x04 || [[AssetID]] || '''AssetID''' || AssetID of CSN.
Line 31 ⟶ 29:
| 0x08 || u32 || '''NumData''' || Amount of '''xCutsceneData''' entries.
|-
| 0x0C || u32 || '''NumTime''' || Amount of '''xCutsceneTime''' entries. Last offset is end of file and not counted into this.
|-
| 0x10 || u32 || '''MaxModel''' || Largest model in bytes (+padding) in xCutsceneData[[#Models|Models]].
|-
| 0x14 || u32 || '''MaxBufEven''' || Largest timechunk with an even ChunkIndex in bytes (+padding), usually the first one.
|-
| 0x18 || u32 || '''MaxBufOdd''' || Largest timechunk with an odd ChunkIndex in bytes (+padding).
|-
| 0x1C || u32 || '''HeaderSize''' || Size of header.
|-
| 0x20 || u32 || '''VisCount''' || Amount of '''visibilityVisibility''' entries.
|-
| 0x24 || u32 || '''VisSize''' || Total size of all visibility entries, measured in 4-byte steps. To determine the number of entries within the 2D array (columns), divide this by '''visibilityVisCount''' entries.
|-
| 0x28 || u32 || '''BreakCount''' || Amount of '''xCutsceneBreak''' entries.
Line 76 ⟶ 74:
|}
 
====xCutsceneData[]====
If ChunkSize and FileOffset are 0, an external [[MODL]] is used within the HOP.
{| class="wikitable"
Line 83 ⟶ 81:
|-
| 0x00 || u32 || '''DataType''' ||
* 1 = [[MODL]]Renderware Model
* 6 = JDTM (JDeltaModel) '''(Not present in Scooby)'''
|-
Line 98 ⟶ 96:
! Offset !! Type !! Variable !! Description
|-
| 0x00 || u32[] || '''TimeChunkOffs''' || OffsetOffsets to TimeChunkTimeChunks
|}
 
Line 106 ⟶ 104:
! Offset !! Type !! Variable !! Description
|-
| 0x00 || u32[VisCount][VisSize/VisCount] || '''Visibility''' ||
|}
 
====xCutsceneBreak[]====
{| class="wikitable"
|-
Line 120 ⟶ 118:
 
 
===TimeChunk=Models==
Following the header section, the subsequent content comprises Renderware clump and JDTM models.
 
===HeaderJDTM===
{| class="wikitable"
|-
! Offset !! Type !! Variable !! Description
|-
| 0x00 || char[4] || Magic || "JDTM" in ASCII
|-
| 0x04 || u32 || amountTargets || Amount of JDeltaTarget entries
|-
| 0x08 || '''JDeltaTarget[amountTargets]''' || targets || Array of JDeltaTarget's
|}
 
 
{| class="wikitable"
|+ JDeltaTarget
|-
! Offset !! Type !! Variable !! Description
|-
| 0x00 || s32 || '''skipSize''' || Total size of this structure
|-
| 0x04 || s32 || '''numRuns''' || Amount of JDeltaRun entries.
|-
| 0x08 || s32 || '''numVerts''' || Amount of vertices.
|-
| 0x0C || f32 || '''scale''' ||
|-
| 0x10 || '''JDeltaRun[numRuns]''' || '''runs''' ||
|-
! colspan="4" | 00h padding bytes (16-byte boundary)
|-
| || f32[numVerts][3] or s16[numVerts][3] || Vertices || If scale is 0, this array consists of 3 float values. If scale is > 0, this array consists of 3 signed short integers (aligned to 4-byte boundary).
|}
 
{| class="wikitable"
|+ JDeltaRun
|-
! Offset !! Type !! Variable !! Description
|-
| 0x00 || s32 || '''VertIdx''' ||
|-
| 0x04 || s32 || '''VertCt''' ||
|}
 
 
==Format: TimeChunk==
Each timechunk has a 0x10 byte header:
{| class="wikitable"
Line 134 ⟶ 179:
| 0x0C || u32 || '''ChunkIndex''' || Zero-based TimeChunk index.
|}
 
 
====xCutsceneData====
EachEvery entry hasis this16-byte 0x10aligned byteand has this header:
{| class="wikitable"
|-
Line 154 ⟶ 200:
| 0x0C || u32 || '''FileOffset''' || Starting position of data, relative to end of this header.
|}
 
Entries are 16 bytes aligned.
 
=====Sound=====
Line 173 ⟶ 217:
 
=====Camera=====
{| class="wikitable"
|+ '''Night of 100 Frights'''
TODO
|-
! Offset !! Type !! Description
|-
| 0x00 || u32 || '''Unknown'''
|-
| 0x04 || f32[3] || '''Position'''
|-
| 0x10 || u32 || '''Amount''' frames
|-
| 0x14 || f32[amountFrames][2] ||
* First float: Time
* Second float: Focal length?
|-
| 0x14 + (8*amountFrames) || [[ANIM]] ||
|}
 
{| class="wikitable"
Line 192 ⟶ 251:
| 0x00 || char[4] || "JDTA" in ASCII
|-
| 0x04 || u32 || '''Amount''' of timestime entries (and rows in 2D array).
|-
| 0x08 || u32 || '''Amount''' of columns in 2D array.
Line 198 ⟶ 257:
| 0x0C || f32[] || '''Array''' of time floats.
|-
| 0x0C + (4*amount times) || f32[][] || '''2D-Array''' withfor every time floatsframe with unknown values inside.
|}
 
=====MorphTarget=====
{| class="wikitable"
Unknown
! Offset !! Type !! Variable !! Description
 
|-
| 0x00 || u32 || amountFrames ||
|-
! 0x04 || xCutsceneMphFrame[] || || Aligned to 16-byte boundary
|-
| 0x00 || f32 || '''Time''' ||
|-
| 0x04 || u32 || '''Flags''' ||
|-
! colspan="4" |
|-
| colspan="4" style="text-align:center" | [[EvilEngine/MPHT|MPHT]]
|}
 
==AssetID List==
Line 225 ⟶ 297:
F8BC4AEF = umbrella_c5.dff
9676FA5C
91230C4F = icetray.dff
D7269E12 = da_skel_c5.dff
99E42016 = trap_skel_c5.dff
Line 329 ⟶ 401:
C7CAE26D
372F8764 = mm_skel_c11.dff
15B13325 = h_table.dff
58C2A454
427114CC = mask_skel_c11.dff
Line 1,103 ⟶ 1,175:
-om04_opening_bv [OM04_US]
F52CD9C6 = mr_i_young_blend_skel.dff
19097E81 = buddy_p_skel.dff
809B050D
A798EA18 = bv_skel.dff
2,079

edits