Suggested Terrain Scene Node Improvement

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
pwierz
Posts: 59
Joined: Sun Aug 20, 2006 3:32 pm

Suggested Terrain Scene Node Improvement

Post by pwierz »

I've seen in the forums that a lot of people wish they could use heightmaps bigger than 129x129. So I started coding to make a new class that will take a large heightmap (say, 1024x1024) and split it into 129x129 "tiles". Does this sound like something I should continue to flush out? Or is there a fundamental graphics principle that would make this not work?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

There are already solutions which do such things, the tiled terrain managers are made for this purpose. If you find any problems with them you might want ot fix it within those scene nodes.
Another way would be to make the current terrain node work with internal meshbuffer splitting, but I don't know if the LOD mechanism is easily exzensible to using many meshbuffers.
fadi
Posts: 11
Joined: Tue Jan 08, 2008 3:15 pm

Post by fadi »

Hi guys,

I have just started using IrrLicht and I must say great Job to all who contributed.

Reading upon this post, made me thing if it had anything related to my problem which just happend to me a few hours ago when i tried to load the earth's map (bump Map and Texture) at around 2500x2500 pixels.

it makes the terrain come out as a LONG stretched rectangle with no real meaningful terrain surface, its garbage.

any idea what do to?

thanks,

Regards,

Fadi

(P.S, i modified the terrain sample, so i doubt its coding mistakes, since i tried the sample bumpdata and texture and they worked great)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You mean heightmap or bump map? If it's the former you won't succeed with the current terrain scene node. It's limited to 129x129 pixel heightmaps. You have to split the heightmap into smaller pieces (with each of the mentioned size) or use the terrainmesh, which does not provide LOD and other features, though.
fadi
Posts: 11
Joined: Tue Jan 08, 2008 3:15 pm

Post by fadi »

Hi,

i didn't know they were different!! (sorry i am a bit new to all this)
the image is actually a grayscale bmp and the guy who gave it to me (happens to be a graphic designer) had it named bump_earth.bmp
so i dunno is it really a bump bitmap?

thanks
Frosty Topaz
Posts: 107
Joined: Sat Nov 04, 2006 9:42 pm

Post by Frosty Topaz »

Technically you could use it as either depending on what scale we're talking about. The issue though as stated above is the size. A maximum of 65536 vertices can be used in any one mesh. 2500 by 2500 would be 6250000 vertices.

When splitting the image each height map should be 129x129 and each should have one pixel of overlap with its neighbors.

So the top-leftmost heightmap will have the same pixels in its last row as the heightmap below has in its first, and the same pixels in its last column as the one beside it has in its first. And so on.

There are a couple tiled terrain managers around if you search the forums. There's one arras made which should directly handle your full heightmap as it tiles automatically (I beleive).

If you do decide to tile the image yourself don't be too worried if the edges don't match up correctly when you have smoothing turned on. It's a known bug that has been fixed for the next release. For now just turn smoothing off if needed.
Frosty Topaz
=========
It isn't easy being ice-encrusted aluminum silicate fluoride hydroxide...
fadi
Posts: 11
Joined: Tue Jan 08, 2008 3:15 pm

Post by fadi »

Thanks Frosty for the explanation.

hmmm unfrotunately arras's solution (while great and perfect for me) is implemented to work directly c++ developers, and currently I am using the .net wrapper for the engine.

i have NO idea how to make this work using arras's code.
i tried to play around with the wrapper but it won't even build so.. i am a bit stuck here...

any pointers would be appreciated...thanks
Frosty Topaz
Posts: 107
Joined: Sat Nov 04, 2006 9:42 pm

Post by Frosty Topaz »

Well... you could always switch to c++... :P

The best suggestion I would have then is to check if someone made a terrain scene node manager for .net and use it if they have. If not, write your own and post it so others don't have to go through the same stuff next week/month/whenever.
Frosty Topaz
=========
It isn't easy being ice-encrusted aluminum silicate fluoride hydroxide...
fadi
Posts: 11
Joined: Tue Jan 08, 2008 3:15 pm

Post by fadi »

yes indeed,
thats what i did, i am not too knowledgable in c++ but i did do an OpenGL project for the university so I am giving it a try, and I got Arras tiled manager the problem is i can't seem to make it work.

so i'll probably PM him or open a new thread.

Thanks again,

Fadi .K

P.S, i am trying to Load a bumpmap for earth and then put earth's texture on it. do a fly over ...etc
Post Reply