[QUESTION] About multiple heightmaps

Dids

16-04-2006 19:15:55

Hey all, everything's been fine with PLSM for quite a bit. I've ran to a difficult question/problem though, and it's not necessarely linked with PLSM.

I currently use Geoscape3d to edit my heightmap, which is roughly 4097x4097 in size. The size of the heightmap isn't quite enough for me, so I was wondering: Can I switch/load a different heightmap/config file "in-game" when I go to a new area and trigger the load? Or atleast a solution somewhat similar to this.

Thanks in advance, and all the best for tuan and the rest!

- Dids

Falagard

17-04-2006 00:28:24


sceneMgr->setOption("CurrentMap", "MapName");


Where MapName is the name of the terrain cfg file without the .cfg extension. Take a look at the PLM2 demo, I think it is doing that to switch maps.

jacmoe

17-04-2006 04:19:57

That would change the scene completely, wouldn't it? :)

Looking for a way to add more pages to the terrain in a specific direction.
That would require removing pages in the opposite direction.

Do I know what I am talking about? :)

Falagard

17-04-2006 04:44:39

Ya, but um... that's what the PLM2 is all about, *paging* in the terrain. If you want something larger than 4097x4097 then ... well create more pages.

It sounded like he wanted to load a new heightmap when one is already loaded... as in...switch the scene?

Dids

17-04-2006 09:03:33

Falagard's right, kinda.

Instead of actually making a lot of "pages" or a huge heightmap, I'd rather create several smaller ones. Of course, this would work so that something would trigger the map change and it would load (unload old, load new) the new map.

But I think there's a problem here too. If the actual "map transcaction" is supposed to be instant, that just wouldn't work, because the map is positioned in the exact same place every time (depending on the resolution of it).

I guess I'm just trying to find out whether or not I should be using a better heightmap/landscape editor to edit a *huge* (10k+ or so) map, or simply create a lot of smaller maps and switch between them?

jacmoe

18-04-2006 00:38:09

Instead of actually making a lot of "pages" or a huge heightmap, I'd rather create several smaller ones.
Yes, that's what I want to do.
For near infinite worlds, this is probably the only options - unless you have access to a gigantic mainframe computer.

Falagard

18-04-2006 02:55:50

There are a couple things that come to mind here:

1. If you want something like 4 4096x4096 heightmaps to make one large terrain, generate the files in your editor (terragen for example) then blend the seams using an external process, either automated or using something like Photoshop. Then map split them but update the mapsplitter to be able to work by passing it multiple heightmaps that will be creating one large terrain.

2. Add functionality to the PLM2 terrain editing plugin for the GOOF editor that I'm working on so that you can import/update quadrants of a terrain with an existing heightmap, then use a smoothing tool (that I've yet to write) to visually smooth the terrain pages from the different heightmaps together.

Clay

tuan kuranes

21-04-2006 21:21:48

you can dynamically add pages in plsm2, after having changed world height and width and even blend border to make sure they're collapsing even if not from same heightmap "source", using the special source "heightfieldblendneighbour".
(search in both forum about "heightfieldblendneighbour" for more infos)

OvermindDL1

21-04-2006 21:34:59

Out of curiosity, if you have a growing world, and it starts to get near to edges where floating point errors become dramatic, is there a way to re-center the land at the camera point?

tuan kuranes

21-04-2006 21:41:37

You'll have to use double instead of floats for Real. (double is really bigger.)

OvermindDL1

22-04-2006 02:37:33

Yea, I know just how much bigger, can do things like represent a galaxy at the size of water molecules... Just wondering it if it worth the speed hit though...

tuan kuranes

22-04-2006 07:53:54

You may even not see a speed hit, as current cpu handles it.