L3DT users' community
Large 3D terrain generator

Problem with big hieghtmaps

Got a problem or need advice?

Problem with big hieghtmaps

Postby Caermundh » Thu Feb 16, 2006 12:07 am

Hi,

I downloaded the standard version of L3dT, just to give it a whirl and see how i liked it. I have to say i like the potential......however.....

I went to File->Import->Heightfield, opened a height map i have that is 2k x 2k. It opened it just fine. However when i went to open a larger height map (20k x 20k), i got a "file not found error" in the error log.

Why is this happening? do i need to download the liscened(sp?) version to import really large heightmaps?
User avatar
Caermundh
New member
 
Posts: 3
Joined: Wed Feb 15, 2006 11:57 pm

Postby Aaron » Thu Feb 16, 2006 5:03 am

Hi Caermundh,

20k x 20k is currently beyond the size limit for a single file in L3DT. The standard version is limited to 2k x 2k, and the pro version has a bug that prevents allocation of more than 1Gb in a non-cached map (a 20k x 20k is 1.6Gb of RAM). The fix is coming in the next release.

As for the 'file not found' error, I guess I've stuffed up an error message. What file format was this?

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Caermundh » Thu Feb 16, 2006 11:09 am

ahhh, i suspected it might be a size limitation. I look foward to the next release. The file format was 24-bit .bmp, made in Photoshop.
User avatar
Caermundh
New member
 
Posts: 3
Joined: Wed Feb 15, 2006 11:57 pm

Postby Aaron » Thu Feb 16, 2006 1:35 pm

Hi Caermundh,

Thanks for the additional info. Loading from bitmaps and JPEGs also takes nearly twice as much memory as other formats because of the image library I'm using (PNG's not affected). I guess I should pencil into the to-do list a new lib, as 2.8Gb for a 20k x 20k bitmap is just crazy-talk.

Also, this explains the 'file not found' error; when the lib fails to load the image it doesn't return a useful error code, so I just assume it's an FNF problem.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Caermundh » Thu Feb 16, 2006 4:57 pm

Aaron,

Thanks for reposiveness. I have just a couple more questions. I am trying to develop a large gaming world using greyscale heightmaps made in Photoshop. This map is only the first one ill be making if i can find a generation process that is relatively smooth and efficient. I might even go larger for the next map, say 50k x 50k (If the software could handle that, if not ill live with 20k x 20k or smaller.)

Basically im using 3D Gamestudios WED and MED to make my games. MED can only handle heightmaps of 2k x 2k max. When i try to manually break down my map into plates through photoshop, the process is not only time consuming and painful, but the final product in WED has seams between all the plates.

I am basically a complete n00b with gamemaking. As you can imagine, my search for a method to generate large scale terrain has been long and painful. Any advice you can give me is deeply appriciated.

My question for you is should i hold out for L3DT 2.4? if so, whenabouts can i expect its release? if L3DT is not the way for me to go, is there a package/software that you would recommend?
User avatar
Caermundh
New member
 
Posts: 3
Joined: Wed Feb 15, 2006 11:57 pm

Postby Aaron » Fri Feb 17, 2006 2:35 am

Hi Caermundh,

Based on those size requirements, I'd say your options are pretty much limited to L3DT and PnP Terrain creator (link below). I think these are the only terrain generators that can exceed 8k x 8k (does anyone else know of one?), and both do it using disk-paged map tiling.

http://pnp-terraincreator.com/

I'm not quite sure how you'd go about importing a huge bmp into PnP-TC, but I imagine there is a way (I've used it for about 5 minutes, some time over a year ago - I did like it though).

Caermundh wrote:As you can imagine, my search for a method to generate large scale terrain has been long and painful. Any advice you can give me is deeply appreciated.


I'd be glad to help. Despite L3DT's problems with loading single large files, it can in fact make maps of the size you desire using the automatic tiling feature - heightmaps up to 128k x 128k, and textues up to 2M x 2M.

Generally speaking, the easiest way to make such a map is to do it from scratch in L3DT using the design/inflate algorithm. However, since you've already done the design stage in PS, you can use L3DT to convert this into a tiled heightfield, but the process is a little indirect:

If you down-sample the image to something smaller (and I recommend 512x512 or 1024x1024, for reasons to be explained), you can import the image as a 'design map' (file->import->design map). Basically, L3DT can take these design maps and convert them into really big, automatically tiled heightfields with all the tricks; erosion, cliffs/terraces, volcanos, etc.

There is somewhat of a tutorial on this here:

http://www.bundysoft.com/L3DT/tute/tute_io.php#import_DM

In the 'import design map' wizard, you'll want to select the 'use disk drive paging' option, which is required for heightmaps larger than about 8k x 8k, and gives you a new limit of 128k x 128k (at the moment). The design map size is 1/64th that of the final heightfield in each direction, so if you have a 1024 x 1024 bitmap your output will be a 64k x 64k heightfield. You can change the 'File->DM sample rate' option to get the desired final heightfield size (shown as 'HF size').

Because a bitmap only has a 0->255 range, and L3DT works in real-world coordinates using floating-point values, you will need to set the altitude range using the 'rescale alt range' option. Otherwise your heightfield will be stretched between 0->255 metres, which would be pretty boring.

Once you're happy with those settings, click 'next >>' to go to the 'design map parameters' wizard, which lets you set the strengths of the terrain generation effects like erosion, noise, etc:

http://www.bundysoft.com/L3DT/tute/tute_newmap.php#WizardPane_Design2

Once you click 'OK' in this wizard, L3DT will generate your design map. You can edit the design map, crudely, using the 'design map pencil':

http://www.bundysoft.com/L3DT/tute/tute_ops.php#design_pencildlg

You can generate the heightfield using the 'Operations->Heightfield->Generate map' option, but before you do that you might want to first try the 'Operations->Heightfield->Generate preview' function, which generates a lower-res version that still looks pretty similar. It's a good way to get a feel for how things will look in the final product, and you can view the results in the 3D-viewer (L3DTVi2). Anyhoo, the preview will still take a lot of time for a map this big (hours, I should think), but it will be a lot quicker than making the full 64k x 64k map with erosion and such, which will probably take a few days.

After you've generated the heightfield, you can go on to generate the texture (etc.) using the 'next >>>' button on the toolbar.

And that's it. Phew, I told you it was a complex procedure ;).

Caermundh wrote:I might even go larger for the next map, say 50k x 50k (If the software could handle that, if not ill live with 20k x 20k or smaller.)


I'd say you'll have to use some tiling there; that's a 10Gb map.

Caermundh wrote:My question for you is should i hold out for L3DT 2.4? if so, whenabouts can i expect its release? if L3DT is not the way for me to go, is there a package/software that you would recommend?


I don't think there's much point waiting for L3DT 2.4 in your case; it will only increase the maximum in-RAM map size to, at best, 32k x 32k (it's 32-bit limited). The tiling system in the current version already lets you go well beyond this limit, so if that's not satisfactory then I don't think I can offer much more.

Oh, and the final release date for L3DT 2.4 is in July, with public betas beginning around April (these dates are subject to change, of course).

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia


Return to Help and support

Who is online

Users browsing this forum: No registered users and 15 guests

cron