PDA

View Full Version : Grid Size & Terrain Cell Size...

Jeppen
Nov 6 2007, 09:55
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&#39;t this match the sat/mask images, in his example 2048x2048?
I know i&#39;m wrong, but i really want to understand what i&#39;m doing and why i&#39;m doing it.

Also the Terrain cell size, what are the pros and cons for that?
Shouldn&#39;t we always keep it as small as we can, or will that affect the island&#39;s performance?

Hopefully someone will understand my slightly cryptic questions. http://forums.bistudio.com/oldsmileys/whistle.gif

Allie
Nov 6 2007, 11:18
I dont know precise myself, but heres my sample:

I&#39;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

Jeppen
Nov 6 2007, 11:30
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&#39;m beginning to understand this part now. http://forums.bistudio.com/oldsmileys/yay.gif
Big Thanks Alphy&#33;

-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?

Opteryx
Nov 6 2007, 11:31
Yep, that covers it pretty well, about pros and con, I&#39;ve heard (but never tried) that once your cells become smaller than 5m you&#39;ll start getting performance hits.

Jeppen
Nov 6 2007, 11:35
Damn hyper fast posters...

ok, so i guess my edit was pretty much made obsolete there. http://forums.bistudio.com/oldsmileys/whistle.gif

.kju [PvPscene]
Nov 6 2007, 11:55
Better try it yourself&#33;

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.

Allie
Nov 6 2007, 14:03
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

Nov 6 2007, 22:23
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&#39;s completely independent of the wrp&#39;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&#39;t think we should avoid hi-res heightmaps just because they are cumbersome to work with.

I&#39;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 &#40;vd 3001&#41;
2048_50 48
2048_25 49
2048_10 49
2048_8 48
2048_6 39
2048_5 29
2048_2 6[/QUOTE]

Nov 6 2007, 23:21
well, I hope you will figure out how to solve the problem i had on my map using custom ground textures...

Nov 7 2007, 00:20
huh?

Jeppen
Nov 7 2007, 08:16
<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 &#40;vd 3001&#41;
2048_50 48
2048_25 49
2048_10 49
2048_8 48
2048_6 39
2048_5 29
2048_2 6
[/QUOTE]
Wow, that&#39;s an amazing test that says everything&#33;
Big Thanks, i bet this will save alot of time for people who are new and unsure.

Great test&#33; http://forums.bistudio.com/oldsmileys/thumbs-up.gif http://forums.bistudio.com/oldsmileys/thumbs-up.gif http://forums.bistudio.com/oldsmileys/thumbs-up.gif