L3DT users' community
Large 3D terrain generator

Format of HTF File

Any and all chit-chat regarding L3DT.

Format of HTF File

Postby deendayal » Mon Apr 02, 2012 3:05 am

Hi All,

I Want to convert a raw terrain file(.asc) into an HTF file in order to use in GLSCene .Could anyone help me knowing the format of an htf file and the help me with the source code of converting an asc file to htf file.

Thank You
deendayal
New member
 
Posts: 2
Joined: Mon Apr 02, 2012 2:58 am

Re: Format of HTF File

Postby Aaron » Tue Apr 03, 2012 9:28 am

Hi deendayal,

The HTF file format is not documented anywhere other than in the GLScene source code as far as I can recall. It was, however, nearly a decade since I last dabbled in this area, so my recollection may be unreliable. For what it's worth, you can find the C++ source code for the HTF exporter in L3DT over here:

http://www.bundysoft.com/L3DT/downloads/plugins/src/L3DTio_HTF-src.zip

The HTF files are written in the 'zeoSaveMapFile' function, which is defined in the 'L3DTio_HTF.cpp' file. Please note that this HTF exporter only supports 16-bit raw height encodings, and not GLScene's adaptive diff / RLE / diff+RLE compressed encoding schemes. I don't remember the precise details of those encoding formats, so I can only recommend you take a look at the GLScene source code (linky) if you want to support height compression in HTF files.

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

Re: Format of HTF File

Postby deendayal » Wed Apr 04, 2012 2:03 am

Thanks AAaron. It was really helpful.....

Another quick question...

I want to Use a DTM file (which is in the grid format where each cell has x,y values and the elevation/height) . How can i convert this to an htf File or can i use the DTM file directly in the GLScene to get a 3D display.............Could you please help me with this.

Thank You
deendayal
New member
 
Posts: 2
Joined: Mon Apr 02, 2012 2:58 am

Re: Format of HTF File

Postby Aaron » Fri Apr 06, 2012 4:46 pm

Hi Deendayal,

I'm not an expert in GLScene (haven't used it in years), so I'm not sure whether it can load DTM files directly. I doubt it though. You could of course write a DTM loader module in GLScene, but that may be easier said than done.

One pathway to getting your height data into GLScene would be to convert the DTM file into a format that L3DT can read, and then use L3DT to generate your HTF file for GLScene. Software should exist that can convert DTMs into GeoTIFF, BT or TER, for example. Have you tried VTBuilder?

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


Return to General discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron