27
edits
Changes
Jump to navigation
Jump to search
m
=====Camera Animation (WIP)== All this is based on best effort knowledge from reversing by Maki. I'm just trying to understand it.=== Control Word ===
Total bytes of struct is '''1092'''. Still much is unknown about this struct. I adjusted things from OpenVIII source code. Though some numbers weren't adding up. I know the total size. So I adjusted one of the unknown bytes arrays to fit in the span.
======Time======
Time is calculated from number of frames. You basically set starting position World+lookat and ending position, then mark number of frames to interpolate between them. Every frame is one draw call and it costs 16. Starting time needs to be equal or higher for next animation frame to be read; If next frame==0xFFFF then it's all done.
→0 Default: fix size of animation frame
|}
{| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"
! style="background:rgb(204,204,204)" | Offset
|-
| 0
| uint8_tuint16_t (bit varies)| Animation IDMain controller. If 0xFFFFU END|}==== FOV ==== Control Word & 0b0000'0000'1100'0000U===== 1 Default ====={| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description
|-
| 1None| uint8_tNone| Key Frame CountStart = 0x200
|-
| None| None| End = 0x200|}===== 2Same ====={| uint16_t border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(bit varies204,204,204)" | Offset! style="background:rgb(204,204,204)" | Main controllerLength! style="background:rgb(204, if '''0xFFFF''' then return204,204)" | Description
|-
| 40
| uint16_t
| Starting FOV usually ~280Start
|-
| 62
| uint16_t
| Ending FOV ~006Padding|-| None| None| End = Start|}===== 2 Different ====={| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description
|-
| 80
| uint16_t
| Starting Camera Roll usually 0Start
|-
| 102
| uint16_t
| Starting Time usually 0Padding
|-
| 124
| uint16_t
| Current Time // IEnd|} ==== ROLL ==== Control Word & 0b0000'm questioning if this is part of the struct.0011'0000'0000U===== 0 Unknown ===== TODO===== 1 Default ====={| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description
|-
| 14None| array<uint8_t,20>None| unknown bytesStart = 0x000
|-
| 34None| array<uint16_tNone| End = 0x000|}===== 2 Same ====={| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,32>204)" | Length! style="background:rgb(204,204,204)" | Start Frame OffsetsDescription
|-
| 980| array<int16_t,32>uint16_t| Camera World ZStart
|-
| 162None| array<int16_tNone| End = Start|}===== 2 Different ====={| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,32>204)" | Length! style="background:rgb(204,204,204)" | Camera World XDescription
|-
| 2260| array<int16_t,32>uint16_t| Camera World YStart
|-
| 2902| array<uint8_tuint16_t| End|} ==== LAYOUT ==== Control Word & 0b0000'0000'0000'0001U===== 0 Default ===== You'll loop through the data till the first value is less than 0. pushing back to a variable length container.{| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,32>204,204)" | Length! style="background:rgb(204,204,204)" | Is Frame Durations Shot ~ bool?Description
|-
| 3220| array<int16_t,32>| Camera Look At Zif < 0 break; could be related to time of frame.
|-
| 3862| array<int16_t16 bytes| Animation Frame|} ===== 1 Other ===== TODO===Time=== Time is calculated from number of frames. You basically set starting position World+lookat and ending position, then mark number of frames to interpolate between them. Every frame is one draw call and it costs 16. Starting time needs to be equal or higher for next animation frame to be read; If next frame==0xFFFF then it's all done.=== Animation Frame ==={| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204,204,32>204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Camera Look At XDescription
|-
| 4500| array<int16_t,32>uint16_t| Camera Look At Yis frame durations shot
|-
| 5142| arrayVertice<uint8_tuint16_t> (x,32>y,z)| Is Frame Ending Shots ~ bool?World
|-
| 5468| array<uint8_t,128>uint16_t| unknown bytesis frame ending shot
|-
| 67410| arrayVertice<uint8_t,128>| unknown bytes|-| 802| array<uint8_t,128uint16_t>| unknown bytes|-| 930| array<uint8_t(x,128>| unknown bytes|-| 1058| array<uint8_ty,34>z)| unknown bytesLook At
|}
=====Dependency=====