Wrp files - unpacking data

WrpTool island creator utility

Moderators: Snake Man, Lone Wolf

Post Reply
kate_arsher
Newbie
Posts: 2
Joined: 2006-11-14, 11:39:16 PM

Wrp files - unpacking data

Post by kate_arsher » 2006-11-14, 07:47:26 PM

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 » 2006-11-15, 12:31:41 AM

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, 11:39:16 PM

Re: Wrp files - unpacking data

Post by kate_arsher » 2006-11-17, 10:40:48 PM

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, 06:45:51 PM

Re: Wrp files - unpacking data

Post by fasad » 2006-11-18, 12:24:58 PM

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 : )

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests