L3DT users' community
Large 3D terrain generator

Looking to import custom image file.

Got a problem or need advice?

Looking to import custom image file.

Postby BlackHawke » Sun Jun 10, 2007 8:13 pm

I have a BMP image file, which I would like to import into L3DT.

The problem is I couldn’t find a key – that is to say, this map has its own color scheme – different shades of yellow represent desert at different heights, blue is water at different heights, light green is a field, dark green a forest.

There’s plenty of information on how to import a .bmp design map, but none that I could find on what pixel colors are supposed to represent what. I need to convert this BMP into something that L3DT can read (if I try to import it as is, L3DT tells me that the map is zero sized).

I have a key, so I know what pixel represents what terrain at what height, but my key is obviously different than L3DT’s key (what pixel my map considers a desert at 10 meters or snow at 50 meters is not necessarily what L3DT considers that). I’d like to translate this map into a bmp each for height map and design map that L3DT can understand (or plug the 256 height and terrain combinations INTO L3DT so that it can accurately read the file).

Any thoughts?
BlackHawke
New member
 
Posts: 2
Joined: Sun Jun 10, 2007 7:56 pm

Postby BlackHawke » Sun Jun 10, 2007 8:48 pm

Here's a .jpg of part of the file I want to use for the design map:
Image
With, for example, information on the bmp like (Terrain Name="Forest" ID="66" TileID="196" R="0" G="90" B="120")

Then the heightmap.
Image
Where Altitude="100" R="192" G="0" B="192" (IE 100 meters = r192 and B192), but these are NOT the values L3DT uses, and I cant figure out what values it DOES use so that I can change them (either in the BMP, which would not be fun, or in L3DT, so that it can read the file correctly)


Any thoughts?
BlackHawke
New member
 
Posts: 2
Joined: Sun Jun 10, 2007 7:56 pm

Postby Aaron » Tue Jun 12, 2007 3:49 am

Hi BlackHawke,

L3DT doesn't support indexed colour images as design maps. Normally when you import a design map from an image, all you're importing is the height component as a greyscale, which ranges from black (lowest altitude) to white (highest altitude). The other components of the design map, such as fractal/peak roughness, cliff overlays, lake seeds, volcanos, climates (desert, grassland, etc), etc are all generated automatically by L3DT and/or manually using the design map brush. Design maps are 80 bits/pixel, so they're not readily convertible to/from images.

So, what to do? If pixel exactitude is important, you could either write a binary plugin (C++ required) a script (Python required) to do the image->design map conversion using your colourkey. My recommendation, however, would be to create a new map project using the 'design/inflate (blank)' algorithm, then load your image as an image drape, and transcribe your design using the design map brush. A guide to map design is given in the fjord tutorial.

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

cron