WWF: Difference between revisions
Barncastle (talk | contribs) (Created page with "{{Template:SectionBox/VersionRange|min_expansionlevel=8}} WWF files are used to control particles in the particulate weather system that was introduced in {{Template:Sandb...") |
m (→Header) |
||
Line 6: | Line 6: | ||
=Header= | =Header= | ||
char[4] unk1; // always 0 filled | char[4] unk1; // always 0 filled | ||
uint32_t magic; // fnv1a(type_as_string), i.e. for "WWFParticulateGroup", 0x932c64b4 | |||
char data; | char data[]; | ||
=Data= | =Data= |
Revision as of 17:56, 25 March 2018
WWF files are used to control particles in the particulate weather system that was introduced in . Unlike most other files, the WWF format uses a binary header with JSON data. This has the advantage that all field names are documented within the data itself. Additionally, the client also contains meta-style information which includes the human-readable variant of these names.
Particulate based weather is enabled for DB/Weather records with a m_type of 5 that either join to the DB/WeatherXParticulate table or have their particulateFileDataID set. Both joins reference the required WWF files by fileDataId.
Header
char[4] unk1; // always 0 filled uint32_t magic; // fnv1a(type_as_string), i.e. for "WWFParticulateGroup", 0x932c64b4 char data[];
Data
C-style representation of the JSON data. All enum values are stored as their string representation.
Note: Only the implemented parts of the WWF specification, as of (8.0.1.26287), are documented.
typedef C2Vectorⁱ WWFVec2; typedef C3Vectorⁱ WWFVec3; typedef C3Vectorⁱ WWFGraphNodeVec3; typedef CImVectorⁱ WWFArgb; struct WWFParticulateGroup { int32_t placeHolder; WWFParticulateGeoType geometryType; WWFParticulateRenderMode renderMode; int32_t particleCount; float strength; // Default Particulate Strength char enableEmissionGraph; // Enable Particulate Strength Graph WWFGraphNodeVec3 graphNodes[]; // Particulate Strength Graph char occlusion; // Enable Occlusion Testing float occlusionFadeDistance; float occlusionIgnoreChance; char enableGroundParticulate; char depthFading; // Enable Depth Buffer Fading float depthFadeDistance; char useLookDirectionOffset; float groupEdgeFadeDistance; float cameraNearFade; float cameraFarFade; char useForceDirection; WWFVec3 velocityMean; WWFVec3 forceDirection; float rotation; float tilt; float speed; WWFVec3 velocityVariance; char enableCompute; // Enable Dynamic Rendering char enableWindEffects; char useWandering; float wanderSpeed; WWFVec2 wanderAmount; WWFParticulateConstraintType constraint; // Volume Constraint char inclusiveRestraint; // Use Inclusive Constraint float groupSize; // Particulate Group Size WWFVec3 particulateSize; WWFVec2 particulateSizeVariance; char randomRotation; // Randomize Initial Particle Orientation char useParticleRotation; float rotationSpeedMean; // Particle Rotation Speed float rotationSpeedVariance; // Particle Rotation Speed Variance char randomizeRotationDirection; float useParticleFading; float particleFadeTotalTime; // Fade Loop Length float particleFadeTimeBegin; // Fade Start Time float particleFadeTimeEnd; // Fade End Time float particleFadeTimeVariance; char enableHeightFading; WWFParticulateHeightFadeMode heightFadeMode; float heightFadeStartDistance; // Height Fade Max Height float heightFadeVariance; float heightFadeTransitionDistance; char enableDeltaCulling; float deltaCullingMax; WWFParticulateBlendMode blendMode; WWFArgb color; uint32_t textureID; // fileDataId char useAnimation; int32_t sheetWidth; // Cell X Count int32_t sheetHeight; // Cell Y Count int32_t animationCount; float animationSpeed; char enableAngularTransition; // Enable Texture Angle Fading } enum WWFParticulateGeoType { Quads, Triangles } enum WWFParticulateRenderMode { VelocityBillboard, CameraBillboard } enum WWFParticulateConstraintType { Center, Nearest, None } enum WWFParticulateHeightFadeMode { Flat, Relative, RelativeFollow } enum WWFParticulateBlendMode { Additive, Blended }