Generate terrain by heightmap or load a mesh?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Generate terrain by heightmap or load a mesh?

Post by r2d2 »

What do you think is better?
I tend to say that loading a mesh would be better and perhaps a little bit faster and nicer but i am not really sure. I hope that this topic will be well discussed ^^
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
AssiDragon
Posts: 158
Joined: Wed Apr 28, 2004 11:03 am
Location: Hungary
Contact:

Post by AssiDragon »

Generating terrain from heightmap is a better way to go imho - that's if you can get more heightmaps loaded in at once (so you can create overhangs).

Loading in a whole mesh as terrain can get ugly when you try to apply LOD and other feats like that...
Staring through eyes of hate we kill
Are we controlled, or is our own will...?
(Edguy)
Guest

Post by Guest »

i think loading from a heightmap is the better solution. for me its easier, faster - and the filesize is veeerry small. and you can set the terrain size etc. directly after its created in code. i guess every modern engine loads their terrains from heightmap :(
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Post by r2d2 »

Yeah sure if you look at other engines then using heightmaps is normally much better but what about irrlicht?
It takes somehow very long to load a single heightmap and with 50000 polygons irrlicht is already at the maximum it can draw on a GF4 without dropping the FPS under 25.
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
Guest

Post by Guest »

then you are doing something wrong. my terrain looks really nice and runs pretty damn fast (250-300 fps in D3D9, 125-150 in OGL). it takes more time to load the irrlicht level as load my terrain, so i cant say that terrain takes long to load.
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Post by r2d2 »

oh i noticed where the problem is lod or something comperable is not implemented. and there is another problem loading heightmaps with a sice bigger than 128x128 takes VERY VERY long but i need a much bigger terrain
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
Guest

Post by Guest »

then why dont you scale it bigger? :)

Code: Select all

	terrain = smgr->addTerrainMesh("terrain",
		terraintexture,				//For texturing
		terrainheightmap,			//Heightmap
		dimension2d< f32 >(128.0f, 128.0f),	//Stretchsize
		2000.0f,				//Maxheight
		dimension2d< s32 >(128, 128));		//defaultVertexBlocksize
look at the line "Strechsize", there you can define the size of the terrain. i have choosen 128.0f,128.0f :wink:
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Post by r2d2 »

yeah i know that but if you stretch your terrain you have less detail and i need detail in the terrain because it should be a under water world with deep craters in it
using stretch size makes the terrain but you will get less detail on the other side using a bigger heightmap gives you much more detail but it task much much longer to load a 512x512 heightmap takes at least 2 mins to load :( not very fast
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
Post Reply