Difference between revisions of "BDOF (File Format)"
Jump to navigation
Jump to search
(23 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | '''BDOF''' ('''B'''inary '''D'''epth '''O'''f '''F'''ield) is a [[post-effect]] file that controls effects like focus, sharpness and blur in tracks. It is always seen in the "./posteffect" folder inside a [[U8 (File Format)|U8 file]]. | |
− | ==File Format== | + | There is unused code that allows the usage of a secondary BDOF file, named '''posteffect.bdof_demo'''. This one has the same format as a normal BDOF file, and it seems to be used only in the course introduction if present. |
+ | |||
+ | == File Format == | ||
{|class=wikitable | {|class=wikitable | ||
− | ! Offset !! | + | ! Offset !! Type !! Description |
+ | |- | ||
+ | | 0x00 || String || '''File magic'''. Always ''PDOF'' in ASCII. | ||
|- | |- | ||
− | + | | 0x04 || UInt32 || '''File size'''. Always 0x50. | |
|- | |- | ||
− | | | + | | 0x08 || UInt32 || {{Unknown-left|'''Unknown'''. Always 0.}} |
|- | |- | ||
− | | | + | | 0x0C || UInt32 || {{Unknown-left|'''Unknown'''. Always 0.}} |
|- | |- | ||
− | | | + | | 0x10 || UInt16 || Seems to be some filter bitmask. If bit 15 is set, posteffect.bti will be used as an indirect texture. |
|- | |- | ||
− | | | + | | 0x12 || Byte || Inverse alpha. |
|- | |- | ||
− | | | + | | 0x13 || Byte || Alpha. |
|- | |- | ||
− | | 0x14 || | + | | 0x14 || Byte || DOF draw mode: |
+ | * 0 = '''Unknown'''. Probably none. | ||
+ | * 1 = Only use inverse calculation. | ||
+ | * 2 = Use both normal and inverse calculations (normal calculations needed will be reflected if using posteffect.bti). | ||
|- | |- | ||
− | | | + | | 0x15 || Byte || DOF draw amount. |
|- | |- | ||
− | | | + | | 0x16 || Byte || DOF curve type. |
|- | |- | ||
− | | | + | | 0x17 || Byte || {{Unknown-left|'''Unknown'''.}} |
|- | |- | ||
− | | | + | | 0x18 || Float || DOF plane distance. |
|- | |- | ||
− | | | + | | 0x1C || Float || DOF plane range. |
|- | |- | ||
− | | | + | | 0x20 || Float || {{Unknown-left|'''Unknown'''.}} |
|- | |- | ||
− | | | + | | 0x24 || Float || DOF expand. A higher value means blurrier. |
|- | |- | ||
− | | | + | | 0x28 || Float[2] || Indirect texture ST scroll speed. |
|- | |- | ||
− | | | + | | 0x30 || Float[2] || Indirect texture indirect ST scale. |
|- | |- | ||
− | | | + | | 0x38 || Float[2] || Indirect texture ST scale. |
|- | |- | ||
− | | 0x40 || | + | | 0x40 || Byte[16] || Padding. |
|} | |} | ||
− | ==Tools== | + | == Tools == |
The following tools can handle BDOF files:<br> | The following tools can handle BDOF files:<br> | ||
− | + | * [[Post-Effect Editor]], by [[Wexos]] | |
− | [[Category:File Format]] | + | [[Category:File Format/Wii]] |
Latest revision as of 23:31, 23 May 2021
BDOF (Binary Depth Of Field) is a post-effect file that controls effects like focus, sharpness and blur in tracks. It is always seen in the "./posteffect" folder inside a U8 file.
There is unused code that allows the usage of a secondary BDOF file, named posteffect.bdof_demo. This one has the same format as a normal BDOF file, and it seems to be used only in the course introduction if present.
File Format
Offset | Type | Description |
---|---|---|
0x00 | String | File magic. Always PDOF in ASCII. |
0x04 | UInt32 | File size. Always 0x50. |
0x08 | UInt32 | Unknown. Always 0. |
0x0C | UInt32 | Unknown. Always 0. |
0x10 | UInt16 | Seems to be some filter bitmask. If bit 15 is set, posteffect.bti will be used as an indirect texture. |
0x12 | Byte | Inverse alpha. |
0x13 | Byte | Alpha. |
0x14 | Byte | DOF draw mode:
|
0x15 | Byte | DOF draw amount. |
0x16 | Byte | DOF curve type. |
0x17 | Byte | Unknown. |
0x18 | Float | DOF plane distance. |
0x1C | Float | DOF plane range. |
0x20 | Float | Unknown. |
0x24 | Float | DOF expand. A higher value means blurrier. |
0x28 | Float[2] | Indirect texture ST scroll speed. |
0x30 | Float[2] | Indirect texture indirect ST scale. |
0x38 | Float[2] | Indirect texture ST scale. |
0x40 | Byte[16] | Padding. |
Tools
The following tools can handle BDOF files: