Help with Terrain Rendering

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Mong

Help with Terrain Rendering

Post by Mong »

hi, everyone.

I am currently doing one HLA military simulation research project based on game engine to put HLA in 3D envirements. I want to find out which tools is useful for me so that I can create a huge amount of terrain data and show it in Irrlicht. Can anyone suggest to any tools for me? Thank you for looking at my Q.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Heh, I've used HLA, it stinks! Sorry you have to deal with it, was so much easier just using DIS.

We use an application at my work called SVS, written by a company called AIS. They have DIS and HLA support. Maybe look into that. Other than that, you would have to generate terrain data from whatever terrain data source you have!

What is it may I ask? CTDB, ESRI Shape Files, there's so many different formats out there. If I knew the specific format your terrain data is in, I might be able to help you more.
Mong
Posts: 8
Joined: Sat Dec 18, 2004 1:20 am

Re: Help with Terrain Rendering

Post by Mong »

It is so nice that some one can help me with that. Thank you in advance. What I want to do is display some GIS data by using Irrlicht to show it.

By the way, can u explain to me why HLA stinks? it is based on RTI and HLA is a modeling architecture so far from my understanding. Correct me if I am wrong since I am just started to due with this project 1.5 month.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

I used HLA/RTI about 3-4 years ago on some projects. It's just a very bad implementation, or rather it was. About a year to a year and half ago, DMSO gave it out to commerical companies, like Mak and others. SAIC, you developed the original RTI code ( BTW, HLA is the architechture design and RTI is the implementation of it ), did a very bad job with it.

Anyways, I'll look into GIS data and see what I can dig up about it.
Mong
Posts: 8
Joined: Sat Dec 18, 2004 1:20 am

Post by Mong »

Thank you for that. And I will try to write some code to load the height map and modeling first. I think I forgot to tell you that the GIS data part is one of the possible project goal. The point is to find out what is the fast way for me to gerenate the terrain data and load that in the prototype no matter what data format is. Because my project only last 3.5 months, I need to do it quite.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Check here, with the GLOBE data ( which is in RAW 8bit format ) you could load as a heightmap and display a HUGE amount of world space ( actual Earth too ).

I think the terrain engine I have in my current game would work well tiling out this data, I'm gonna play with it a bit as well. If it's not what you're looking for, or you need some other kind of data, let me know and I'll find more for you.

http://www.ngdc.noaa.gov/seg/topo/topo.shtml
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

BTW, I'm just curious, which version of RTI are you using? Haven't even looked at that stuff in a long time, wonder if it's gotten much better being a commercial product now!
Mong
Posts: 8
Joined: Sat Dec 18, 2004 1:20 am

Post by Mong »

From the DMSO website, it has 4 vendors. So I went to those websites and download one trival version of RTI from http://www.pitch.se/prti1516/downloadle.asp
For this short project, trival version should be enough.
I will check GLOBE data out. By the way. what terrain engine are u using?
Thank you very much.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

We use ESRI ArcMap Shape files, as well as DTED and CTDB version 8.
Mong
Posts: 8
Joined: Sat Dec 18, 2004 1:20 am

Post by Mong »

I had a look at those GLOBE data. I downloaded one of them and try to load it into my application which is just one model in it. The result is give me
Unhandled exception at 0x00401205 in FirstPrototype.exe: 0xC0000005: Access violation reading location 0x00000000.

And my code is just like this :
IImage* iTerrain = driver->createImageFromFile("../media/fire.bmp");
IImage* iHeightMap = driver->createImageFromFil("../media/AU&NZMap");


IAnimatedMesh* iTerrainMesh = smgr->addTerrainMesh("iTerrainMesh", iTerrain,iHeightMap, core::dimension2d< f32 >(10.0f, 10.0f),1500.0f,dimension2d< s32 >(64, 64));

ISceneNode* iTerrainNode = smgr->addOctTreeSceneNode( iTerrainMesh->getMesh(0) );

This code loads fine with the others jpg, bmp files.

And I can not find any information about what defaultVertexBlockSize do in the addTerrainMesh method also.
Thank you
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

The data you get from GLOBE is just the binary data, not a .BMP file. You would need to generate a .BMP file from the data or write a custom interpreter to parse the binary data. The GLOBE site talks about how the data is formed.

Come to think of it, I think they actually explain the process of how to convert the data to .BMP in Adobe Photoshop, let me see if I can't find the link to that....
Mong
Posts: 8
Joined: Sat Dec 18, 2004 1:20 am

Post by Mong »

O......I donot have Adobe Photoshop. So I can not convert that to bmp from that file. However, I can use the other software to convert those image that they post online as form .gif to .bmp. and I can display them without the correct height. Please tell me whether the photoshop data works. And Is it possible to send me the bmp file?
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Obtaining and Importing GLOBE Data -

http://www.ngdc.noaa.gov/seg/topo/report/s11/s11G_.html

Importing into Adobe Photoshop -

http://www.ngdc.noaa.gov/seg/topo/report/s11/s11Gx.html

I have Photoshop, so if you need me to convert a certain area to a .bmp for you, just let me know, or send me the data that you downloaded.
Mong
Posts: 8
Joined: Sat Dec 18, 2004 1:20 am

Post by Mong »

Thank you for your help then. I just send you my mail box in teh private message.
Post Reply