L3DT users' community
Large 3D terrain generator

Happy customer & a few questions

Any and all chit-chat regarding L3DT.

Postby Q-dad » Fri Oct 06, 2006 1:55 pm

Hmm, my latest post from yesterday is missing, so I'll make a repost here...:

To test just how high the 64x64 texture tiles of the texture map can become, I used the contrast tool inside Photoshop on the texture elevation map of one of the grass tiles, making the light pixels (grass) get values ~255, and the dark pixels (ground) get values ~0... The picture below shows that the max height is around 1 meter, or maybe a little bit less...:

Image
Last edited by Q-dad on Fri Oct 06, 2006 2:38 pm, edited 2 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 Oct 06, 2006 2:14 pm

Here's another test which will show several things... I made the test terrain flat, with a 5 pixel wide trench. The areas to the left and right of the trench are respectively 2 and 1 elevation map units higher than the trench. The sides are marked by lines of yellow and green (one pixel each). Inside the trench I have added pink texture tiles with maximum values in the texture elevation map. On each side of the trench I have placed crates which will show more clearly how high the pink texture tiles are compared to the sides of the trench...:


1. This picture clearly shows that the max height of a texture tile is higher than one elevation map unit.
Image


2. This picture shows that the max height of a texture tile seems to be equal to 2 elevation map units, and if we estimate the max height to be around 1 meter, the max altitude of a DF2 terrain will be 128 meters.
Image


3. The last picture shows that even if I made the trench 5 pixels wide, and completely flat, the DF2 voxel terrain engine obviously is trying to smooth out the sharp edges.
Image
Last edited by Q-dad on Sun Oct 08, 2006 12:46 am, 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 » Fri Oct 06, 2006 2:53 pm

The Character Data Map is an ascii file (.CAL) with 256 lines of data. The different lines are referred to by the 256 indexed colors of the detail map, the same way as for the 64x64 tiles of the texture & texture elevation maps... Here are a few sample lines...:

Code: Select all
null,0
Dt2,0
Rk2,0
Sd3,0
Rk2,0
Dt2,0
Sd3,0
Dt2,0
Dt2,0
Dt2,0
Dt2,0
Dt2,0


Each line consists of 2 or 3 values. First there's an alphanumerical code, describing type of terrain, for instance "Dt", which means Dirt. Then there are two integer values, separated by a comma. Whenever there are only 2 values in a line, the first two values are replaced by a "null".

I've figured out all the terrain type codes, and also one of the numerical values, I believe, but all of that was done years ago, and the forum I wrote about it in, was hacked only a few days ago, so until we can get hold of the admin to restore a backup, I won't have access to the data.

EDIT #1...:

Found the terrain type codes in a file on my hard disk...:

Code: Select all
null=?
Sd=Sand
Dt/Drt=Dirt
Gs/Grs=Grass
Rk/Roc=Rock
Sw/Snw=Snow
Md/Mud=Mudd
Ie/Ice=Ice
rd=(rail)Road
Ct/Cmt=Cement


Also found something I wrote in another forum in March 2004, but I'll have to test further to know if it's correct or not...:

However, what do the 2 numerical parameters represent...?

- Could the 1st one be the volume (of footsteps)...?
- Could the 2nd one be the amount of echo/ambience (of footsteps)...?

(The last one has almost always a value of zero... Only exception to that is for the Ct/Cmt lines... AND in the snowy DMS2 terrain, where the last parameter often has values in the range between 15 and 50, or thereabouts...)


Anyway, the first parameter (terrain type) indicates to the game engine which sounds it should play for footsteps and bullet hits, but also if some dirt should be thrown into the air when bullets hit the ground, or if sparks should appear if the terrain type is for instance rock.
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 » Sun Oct 08, 2006 2:42 am

Hi Q-dad,

Wow, thanks for the detailed documentation. I'll try to make plugins for PCX and TGA later this week. Making a plugin to compile everything together is almost possible at the moment, but I need to add a few more features to the plugin API.

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

Postby DR.EVIL~TAG » Sun Oct 08, 2006 4:02 pm

One thing I can say for Q being that I known him for a few years now is he is great in posting and making things descriptive so one can understand right off the bat with out having to do alot of guess work.

This is a great post and great deal. Once I get back hometo where I can actually get the software on my PC I'll be working with it greatly as well. Been along time since I did terrains up for DF2 and this sure would speed things up instead of doing things the long and hard way.

Now are the plugins when available going to be for the standard version as well or just the professional version. Not that it matters to me as I'll be getting the professional anyhow, Just a generic question I thought I would throw out there to you.
DR.EVIL~TAG
New member
 
Posts: 3
Joined: Sun Oct 08, 2006 3:45 pm

Postby Aaron » Sun Oct 08, 2006 4:12 pm

Hi Dr. Evil,

(Thanks for giving me the opportunity to start a post in that way)

Yup, the plugins will be available for both Standard and Professional. Later on, when the plugin API is a bit more sophisticated, I might restrict some advanced plugins for the Pro version, but certainly nothing like a file I/O plugin. Fair question, of course.

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

Postby DR.EVIL~TAG » Sun Oct 08, 2006 4:46 pm

Since there are only 256 possible 64x64 texture tiles, but 1024x1024 = 1048576 pixels


It would actually be 255 possible texture tiles. Being that the color pallet starts of at 0 and ges to 255, These are nasty little buggers I think since each tile is placed in the detailed color map depending on what color is in that section/pixel.

I have had to do the detailed map pixel by pixel just to get the snow/grass where it should be.
Below is my sample of the detailed map :



Image

this is the map that tells where what pixel out of the 64 by 64 are going to be, For example grass, snow, etc etc

Here is an old old terrain making tutorial I wrote up for DF2 along time ago and some is outdated as I found other ways to do things but you may get some info out of it that may be usefule to go along with Q-DADs info.

http://www.txpgone3d.com/txpfiles/df2terraintutorial.zip
DR.EVIL~TAG
New member
 
Posts: 3
Joined: Sun Oct 08, 2006 3:45 pm

Postby Q-dad » Sun Oct 08, 2006 4:55 pm

DR.EVIL~TAG wrote:
Since there are only 256 possible 64x64 texture tiles, but 1024x1024 = 1048576 pixels


It would actually be 255 possible texture tiles. Being that the color pallet starts of at 0 and ges to 255


Actually, the 0 - 255 range represents 256 values, i.e. 0 being the 1st one, 255 being the 256th one... 8)
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 DR.EVIL~TAG » Sun Oct 08, 2006 5:01 pm

LOL Oh I suppose depending on how you look at it LOL.

Will be a great option though and can see this begin great fun. I have plans already stirring around in my head for TXP3 :) , Can't wait till I get back home to give this a whirl. :)
DR.EVIL~TAG
New member
 
Posts: 3
Joined: Sun Oct 08, 2006 3:45 pm

Postby Aaron » Sun Oct 22, 2006 11:37 pm

Hi Q-dad,

I've got TGA support up, but I've run into a little stumbling block with PCX - FreeImage, the library I use for image I/O, doesn't support writing of PCX. I'll have to look around for another lib for the PCX plugin. Also, to complile the texture map and the texture elevation map I'll need to add some more functions to the plugin API for handling climates. Nothing too serious though.

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

Postby Q-dad » Mon Oct 23, 2006 9:53 pm

Hi Aaron,

I don't program in C++, but have you had a look at DevIL ( http://openil.sourceforge.net/ )...? It seems to include PCX import/export.

I'm sorry I haven't had the time to continue my documentation of the DF2 terrain files in here, since I'm still busy building our new kitchen etc... There are a few more things I'd like to investigate, so will do that as soon as possible and post about my findings. In the end, I'll try to make a short summary of the whole thread here.
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 » Tue Oct 24, 2006 4:35 pm

Hi Q-dad,

Thanks for the tip, DevIL looks pretty good. I also found that the CxImage library that I had previously used for JPG/BMP support does support read/write of PCX. This library was a bit bit intensive when compiling and linking with L3DT (particularly with MFC), so I dropped it when I found FreeImage. However, with the plugin system I no longer need to link the lib to L3DT directly, so it *should* be easier now. I'll dust it off and give it a try some time in the coming week, or else switch to DevIL for PCX.

Best of luck with the kitchen!

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

Postby Aaron » Sun Nov 05, 2006 4:08 pm

Hi Q-dad,

I've got a PCX plugin working using CxImage. I'll do a bit more polishing and then upload it sometime tomorrow.

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

Postby DeathTwister » Sun Nov 05, 2006 4:54 pm

OK dum artist here what is a DF2? : txp.df2.org ???? For the plugin dir? what does it do?? Dumb artist asking, looks interesting though /smiles
DT
User avatar
DeathTwister
Dearly missed
 
Posts: 562
Joined: Thu Dec 15, 2005 12:30 pm
Location: Klamath, CA.

Postby Aaron » Sun Nov 05, 2006 5:12 pm

Hi DT,

DF2 is "Delta Force 2", an first-person shooter game. Q-dad and others are modding the game, adding new levels, etc.

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

PreviousNext

Return to General discussion

Who is online

Users browsing this forum: No registered users and 8 guests

cron