Message #6945
Sujet: spéculaire sous irrlicht
| Type | Date | Auteur | Contenu |
|---|---|---|---|
| Création du message | 09-09-2009 08:11:15 | MOg |
si j'ai bien regarder cet exemple , et particulièrement ce passage qui concerne le spéculaire :
We set the shininess of the model to a value other than 0 which is the default value. This enables specular highlights on the model if dynamic lighting is on. The value influences the size of the highlights. if (fairy) { fairy->setMaterialTexture(0, driver->getTexture("../../media/faerie2.bmp")); // set diffuse texture fairy->setMaterialFlag(video::EMF_LIGHTING, true); // enable dynamic lighting fairy->getMaterial(0).Shininess = 20.0f; // set size of specular highlights fairy->setPosition(core::vector3df(-10,0,-100)); fairy->setMD2Animation ( scene::EMAT_STAND ); } To make specular highlights appear on the model, we need a dynamic light in the scene. We add one directly in vicinity of the model. In addition, to make the model not that dark, we set the ambient light to gray. // add white light smgr->addLightSceneNode(0, core::vector3df(-15,5,-105), video::SColorf(1.0f, 1.0f, 1.0f)); // set ambient light smgr->setAmbientLight(video::SColor(0,60,60,60)); mais sa ne m'aide pas beaucoup a savoir si je peu utiliser une map pour le spéculaire , au lieu de ce flag et de ces quelques light qui ne change pas grand chose sur l'objet, de ma scéne que je voudrais faire briller |
| Options | Liens officiels | Caractéristiques | Statistiques | Communauté |
|---|---|---|---|---|
|
Préférences cookies Corrections |
![]() ![]() ![]() ![]() |
Propulsé par Django xhtml 1.0 css 2.1 |
884 membres 1440 sujets 11337 messages |
Dernier membre inscrit: Saidov17 187 invités en ligne membre en ligne: - RSS Feed |