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?
Environment[solved]
-
- Posts: 12
- Joined: Mon Jul 07, 2008 4:26 pm
- Location: India
Environment[solved]
Last edited by chaitanyaraghav on Sun Sep 07, 2008 4:18 am, edited 1 time in total.
Nobody is perfect!!
nd i am nobody!!
nd i am nobody!!
Re: Environment
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.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?
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);
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.
Making a realistic day/night cycle is pretty difficult. Thankfully Pazystamo already did most of the hard work-
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=10769
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=10769
-
- Posts: 12
- Joined: Mon Jul 07, 2008 4:26 pm
- Location: India
Re: Environment[solved]
Thanks for the reply!nmn wrote:
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:For higher quality you'd of course want to find some very high resolution TGA or PNG skybox imagery.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);
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.
i have already used the skyboxes in the media but they were looking a bit artificial. so i thought of dynamic environment!
Thanks for the help!bitplane wrote:Making a realistic day/night cycle is pretty difficult. Thankfully Pazystamo already did most of the hard work-
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=10769
this was what i was looking for!
Nobody is perfect!!
nd i am nobody!!
nd i am nobody!!