Wrp files - unpacking data

WrpTool island creator utility

Moderators: Lone Wolf, Snake Man

kate_arsher
Newbie
Posts: 2
Joined: 2006-11-14 23:39:16

Wrp files - unpacking data

Post by kate_arsher »

Hello everybody

First, excuse me for my poor english.

I'm trying to extract data from wrp files, for making a viewer.
I don't succeed with the decompression of the data (cellflags, cellsound, ....).

you would have detailed documentation (or sources) for make this???

Thanks in advance!!!
Snake_Man

Re: Wrp files - unpacking data

Post by Snake_Man »

The WRP file formats are documented, I think the BIS wiki has them, then also ofpec should have them. If you cannot find, post again and I'll dig them up from my hdd somewhere.
kate_arsher
Newbie
Posts: 2
Joined: 2006-11-14 23:39:16

Re: Wrp files - unpacking data

Post by kate_arsher »

ok, finaly, i can use 4wvr and not oprw files.... But i've an other questions : if the size of each cells is 50mx50m, how opf can make differents detail levels?

I try to make a little viewer for wrp files.
fasad
Recruit
Posts: 19
Joined: 2005-12-18 18:45:51

Re: Wrp files - unpacking data

Post by fasad »

For each higher terrain setting, OFP halves the terrain grid size (doubles the vertices). The engine interpolates the height of the additional data points, based on the cell they are in, adjacent cells, plus noise. I don't know of anybody working out what equation it uses though.
Cells with a slope less than a certain amount are always flat.

See the BI wiki:
http://community.bistudio.com/wiki/setTerrainGrid

This is from the "commented config" :

// Fractal and white noise random offset are added
// White noise generating more "wild" terrain
// Fractal tends to generate smooth, varied terrain

class Subdivision
{
// Fractal component of subdivision
// Changes are smaller for smaller rectangles

class Fractal
{
// Texture roughness factor

rougness = 10;

// Max. value for squares containing road

maxRoad = 0.2;

// Max. value for squares containing track

maxTrack = 1.0;

// Max. coefficient depending on slope

maxSlopeFactor = 0.05;
};

// White noise component of subdivision
// Change size is independent of rectangle size

class WhiteNoise
{
rougness = 5;

// Max. value for squares containing road

maxRoad = 0.1;

// Max. value for squares containing track

maxTrack = 0.5;

// Max. coeficient depending on slope

maxSlopeFactor = 0.025;
};

// Do not divide surfaces that are under given limit

minY = -0.0;

// Do not divide flat surfaces

minSlope = 0.02;
};
};


good luck : )

Return to “WrpTool”