chaitanyaraghav wrote:I have a small doubt
in blender if we create a small city or something similar we also add the environment i.e the sky textures.now if we import this into irrlicht do we have to again use skyboxes or will the textures of the sky be automatically loaded.
How do i create a dynamic environment i.e day and night cycles?
dont know if its correct but should i create skyboxes for different times of the day and then load it according to the time in the game?
Any simpler method?

You should create skyboxes inside of the Irrlicht engine. It's not hard, and there are tutorials that show you how. For a day/night cycle I'm guessing the easiest way would be to fade between them.
Anyways, A Skybox:
Code: Select all
// add a nice skybox
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
smgr->addSkyBoxSceneNode(
driver->getTexture("../../media/irrlicht2_up.jpg"),
driver->getTexture("../../media/irrlicht2_dn.jpg"),
driver->getTexture("../../media/irrlicht2_lf.jpg"),
driver->getTexture("../../media/irrlicht2_rt.jpg"),
driver->getTexture("../../media/irrlicht2_ft.jpg"),
driver->getTexture("../../media/irrlicht2_bk.jpg"));
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
// add a camera and disable the mouse cursor
scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS(0, 100.0f, 100.0f);
cam->setPosition(core::vector3df(-100,50,100));
cam->setTarget(core::vector3df(0,0,0));
device->getCursorControl()->setVisible(false);
For higher quality you'd of course want to find some very high resolution TGA or PNG skybox imagery.
If you you need a more realistic sky solution, though, you may need to look harder.
You may be able to tie the skybox images used in with the levels, too though. Metadata can be handled with XML - I don't know if you can embed metadata in Irr files or how to use them, though, sorry.