NW > Particle File

This file contains resources for particle effects. This page describes version 0x41 of the file format.

The file is structured as follows:

File Header

The offsets are absolute.

OffsetSizeDescription
0x04Magic number (EFTF)
0x44Version number
0x84Number of effects
0xC4Unknown
0x104Offset to string table
0x144Texture section offset
0x184Texture section size
0x1C4Shader section offset
0x204Shader section size
0x244Keyframe animation section offset
0x284Keyframe animation section size
0x2C4Primitive section offset
0x304Primitive section size
0x344Parameter section offset
0x384Parameter section size
0x3C4Unknown
0x404Unknown
0x444Unknown
0x48Effects

Effect

OffsetSizeDescription
0x04Unknown
0x44Unknown
0x84Name offset (into string table)
0xC4Name address (filled in at runtime)
0x104Emitter count
0x144Emitter offset (absolute)
0x184Unknown

Emitter

OffsetSizeDescription
0x04Offset to emitter data (absolute)
0x44Pointer to emitter data (filled in at runtime)
0x84Pointer to static uniform block 1 (filled in at runtime)
0xC4Pointer to static uniform block 2 (filled in at runtime)

Emitter Data

OffsetSizeDescription
0x04Type (0=Simple, 1=Complex)
0x44Flags:
0x0000400 - Reverse particle order
0x0010000 - Emission rate is limited (can't be sped up)
0x80x2CUnknown
0x344Custom action callback id
0x384Name offset (into string table)
0x3C4Name address (filled in at runtime)
0x400xD8Texture res 1
0x1180xD8Texture res 2
0x1F00xD8Texture res 3
0x2C84Pointer to keyframe animations (filled in at runtime)
0x2CC4Offset into keyframe animation section
0x2D04Size of keyframe animation data
0x2D48Unknown
0x2DC4Primitive index
0x2E08Unknown
0x2E84Primitive index 2
0x2EC4Number of parameters
0x2F04Offset into parameter section
0x2F44Pointer into parameter section (filled in at runtime)
0x2F80x28Unknown
0x3204Display side type
0x3244Blend type
0x3284ZBuf A test type
0x32C4Animation function scale
0x3304Animation function color 0
0x3344Animation function color 1
0x3384Animation function alpha 0
0x33C4Animation function alpha 1
0x3404Emit function type
0x3440x100Unknown
0x4444Base emission ratio (float)
0x4484Emission ratio randomness
0x44C0x10Unknown
0x45C4Initial particle speed
0x4600x24Unknown
0x4844Speed acceleration (float)
0x4880x1CUnknown
0x4A44X acceleration (float)
0x4A84Y acceleration (float)
0x4AC4Z acceleration (float)
0x4B08Unknown
0x4B84Mesh type (0=Square, 1=Primitive)
0x4BC4Unknown
0x4C04Base speed randomness (float)
0x4C40x10Unknown
0x4D40x7CTexture emitter data 1
0x5500x7CTexture emitter data 2
0x5CC0x7CTexture emitter data 3
0x6488Unknown
0x6508 x 16Color table 0
0x6D08 x 16Color table 1
0x7500x34Unknown
0x7840x143v4k animation key alpha 0
0x7980x143v4k animation key alpha 1
0x7AC0x7CUnknown
0x8284Rotation acceleration (float)
0x82C5Unknown
0x8311Custom shader callback id
0x8320x12Unknown
0x8444Shader index 1
0x8484Shader index 2
0x84C4Shader index 3
0x8500x6CUnknown

Only present if type is complex:

OffsetSizeDescription
0x8BC?Unknown

Animation Functions

IDFunction
0None
14k3v
28key

Emit Functions

IDFunction
0Point
1Circle
2Circle same divide
3Fill circle
4Sphere
5Sphere same divide
6Sphere same divide 64
7Fill sphere
8Cylinder
9Fill cylinder
10Box
11Fill box
12Line
13Line same divide
14Rectangle
15Primitive

Animation Key

This animation uses four keys and three values (3v4k).

OffsetSizeDescription
0x04First key value
0x44Difference between first and second key value
0x84Difference between second and last key value
0xC4Time of second key value
0x104Time of third key value

The animation is constructed as follows:

float value1 = StartValue;
float value2 = StartValue + StartDifference;
float value3 = value2 + EndDifference;

KeyFrame(0, value1)
KeyFrame(Time2, value2)
KeyFrame(Time3, value2)
KeyFrame(1, value3 )

Texture Res

OffsetSizeDescription
0x02Width
0x22Height
0x44Tile mode
0x84Swizzle
0xC1Wrap mode
0xD1Filter mode
0xE1Depth
0xF1Padding
0x104Mipmap count
0x144Components selector
0x184LOD max (float)
0x1C4LOD bias (float)
0x204Original texture format
0x244Offset into texture section for original texture data
0x284Size of original texture data
0x2C4FTX texture format
0x304Size of FTX texture data
0x344Offset into texture section for FTX texture data
0x384Is GX2Texture initialized (must be 0, updated at runtime)
0x3C0x9CGX2Texture structure

Texture Format

IDDescription
1RGBA8 UNORM
2RGB8 UNORM
3BC1 UNORM
4BC1 SRGB
5BC2 UNORM
6BC2 SRGB
7BC3 UNORM
8BC3 SRGB
9BC4 UNORM
10BC4 SNORM
11BC5 UNORM
12BC5 SNORM
13R8 UNORM
14RG8 UNORM
15RGBA8 SRGB
16R8 SNORM
17RG4 UNORM
18RG11B10 FLOAT
19R16 FLOAT
20RG16 FLOAT
21RGBA16 FLOAT
22R32 FLOAT
23RG32 FLOAT
24RGBA32 FLOAT
25R5G6B5 UNORM
26RGB5A1 UNORM

Texture Emitter Data

OffsetSizeDescription
0x00x7CUnknown

Texture Section

This section contains raw image data that may be referenced by emitters.

String Table

The string table simply contains a bunch of null-terminated strings. The first string in the string table is the name of the particle set.

Shader Section

The offsets are relative to the start of the shader section.

OffsetSizeDescription
0x04Number of shaders
0x44Shader section size
0x84Unknown
0xC4Unknown
0x104Offset to shader files
0x144Offset to shader info list

Shader Files

This section simply contains a bunch of GSH files.

Shader Info

One per shader. The shader file offset is relative to the first shader file.

OffsetSizeDescription
0x00x28Shader resource info
0x280x3CTexture sampler info
0x644Unknown
0x684Shader file size
0x6C4Shader file offset
0x704Unknown
0x744Unknown

Shader Resource Info

OffsetSizeDescription
0x04Unknown
0x44Flags:
0x02000000 - Use GPU calc for emitter
0x832Unknown

Texture sampler info

OffsetSizeDescription
0x01Unknown
0x11Maximum texture sampler id (0, 1 or 2)
0x217Unknown
0x131Is texture sampler 0 an array
0x141Is texture sampler 1 an array
0x150x27Unknown

Keyframe Animation Section

This section contains keyframe animations that may be used by emitters. It contains zero or more copies of the following structure:

OffsetSizeDescription
0x04Identifier (KEYA)
0x44Number of animations
0x8Animations

Keyframe Animation

OffsetSizeDescription
0x04Number of keyframes
0x44Unknown
0x84Animated attribute
0xC4Unknown
0x104Number of frames
0x144Unknown
0x184Size of this structure
0x1CKeyframes

Keyframe

OffsetSizeDescription
0x04Frame (float)
0x44Value (float)

Attribute

IDDescription
0Emission ratio
1Random
2Matrix scale X
3Matrix scale Y
4Matrix scale Z
5Rotation X
6Rotation Y
7Rotation Z
8Position X
9Position Y
10Position Z
15Particle speed
17Scale X
18Scale Y
25Particle acceleration
IDDescription
28Random X
29Random Y
30Random Z
31Magnet
32Spin 1
33Spin 2
34Convergence
35Position X
36Position Y
37Position Z
38Color 0 Red
39Color 0 Green
40Color 0 Blue
41Color 1 Red
42Color 1 Green
43Color 1 Blue
44Alpha 0
45Alpha 1
46Scale X
47Scale Y

Primitive Section

The offset is relative to the start of the primitive section.

OffsetSizeDescription
0x04Number of primitives
0x44Size of primitive section
0x84Offset to primitives (0xC)
0xCPrimitives
Vertex buffers

Primitive

OffsetSizeDescription
0x05 x 16Buffer info
IndexNameType
0v_inPosVec3
1v_inNormalVec3
2v_inColorVec4
3v_inTexCoordVec4
4v_inIndexUint32

Buffer Info

Offset is relative to start of vertex buffers in primitive section.

OffsetSizeDescription
0x04Number of elements
0x44Stride (number of elements)
0x84Buffer offset
0xC4Buffer size