Terrain size

A forum about everything related to the Cafu World Editor CaWE: mapping, editing, scripting, making GUIs and fonts, using the BSP, PVS and Light compilers.
Post Reply
afgho
Posts: 14
Joined: 2012-06-12, 13:08

Terrain size

Post by afgho » 2012-06-12, 13:37

Hello,

i am making a multiplayer simulation game set on Mars, the game world is large but for the moment i stick to a 4096m*4096m map which is enough for the first phase, it seem Cafu can achieve this relatively easily.

So i created a 2049*2049 heightmap in GeoControl 2, exported it as .ter file, added a terrain in CaWe and resized it to fit 4km*4km in CaWe units, however CaWe seem to crash every time when i am trying to scale its height, it seem i am hitting a limit, should the terrain size be reduced?
afgho
Posts: 14
Joined: 2012-06-12, 13:08

Re: Terrain size

Post by afgho » 2012-06-12, 14:49

Well, got it working by reducing it to 2km*2km, it is actually sufficient :), seem it was possible to go to 4km*4km though but maybe the terrain have too many features, when it crashed there was a huge numbers of polygons on the edge of the map crater.
HWGuy
Posts: 95
Joined: 2011-05-31, 07:37

Re: Terrain size

Post by HWGuy » 2012-06-12, 16:00

You probably want to break up the terrain into chunks for LoD so ones really far away can be made invisible behind a red haze, or swap-put with a low res mesh really far away.
afgho
Posts: 14
Joined: 2012-06-12, 13:08

Re: Terrain size

Post by afgho » 2012-06-12, 18:15

It handle good http://www.hapshack.com/images/sNAG8.jpg

The texture look somehow blurry, how can the texture quality be increased? The terrain use a 2048x2048 high quality texture right now which is generated with the heightmap, maybe i should split the terrain in chunks like you said to get better quality, Cafu does not support texture splatting right?

And how is fog added?
Also the skybox look very pixelated due to the resize.
HWGuy
Posts: 95
Joined: 2011-05-31, 07:37

Re: Terrain size

Post by HWGuy » 2012-06-12, 20:03

There's no texture mixing yet, although it could be modded in, using paint map as a blend map.
Depth fog can be done as a shader, or you can modify the renderer.
For max skybox and icon quality use the noCompression flag, don't use that for general textures though.
In practise the base terrain is detailed with models more than used as the sole source of detail, since you're on mars... lots of rock props, and stuff relevant to the plot. With a big world you'll want several LoDs for the props, small things can disappear far away, big things need several LoDs.
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Terrain size

Post by Carsten » 2012-06-13, 00:55

Hi afgho,
welcome to the Cafu forums! :welcome:
afgho wrote:It handle good http://www.hapshack.com/images/sNAG8.jpg

The texture look somehow blurry, how can the texture quality be increased?
Yes, terrain looks good, but both the terrain base texture as well as the sky look very blurry, and from the screenshot alone it's hard to tell why that is.

If you cannot make it work on your own, can you please post your source files (zip of map, terrain, texture images and material scripts) so that we can have a look?
Cafu does not support texture splatting right?
And how is fog added?
Sorry, no clever texture blending tricks here yet.
Also no fog yet, but it should be relatively straightforward to add.
Also the skybox look very pixelated due to the resize.
Did you intentionally resize it?
Best regards,
Carsten
afgho
Posts: 14
Joined: 2012-06-12, 13:08

Re: Terrain size

Post by afgho » 2012-06-13, 01:31

Thank you, the quality problem was caused by either the compression or the automatic scaling (noScaleDown), i used both for the terrain and the skybox and it look much better now! :)

http://www.hapshack.com/images/73gqU.jpg
With a big world you'll want several LoDs for the props, small things can disappear far away, big things need several LoDs.
Is the LoD done automatically? Can it be done in CaWe?

Also, is there a quick way in CaWe to spawn many meshs? I will need to add many rock and i can see it being rather tedious to do it one by one.
Last edited by afgho on 2012-06-13, 04:36, edited 1 time in total.
HWGuy
Posts: 95
Joined: 2011-05-31, 07:37

Re: Terrain size

Post by HWGuy » 2012-06-13, 04:09

Cafu has a LoD system which will pick meshes based on set distances, it does not dynamically reduce a mesh, that would take up too much power unless you implemented "tessellation" support. You just have multiple meshes, a single texture and the distances and meshes in the descriptor file.

For a gigantic map like a chunk of mars, you could procedurally plop meshes rather than by hand, or mod the foliage system to drop them(rocks instead of trees/bushes/grass).

For best results you probably want to do both... regular static props for big unique things, foliage system for the huge number of common smaller things.
afgho
Posts: 14
Joined: 2012-06-12, 13:08

Re: Terrain size

Post by afgho » 2012-06-13, 04:46

Ok, thank you, i must say in overall i am pretty impressed by the engine, it have what i wanted and it work finely after getting the grasp of it. :)
afgho
Posts: 14
Joined: 2012-06-12, 13:08

Re: Terrain size

Post by afgho » 2012-06-15, 14:31

Is it possible to increase CaWe world size?

I saw that line in one of the Deathmatch lua config:

Code: Select all

-- Note: If this gets any bigger than 65536, CaWE needs revision, especially cmap brush loading (starting digging from LoadSave_cmap.cpp)!
Mapsize={ -65536, 65536 }
So the note seem to imply it will lead to problems but how to do larger worlds then? loading maps by triggers?
HWGuy
Posts: 95
Joined: 2011-05-31, 07:37

Re: Terrain size

Post by HWGuy » 2012-06-15, 16:21

I've gone above the recommended size and it kept working, it's more a warning because it hasn't been tested beyond that size, but the code is pretty stable and should handle it.

Level streaming is pretty much mandatory for extremely large and detailed maps, an "easy" way of hacking this in is by having the map in group chunk ents, when far away they would simply not be rendered altogether, generally a low-res bit would take it's place until you got closer to see it with any notable amount of detail. You could modify the LoD system significantly, but a simple method is to simply have a trigger box encompassing the chunks.
With that you can track where the player is and pop in/out chunks accordingly and leave the LoD system to do what it does best.
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Terrain size

Post by Carsten » 2012-06-16, 00:45

Hi afgho,
afgho wrote:So the note seem to imply it will lead to problems but how to do larger worlds then? loading maps by triggers?
Please see http://www.cafu.de/forum/viewtopic.php?p=3706#p3706 and possibly http://www.cafu.de/forum/viewtopic.php?p=4795#p4795 (and the posts following it).

Note that at this time, there is no "streaming" of resources for very large terrains in Cafu, so I'd recommend to take one of the work-around solutions (which are easy to use, well tested, known to work, and we would be able to provide help), or be prepared to spend some programming to overcome any limitations of the current implementation (which is very interesting as well, and if you'd like to do this, I'd be happy to help as much as I can as well).
:up:
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests