Opimising Irrlicht water scene node
Posted: Sun Jan 22, 2006 5:00 pm
I'm using the following code in my app:
My fps drops from 75 to 60 when I enter the room where this is. The reason is becouse the water scene node is a square. Almost half of this is below the floor. If I change the size to 40, 80, it squashes the waves so that they look like thin lines.
Does anyone know how to make this scene node smaller without killing the look? I've tried playing with the wave height and length, but need a "wave width" to make those work properly.
This is the only thing left in this world that's causing an fps drop.
Thanks for any help.
Code: Select all
//MY LAVA USING IRRLICHT WATER. NEEDS WORK *****************************************
q3levelmesh = smgr->addHillPlaneMesh("myHill",
core::dimension2d<f32>(20,20),
core::dimension2d<s32>(80,80), 0, 0,
core::dimension2d<f32>(90,0),
core::dimension2d<f32>(5,5));
scene::ISceneNode* node = 0;
node = smgr->addAnimatedMeshSceneNode(q3levelmesh);
//waveHeight=2.0f, waveSpeed=300.0f, waveLenght=10.0f
node= smgr->addWaterSurfaceSceneNode(q3levelmesh->getMesh(0), 10.0f, 2300.0f, 40.0f);
node->setPosition(core::vector3df(1700,-1550,-440));
node->setMaterialTexture(0, driver->getTexture("lava.jpg"));
node->setMaterialTexture(1, driver->getTexture("LavaRed.jpg"));
node->setMaterialType(video::EMT_REFLECTION_2_LAYER);
Code: Select all
core::dimension2d<s32>(80,80), 0, 0,
Does anyone know how to make this scene node smaller without killing the look? I've tried playing with the wave height and length, but need a "wave width" to make those work properly.
This is the only thing left in this world that's causing an fps drop.
Thanks for any help.