This technique works with dotScene maps exported from 3dsmax through octopus… First. Make sure you've exported the map with enabled shadows… otherwise i don't guarantee this is going to work ^_^

using namespace yake;
///---------------------- these variable u need;
graphics::ICamera*	cam;
graphics::IEntity*  player;
graphics::ISceneNode* playerSN;
graphics::ILight*	plLight;
graphics::ISceneNode* plLightSN;
SharedPtr<graphics::IWorld> mgrWorld;
//---------------------------------------- this what functions u need
playerSN = mgrWorld->createSceneNode("RobotPlayer");
player = mgrWorld->createEntity("robot.mesh");
playerSN->attachEntity(player);
plLight = mgrWorld->createLight();
plLight->setType(graphics::ILight::LightType::LT_POINT);
plLight->setSpecularColour(Color(1.0,1.0,1.0));
plLight->setCastsShadows(true);
player->setCastsShadow(true);
mgrWorld->setShadowsEnabled(true);
plLightSN = mgrWorld->createSceneNode("LightPlayer");
plLightSN->attachLight(plLight);
plLightSN->setPosition(Vector3(300,600,300));
graphics::StringMap params;
params["tex_size"] = "1024";
params["tex_count"] = "3";
params["far_distance"] = "1000";
params["directional_light_extrusion_distance"] = "1000";
mgrWorld->selectShadowTechnique("stencil_modulative", params);
//----------------------------------------  end, 
//the only technique that worked fine with dotScene was stencil_modulative
 
codesnippets/shadows.txt · Last modified: 2008/02/21 21:54 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki