Page 1 of 1
Metal effect?
Posted: Fri Apr 02, 2004 1:13 pm
by Christoph
Hello!
I would like to know how i can reflect the environment of a rectangle for example. So that it looks like metal. I think there is such an effect in Irrlicht (SphereMap) but i don't know how to use it. Can somebody please help me?!
Thanks for advance!
Posted: Fri Apr 02, 2004 2:10 pm
by disanti
Look at the techdemo. It uses that effect on one of the faries.
________
Mexicocity Hotel
Posted: Tue Jun 08, 2004 12:18 pm
by Honkey Kong
It's probably a little bit late now, but if you're still curious on how to do this, here's some sample code:
Code: Select all
IAnimatedMesh* mesh = smgr->getMesh("modelFile");
IAnimatedMeshSceneNode* anode = 0;
anode = smgr->addAnimatedMeshSceneNode(mesh);
anode->setPosition(vector3df(0, 0, 0));
anode->setMaterialTexture(0, driver->getTexture("modelTexture0"));
anode->setMaterialTexture(1, driver->getTexture("modelTexture1"));
anode->setMaterialType(EMT_REFLECTION_2_LAYER);
anode->addShadowVolumeSceneNode();
smgr->setShadowColor(SColor(50,0,0,0));
Just replace "modelFile" with the filename of the mesh you're loading, then replace "modelTexture0" and "modelTexture1" with your two texture maps, and your mesh should have a normal skin, and a reflection map. Hope this helps you out!