this is my first project.
English is not my native language so please excuse my errors.
For some time i started with Irrlicht and after some coding i have got the idea to write this Random Entity Placement Manager, which places selected meshes randomly all over a terrain (in the future it will be possible to place whole mesh-lists).
Now the Beta-Version is ready (which will be extended).
It places a stated number of meshes with random rotations, random scales and random positions all over a generated terrain but allways taking the water-level into account while placing. (so no tree is planted underwater ). This all is loaded in a very high speed. (even if i had 5k meshes it didnt take longer than some seconds - but it decreased the fps very much).
Till I will make the beta release available I present a short code example how it has to be implemented:
this is for the rts-like first two screenshots:
Code: Select all
IMesh* treemesh = createA3DTree("laubbaum1.a3d", device, true);
IMesh* rockmesh = smgr->getMesh("rock.obj")->getMesh(0);
smgr->getMeshManipulator()->makePlanarTextureMapping(
rockmesh, 0.003f);
ITexture* rocktex = driver->getTexture("1.jpg");
//CRandomEntityManager(Base-Scale, Count of Meshes, currently used device , currently used scene manager,currently used terrain, terrain-heightmap, waterlevel (const s32))
CRandomEntityManager* EntityManager1 = new CRandomEntityManager(10,50,treemesh,0,device,smgr,terrain,heightMap,waterlevel);
CRandomEntityManager* EntityManager2 = new CRandomEntityManager(10,100,rockmesh,rocktex,device,smgr,terrain,heightMap,waterlevel);
Code: Select all
IMesh* treemesh = createA3DTree("laubbaum1.a3d", device, true);
IMesh* rockmesh = smgr->getMesh("rock.obj")->getMesh(0);
smgr->getMeshManipulator()->makePlanarTextureMapping(
rockmesh, 0.003f);
ITexture* rocktex = driver->getTexture("1.jpg");
//CRandomEntityManager(Base-Scale, Count of Meshes, currently used device , currently used scene manager,currently used terrain, terrain-heightmap, waterlevel (const s32))
CRandomEntityManager* EntityManager1 = new CRandomEntityManager(1,500,treemesh,0,device,smgr,terrain,heightMap,waterlevel);
CRandomEntityManager* EntityManager2 = new CRandomEntityManager(5,100,rockmesh,rocktex,device,smgr,terrain,heightMap,waterlevel);