Jump to content
Sign in to follow this  
Jeppen

Grid Size & Terrain Cell Size...

Recommended Posts

Hi, me again.

What are the pros and cons for small resp. a larger gridsize & Terrain cell sizes?

Our resident Norwegian said in his tutorial:

Quote[/b] ]In "Terrain Grid Size" select 512 x 512, In "Terrain Cell Size (meters)" write 10.0

Ok, so terrain Grid size is 512,

shouldn't this match the sat/mask images, in his example 2048x2048?

I know i'm wrong, but i really want to understand what i'm doing and why i'm doing it.

Also the Terrain cell size, what are the pros and cons for that?

Shouldn't we always keep it as small as we can, or will that affect the island's performance?

Hopefully someone will understand my slightly cryptic questions. whistle.gif

Share this post


Link to post
Share on other sites

I dont know precise myself, but heres my sample:

I'm using terrain grid size 1024x1024 and cell size 10m, so this will give me a terrain of 10240 meters by 10240 meters.

My satellite and mask images are 10240x10240 pixels (sat resolution is 1 pixel = 1 meter.

The terrain.png greyscale image has a resolution of 1024x1024 pixels, this we import with the help of a "terrain.pbl" file.

Quote[/b] ]class cfg

{

PNGfilename="terrain.png";

squareSize=10.000000;

originX=0;

originY=0;

minHeight=--10;

maxHeight=500;

};

So this will create the terrain itself in size 1024 * 10 meter is 10240x10240 meters.

Hope u can do some with this.

greetings,

Alphons

Share this post


Link to post
Share on other sites

So if i wanted to make a map being 20840 m2,

then my greyscale heightmap would have to be 2048 x 2048 pixels, Terrain gridsize of 10.0,

a Sat+Mask texture of 20480 x 20480 pixels each?

I think i'm beginning to understand this part now. yay.gif

Big Thanks Alphy!

-J-

*edit* Would it be possible to make the heightmap 20480 x 20480 and terrain grid size 1.0.

This should make it the same size but perhaps a little more detailed terrain?

Or maybe this is completely unecessary and performance ditching?

Share this post


Link to post
Share on other sites

Yep, that covers it pretty well, about pros and con, I've heard (but never tried) that once your cells become smaller than 5m you'll start getting performance hits.

Share this post


Link to post
Share on other sites

Damn hyper fast posters...

ok, so i guess my edit was pretty much made obsolete there. whistle.gif

Share this post


Link to post
Share on other sites

Better try it yourself!

Smaller grid cell size makes more bumpy (OFP high terrain detail)

terrain possible and therefore the terrain gets WAY

more interesting for infantry and ground vehicle battles.

Share this post


Link to post
Share on other sites

I dont know how big the terrain greyscale can be, but indeed a to small cell size will give preformance loss.

So it is even possible to create a greyscale image of 512 * 40m, this will also create a map of 20480x20480 meters.

I really have not tryed to do it like you say there, 20480 * 1 meter

Dont think its handy to go lower then 10 meter cel size, i know u will have problems with a big greyscale image if you like to edit it in Wilbur for example.

I think also the grid overlay in map view inside game will be very dense if choosed for 1 meter cells.

The main important thing i think is the satellite picture resolution.

I know some areas on google earth have 1 pixel a meter resolutions, but i also know they have areas with resolution 1.5 meter a pixel and even other dimensions like 5 meter a pixel and 10 meter a pixel.

So if you want to cover a 10240 meter island with a lets say 2 meter resolution picture, the picture needs to be 5120 pixels ( 1 pixel = 2 meter)

This is how i understand it, and it worked for me, it seems i have the right scale ingame.

Later,

Allie

Share this post


Link to post
Share on other sites
Quote[/b] ]I think also the grid overlay in map view inside game will be very dense if choosed for 1 meter cells.

The in-game map grid is defined in the island/terrains config - it's completely independent of the wrp's grid size.

Quote[/b] ]Dont think its handy to go lower then 10 meter cel size, i know u will have problems with a big greyscale image if you like to edit it in Wilbur for example.

Manipulating large images is part of making an island/terrain, so I don't think we should avoid hi-res heightmaps just because they are cumbersome to work with.

I've done a bit of quick and dodgey testing to find the relative performance of different cell sizes:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

grid_cellsize fps in buldozer (vd 3001)

2048_50 48

2048_25 49

2048_10 49

2048_8 48

2048_6 39

2048_5 29

2048_2 6

Share this post


Link to post
Share on other sites

well, I hope you will figure out how to solve the problem i had on my map using custom ground textures...

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

grid_cellsize fps in buldozer (vd 3001)

2048_50 48

2048_25 49

2048_10 49

2048_8 48

2048_6 39

2048_5 29

2048_2 6

Wow, that's an amazing test that says everything!

Big Thanks, i bet this will save alot of time for people who are new and unsure.

Great test! thumbs-up.gifthumbs-up.gifthumbs-up.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×