L3DT users' community
Large 3D terrain generator

Happy customer & a few questions

Any and all chit-chat regarding L3DT.

Happy customer & a few questions

Postby Q-dad » Sat Sep 16, 2006 10:20 pm

Hi,

I recently bought the Pro version, and so far I'm very happy with it... :) Ok, I haven't actually done anything with it yet, except for running through the wizard once, producing a fine looking terrain...

I'll start tinkering with the different parameters soon enough and try to get some control over the terrains I'm making. Mind you, I really don't think L3DT will suit my purposes of terrain making to 100%, since I'll be trying to make terrains for an old game engine, i.e. Delta Force 2, and from what I've read in the documentation so far, it doesn't seem like L3DT will be able to produce all of the terrain files required. However, that's only to be expected, since no terrain program will probably do that, unless I make one myself (note to myself, lol)...

L3DT should at least be able to create some of the terrain files needed for DF2, and then I'll see if I can find a way to create the rest of them myself. Thought I should buy L3DT anyway, since after following the forums here since they started (reading every single post), I must say that I have seldom seen a more dedicated & inspiring developer than Aaron, and I believe he deserves all the income he can get from selling the Pro version (and he didn't pay me to say this, lol)... I actually got my first pay cheque recently from my new job, and I thought I'd better buy L3DT before the money was all gone, lol.

Anyway, here's a few questions from a n00b L3DT user...:

1.) In DF2 (Delta Force 2), the terrains are tiled, so is there a way of showing more than one tile of L3DT terrains inside the L3DTVi2...? I mean, since L3DTVi2 doesn't seem to have the ability to do this, is there a way to produce a large L3DT terrain which consists of several smaller terrains tiled together into a big one...? If not, I could of course have a go at adding a tiling feature to L3DTVi2... shouldn't be too hard, I believe.

2. Hmm, this question should probably have been posted in the Feature requests forum, but might L3DT include support for the .pcx and .tga formats in the future...? Or would it be possible for users to make importers/exporters for those file formats in the future, i.e. via the SDK in the to-do lists...? DF2 needs those file formats, and it would be nice not to have to convert to them from the L3DT output files, using 3rd party software.

3. I searched the to-do lists but couldn't find anything about it, i.e. the making roads feature... Will this be added, and in which version might we see it included in L3DT...?

If I have overlooked information already posted regarding my above questions, either in the forums or in the documentation, please forgive me...

More questions from me will surely appear soon in a forum very near you...
:wink:
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Q-dad » Sun Sep 17, 2006 12:01 am

4. I presume heightfields are stored in 16 bits by default.. Is it possible to change that to 8 bits, since DF2 can use 0 - 255 values only...?
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Aaron » Mon Sep 18, 2006 12:58 am

Hi Q-dad,

Thank-you for your support. Whilst I agree that L3DT could never be the complete terrain solution for DF2 (or any other game/program), I am eagre to improve support and compatibility wherever possible, so that L3DT can be easily used in conjunction with the other required programs. I'm not familiar with DF2 mapping, so it'd be great if you could list for me the steps in your mapping pipeline (inc. formats, resizings, flips/rotations, etc).

1) L3DTVi2 does indeed support tiled terrains, but you have to do the tiling in L3DT first. When generating a terrain map, you have to check the 'use disk drive paging (mosaic map)' option (see here). For an existing non-tiled terrain map, you can use the 'operations->active map->split to mosaic' option (see here). However, the only terrain format supported by L3DTVi2 is the 16-bit HFF format (which is default in L3DT). That's something worth bearing in mind, as L3DTVi2 crashes when the wrong file formats are used.

2) I've put TGA and PCX on the to-do list for the next release. Could you give me a list of the formats for each map? (eg. heightfield in X, texture in Y, alpha maps in Z.)

On a related subject; I'm presently developing a plugin system for L3DT so that, ultimately, there could be plugin that provides an 'export to DF2' option in the menu, which could do all the format stuff, resizing if required, etc. The same goes for other games/programs. The next release includes a demo of the plugin system, whereby several formats will included via plugins.

3) To be honest I can't exactly say when I will add the roads feature, other than to say "probably next year". For the remainder of this year I think my dance-card is filled with developing the plugin system, making better paintbrush tools (inc. the heightfield), and developing a new 3D renderer. Roads are next on the list after those three.

4) Certainly. What file format do you want to use for the heightfield? Those that support 8/16/32 bit modes should have such an option, which you can access from the 'options' button in the export wizard.

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

Postby Q-dad » Mon Sep 18, 2006 10:06 pm

Hi Aaron,

Thanks for your lengthy reply. I'll answer 1) tonight, but will need to spend some time digging up correct & detailed information for 2) and 4)... Will be back with more in a couple of days. No worries about the roads, and the plugin system sounds very interesting... :)

1) I guess I should have been more precise regarding the tiling, since what I really meant was that a DF2 terrain has only one big tile (1024x1024) which tiles seamlessly in all 4 directions as far as one can see inside the game. So, when creating one such tile with L3DT, only that one tile will show inside L3DTVi2, and thus one won't really get a good impression of how the border areas will look like. So, I was looking for a way to show more than one identical tile next to each other inside L3DTVi2, but I guess it's not possible, unless I'm able to add it as a new feature to the program.
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Aaron » Thu Sep 21, 2006 12:59 pm

Hi Q-dad,

Okie dokie, I get what you mean by tiling now. L3DTVi2 used to do this, but I seem to have broken it somewhere along the way with my infernal and incompetent meddling. Alas, I no longer have access to a copy of Delphi, so I can't un-tinker that change now (unless I grab Lazarus or FreePascal and start learnin' again). To be honest I'm really quite inclined to write-off any further development of L3DTVi2 and start on the C++ replacement.

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

Postby Q-dad » Thu Sep 21, 2006 4:56 pm

Np, Aaron... I'll see if I can figure out how to put the feature back into L3DTVi2. My only problem now is the lack of time, since we've just bought ourselves a new IKEA kitchen here, and my wife is kind of giving me some hints about priorities of life every now & then... :wink:
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Q-dad » Wed Sep 27, 2006 9:29 pm

Ok, I'll try to answer 2) and 4) the best I can below, and I'll start out showing an example of the ascii file which tells the game engine which files to use for rendering a specific terrain. These ascii files are named <terrain_name>.TRN, and here's how the original DFD2.TRN file looks like (comments in red for the files which matter in this context, added by me)...:

-------------------------------------------------------------------------------------
terrain_name "Desert Two"
terrain_creator "Jason Tull"

color_map dfd2_c --> Color Map (JPG)
elev_map dfd2_d --> Elevation Map (PCX)
detail_map dfd2_m --> Detail Map (PCX)
detail_color dfd2_cm --> Texture Map (TGA)
detail_elev dfd2_dm --> Texture Elevation Map (PCX)
char_data dfd2_cm --> Character Data Map (CAL)
sky_map clouds01
sky_palette skygrd01
sky_height 1236
horizon 1

water_map ripple1
water_height 0

filter 128, 128, 128
gamma 128
saturation 128
sun_slope 70
-------------------------------------------------------------------------------------

(I'll zip the terrain files together and PM you the URL, Aaron)

I'll post about each of those commented files in my next posts below, including file formats etc.
Last edited by Q-dad on Wed Sep 27, 2006 10:25 pm, edited 1 time in total.
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Q-dad » Wed Sep 27, 2006 10:05 pm

The Color Map is the skin of the elevation map, and is a 1024x1024, 24/16 million, 72 ppi, JPG file. The DF2 terrains are tiled seamlessly in all directions, and one pixel equals around 0,50 meters, I believe, so not a lot of space to fight wars on, hehe. Anyway, DF2 gameplay is usually concentrated in small areas, so the players won't really notice that the terrain is repeating itself in all directions. Depending on the terrain layout, you won't even spot the repeating of the terrain, unless you're standing on top of a high hill.

The Elevation Map (or heightmap) is a 1024x1024, 8-bit/256 grayscale, 72 ppi, PCX file. This should also tile seamlessly in all directions, of course. With only 8 bits, the highest point possible will have a value of 255, which would equal around 128 meters, I believe. No Mount Everest terrains in DF2, in other words. However, due to the limited size of the terrains, 8 bits is quite suitable for the elevation, also because the voxel terrain is not very good at rendering very steep mountain sides (since the color/texture of each pixel is projected directly from above).

The next files are a bit tricky to explain, and it's past midnight here, so I'll save them for another day...
Last edited by Q-dad on Thu Sep 28, 2006 10:47 pm, edited 1 time in total.
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Aaron » Thu Sep 28, 2006 2:18 pm

Hi Q-dad,

Thanks for the info. As a start I think I can bash together suitable PCX and TGA export plugins without much trouble. When they're happy, I'll look at adding another plugin for handling the complete compositing of the maps and writing the text files (this will require some improvements to the plugin API too, which I am more than happy to make).

Unfortunately, I probably won't be able to start on this until at least the end of next week, as I've just been told of a surprise presentation I'll be giving at work next week, for which I must now prepare.

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

Postby Q-dad » Thu Sep 28, 2006 3:06 pm

Sounds great, Aaron! And no worries about the time line. I will add the information about the other terrain files tomorrow. Good luck with your presentation! :)
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Q-dad » Thu Sep 28, 2006 10:46 pm

Before starting to explain the rest of the DF2 terrain files, here's a link to the Color Maps for the terrains (most of which are converted from other old Novalogic games) we're including in our upcoming mod for DF2...:

http://txp.df2.org/gallery/thumbnails.php?album=3 (click on each of them to see a larger picture)

Btw, I forgot to tell that DF2 doesn't compute shadows in-game, so any terrain shadows would need to be implemented in the color map from the start. That doesn't matter, since in DF2, the sun's not moving either, hehe...

Now on to the tricky (at least to me) business...:

The Texture Map is a compilation of the color maps of the detailed terrain texture tiles, and is a 64x16384, 24/16 million, 200 ppi, TGA file, with an alpha channel. It consists of 256 independent 64x64 texture tiles, and these are used by the game engine for rendering a more detailed terrain surface.

Each such 64x64 texture tile equals 1 pixel in the color map, and the game engine blends together the background color from the main low detailed 1024x1024 color map with the 64x64 texture tiles of the texture map. Most probably the content of the alpha channel decides the level of relative blending between them.

Since there are only 256 possible 64x64 texture tiles, but 1024x1024 = 1048576 pixels, the different 64x64 texture tiles must be used at many locations to cover the whole 1024x1024 map, and which pixels are textured in-game by which 64x64 texture tile is desided by the contents of the detail map, which will later be described below in another post.

EDIT:

Forgot to mention that...

a) The first 64x64 texture tile in the texture map is always black. Also, towards the end there are usually several other black tiles, and these I believe are reserved for special purposes, i.e. for adding special non-terrain type of texture tiles used for artifacts like railroad tracks etc. The number of reserved tiles towards the end is not the same for all texture maps, in fact it seems to be different for each one, depending on how many texture tiles were needed for each of the terrains, I guess.

b) Some of the texture tiles will tile seamlessly in all directions, while others will tile seamlessly only in 3, 2 or 1 direction(s), and yet others won't tile seamlessly at all. This depends on what they're being used for, of course...:

- The 4-direction seamless tiles are used for areas of the terrain where the color of the adjacent pixels of the color map is identical on all sides.

- The other seamless tiles are used for areas of the terrain where only the color of 1, 2 or 3 of the adjacent pixels of the color map is identical, i.e. where you have a transition from desert to green, desert to snow, green to snow, etc...

- The non-seamless tiles are used for areas of the terrain where none of the adjacent pixels of the color map have the same color, i.e. if there's a small dash of green in the middle of desert, etc...
Last edited by Q-dad on Mon May 14, 2007 5:41 pm, edited 3 times in total.
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Q-dad » Fri Sep 29, 2006 11:53 am

The Texture Elevation Map is a compilation of the elevation maps corresponding to the color maps of the detailed terrain texture tiles in the texture map, and is a 64x16384, 8-bit/256 greyscale, 200 ppi, PCX file. It consists of 256 independant 64x64 elevation maps, and these are used by the game engine for rendering the elevation of the texture tiles.

Each such 64x64 elevation map corresponds to 1 pixel of the main 1024x1024 elevation map, and the game engine adds the values inside each 64x64 elevation maps to the corresponding value of the 1024x1024 elevation map. A min value of 0 (black) means no addition, and a max value of 255 (white) means an addition of 1, I believe, to the corresponding value of the 1024x1024 elevation map. That means that the max addition would be around 0,5 meters. I'll test this later on and show some in-game pics.

Since there are only 256 possible 64x64 elevation maps, but 1024x1024 = 1048576 values in the main elevation map, the different 64x64 elevation maps must be used at many locations to cover the whole 1024x1024 map, and just like for the texture map, which 64x64 elevation is used where is also decided by the contents of the detail map, which will later be described below in another post.

DF2 uses a voxel terrain engine, which means that it renders the top surfaces of 1024x1024=1048576 columns, and the basic heights of these columns are of course defined by the 1024x1024=1048576 height values inside the main elevation map. The background color of the top surfaces are similarily defined by the 1024x1024=1048576 pixels inside the main color map. Anyway, I'm not completely sure how it deals with the fact the height values are points in space, while the column surfaces are exactly that, i.e. surfaces. I guess it uses 4 of the height values as corner values for each of the top column surfaces. I can test this as well later on and show some pics.

Anyway, the addition of the detailed texture tiles and their corresponding elevation maps makes the DF2 terrains much more realistic than if only rendering the main color and elevation maps. It's being used primarily for rendering grass and rocks/gravel, but it can also be used for rendering railroad tracks, concrete floors, roads, air fields, etc. Mind you, since these extra elevated structures won't be solid in-game, it's not wise to make them very high, since then the players can hide inside them. Grass is an exception, since it's natural to walk through and hide in grass. Will show example pics later on, but first I'll try to describe the detail map in my next post...
Last edited by Q-dad on Mon May 14, 2007 5:44 pm, edited 1 time in total.
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Q-dad » Sat Sep 30, 2006 12:41 am

The Detail Map tells the game engine which 64x64 texture map tiles to render at which parts of the terrain, as well as which corresponding 64x64 elevation maps to use for those tiles. It's a 1024x1024, 8-bit/256 color, 200 ppi, PCX file. The 256 color palette is used as an index into the texture & texture elevation maps, i.e. each of the 1024x1024 pixels in the detail map has a color among the 256 colors in the palette, and each of those 256 colors in the palette (values from 0 to 255) points to a texture tile number in the texture map, as well as to an elevation map number in the texture elevation map.

Before I move on with tests and pics in more posts below, I'll just mention that I've edited the texture map post above, adding a few things that I forgot to mention initially...

I really ought to do something about that IKEA kitchen laying around here in parts, hehe... Will get back to the tests and pics at the beginning of next week. Might add some info about the less important terrain files as well, i.e. the character data map, sky map, sky gradient and water map...
Last edited by Q-dad on Mon May 14, 2007 5:45 pm, edited 1 time in total.
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Q-dad » Tue Oct 03, 2006 12:34 pm

I finally figured out that most probably it's the alpha channel of the texture map which decides to what degree the texture tiles should blend in with the color map. I have corrected the post above about the texture map accordingly.
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Q-dad » Wed Oct 04, 2006 12:20 am

I've done some testing to see what happens if I manipulate the alpha channel of the texture map and/or the texture elevation map... The purpose being to see if the results fits with the theory in the above posts... Pics & comments below...:


1. First a picture from the DF2 map editor (MED), where I have zoomed in on a spot on the map, showing the color map...:

Image


2. In the MED, you can check the "Characters" box, and provided you've zoomed in enough, you'll then see the texture tiles of the texture map instead. Here's a picture from the same spot, and zoomed in just as much...:

Image


3. Now, let's have a look at 2 in-game pitures from the same spot, and with no files manipulated so far. They show a mixture of colors from the color map and the texture map...:

Image

Image


4. I then made the alpha channel of the texture map totally black. Nothing changed inside the MED, but here are the 2 updated in-game pics. Clearly something has changed, but it doesn't seem like only the colors from the color map is showing. It should have been more like the MED picture in 1.) above, so the theory can't be 100% correct...:

Image

Image


5. I then made the alpha channel of the texture map totally white, to see if only the colors from the texture map would show. To me it looks like that's exactly what happens (btw - nothing changed inside the MED), and the in-game pictures look very much similar to the MED picture in 2.) above...:

Image

Image


6. Then I put back the original alpha channel but instead made the texture elevation map totally black, to see what happened... Nothing unexpected happened inside the game, i.e. the terrain became flatter but kept the mixture of colors between the color map and the texture map, it seemed. However, something weird happened inside the MED when zoomed in and showing the texture tiles, and I don't have any explanation for it...:

Image

Image

Image


7. Anyway, I then made the alpha channel black again, and kept the texture elevation map black. Nothing changed inside the MED, and again it should have looked more like the MED picture in 1.) above if our theory was correct...:

Image

Image


Conclusion...:

a) It seems like the blending of the color map and the texture map is decided by the content of the alpha channel, but it doesn't seem like black will totally stop the texture map colors from being rendered.

b) The texture elevation map might be used for more than I thought, due to the weird result in 6.) above.


I'll test more regarding max height for the texture elevation map tomorrow...
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Next

Return to General discussion

Who is online

Users browsing this forum: No registered users and 8 guests