Hello its me again its been a while since ive asked any questions here and hope that I can get some answers on this topic..
Id like to create very large terrians that span for to seem many miles...
How does one go about doing that with irrlicht...
I can create small patches of terrian no problem at all but I sure hope I dont have to lay parts one a time and line them up that would suck lol..
I do know that my terrian will have unique textures that will be different In other locations and that some of my terrian just might have to be of diff parts and this is understandable...
But how can I create just a standard mountainous type terrian that covers a very large area..?
I was kinda kicking around the idea of maybe making a very large globe with hightmap and scaling it quite large and just adding the gravity and collistion to it...
But im not sure how the gravity will work...Would the camera just fall off when you walked to far around the globe or is there a way to set up the gravity to pull to your terrian and keep the camera pulled to the terrian even on the bottom side of the very large globe..?
Im also sure ill want to figure out the far clip settings that set the distance of rendering and maybe even add some fog to mask the rendering effects as you walk forward...
Any help would be great thanks...
How do you create very large seemless terrians?
About gravity and collistion - camera will falling down . But what will be if when rotating of globe instead moving of camera is used /only a idea.../?
Another idea - you can move camera around globe by mathematics functions about path and dynamical change of x,y,z values of gravitation compared to current position. Also i think that target of camera must also changed by this way.
This is very interesting, but currently I have not enought time. Maybe someone will give better sollution.
If second idea is used, these maths must be applied for alls moving objects in this world.
Another think - will be possible set only gravitation on center of globe?? Some like IGravitySceneNode? But why you not use any physics engine for that?
Another idea - you can move camera around globe by mathematics functions about path and dynamical change of x,y,z values of gravitation compared to current position. Also i think that target of camera must also changed by this way.
This is very interesting, but currently I have not enought time. Maybe someone will give better sollution.
If second idea is used, these maths must be applied for alls moving objects in this world.
Another think - will be possible set only gravitation on center of globe?? Some like IGravitySceneNode? But why you not use any physics engine for that?
For very big terrains the best way is to make them like that:
In first dimension2d you have the scale of terrain, so you can have enormous terrain but scaled a lot of times, the second dimension2d is for your heightmap size, and 8000.0 f is for your selected height you want to have in 3d. I think this is the best way to do it, and the fastest way, beucause Irrlicht's physics loads fast with 64x64 heightmap and also the framerate is excellent when having a mega scaled terrain.
Code: Select all
IImage *tmap = driver->createImageFromFile("data/maps/tergrey.bmp");
IImage *ttex = driver->createImageFromFile("data/maps/tetexgrey.jpg");
IAnimatedMesh *terrain = sm->addTerrainMesh("terrain",
ttex, //For texturing
tmap, //Heightmap
dimension2d< f32 >(1024.0f, 1024.0f),
8000.0f,
dimension2d< s32 >(64, 64));
if(!terrain)
printf("Failed to create terrain\n");
TerrainNode = sm->addAnimatedMeshSceneNode(terrain);
if (TerrainNode)
{
TerrainNode->setMaterialFlag(EMF_LIGHTING, false);
TerrainNode->setPosition(core::vector3df (-1000.0f,0.0f,-1096.0f));
TerrainNode->setVisible(true);
}
mapSelector = sm->createOctTreeTriangleSelector(terrain->getMesh(0), TerrainNode);
TerrainNode->setTriangleSelector(mapSelector);
Thanks for the info ill work with it some, Im sure that maybe I can set the scale to repeate the terrian so many times and then maybe even add a second terrian or third this way too maybe...
That way it not just the same terrian over and over again..
But if I scale it large enough you wont notice anyway but ill work with it..
And for the far clip settings ill post another post and ask that as a different topic..
Thanks everyone for your help
That way it not just the same terrian over and over again..
But if I scale it large enough you wont notice anyway but ill work with it..
And for the far clip settings ill post another post and ask that as a different topic..
Thanks everyone for your help
TerrainNode is an
ISceneNode *
And Irrlicht isn't really ready to handle "really big" terrain. You'll have to hack around to get decent large terrain like you see in, say, Tribes games.
This is because you can't pump down a raw large terrain mesh through your AGP bandwidth. It just won't fit.
You have two options. 1) Use an algorithim to cut away extra triangles and bring down the visible terrain to a specific triangle limit. 2) Put the whole terrain into a VBO.
Neither of those will work too great with Irrlicht as it is. Irrlicht does have a terrain scene node, but it's a bit funky.
Anyway...just my ramblings.
ISceneNode *
And Irrlicht isn't really ready to handle "really big" terrain. You'll have to hack around to get decent large terrain like you see in, say, Tribes games.
This is because you can't pump down a raw large terrain mesh through your AGP bandwidth. It just won't fit.
You have two options. 1) Use an algorithim to cut away extra triangles and bring down the visible terrain to a specific triangle limit. 2) Put the whole terrain into a VBO.
Neither of those will work too great with Irrlicht as it is. Irrlicht does have a terrain scene node, but it's a bit funky.
Anyway...just my ramblings.
I've implemented a very good GeoMipMapped terrain scene node for Irrlicht, which uses CLOD ( Continuous Level of Detail ).
Check out the forum post here -
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=5166
and my webpage here
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=5166
Check out the forum post here -
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=5166
and my webpage here
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=5166