Changeset 2334
- Timestamp:
- 04/24/07 14:05:42 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/DiffuseTest/include/DiffuseTest.h
r2260 r2334 361 361 ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc"); 362 362 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Basic"); 363 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Diffuse ");363 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Diffuse_Simple"); 364 364 } 365 365 … … 379 379 void chooseSceneManager() 380 380 { 381 //mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");382 mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");381 mSceneMgr = mRoot->createSceneManager("OctreeSceneManager"); 382 //mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager"); 383 383 } 384 384 … … 401 401 void createScene(void) 402 402 { 403 std::string occlusion_cfg("OcclusionCulling.cfg");404 mSceneMgr->setWorldGeometry(occlusion_cfg);405 //createPostproc();403 //std::string occlusion_cfg("OcclusionCulling.cfg"); 404 //mSceneMgr->setWorldGeometry(occlusion_cfg); 405 createPostproc(); 406 406 407 407 OgreIlluminationManager::getSingleton().setMainCamera(mCamera); … … 661 661 662 662 Entity* object = mSceneMgr->createEntity("object", "buddha.mesh"); 663 object->setMaterialName("GTP/Diffuse/Disc2Point");663 //object->setMaterialName("GTP/Diffuse/Disc2Point"); 664 664 //object->setMaterialName("GTP/Diffuse/Poly2Point"); 665 object->setMaterialName("GTP/Diffuse/Poly2PointSimple"); 666 665 667 objectNode = rootNode->createChildSceneNode(); 666 668 objectNode->attachObject(object); -
GTP/trunk/App/Demos/Illum/Ogre/src/DiffuseTest/scripts/DiffuseTest.7.10.vcproj
r2141 r2334 138 138 <Files> 139 139 <Filter 140 Name="Source Files"141 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">142 <File143 RelativePath="..\src\DiffuseTest.cpp">144 </File>145 </Filter>146 <Filter147 140 Name="Header Files" 148 141 Filter="h;hpp;hxx;hm;inl;inc"> … … 150 143 RelativePath="..\include\DiffuseTest.h"> 151 144 </File> 145 <Filter 146 Name="Source Files" 147 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> 148 <File 149 RelativePath="..\src\DiffuseTest.cpp"> 150 </File> 151 </Filter> 152 152 </Filter> 153 153 <Filter -
GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include/Moria.h
r2329 r2334 25 25 #include "OgreIlluminationManager.h" 26 26 #include "SceneSerializer.h" 27 28 AnimationState* mAnimState; 27 29 28 30 … … 49 51 bool frameStarted(const FrameEvent& evt) 50 52 { 51 /* light->setDirection(mCamera->getDirection()); 52 light->setPosition(mCamera->getPosition()); 53 mainLightNode->setPosition(mCamera->getPosition());*/ 54 bool result = ExampleFrameListener::frameStarted(evt); 55 framecount++; 53 float thisTime = (float) Root::getSingleton().getTimer()->getMilliseconds() / 2000.0f; 54 55 mainLightNode->setPosition(Vector3(10*cos(thisTime), 7, 10 * sin(thisTime)) + Vector3(5, 0, 5)); 56 Vector3 pos = light->getDerivedPosition(); 57 pos.normalise(); 58 pos *= -1; 59 //light->setDirection( pos); 60 61 framecount++; 56 62 57 return result; 63 mAnimState->addTime(evt.timeSinceLastFrame * 0.5); 64 65 return ExampleFrameListener::frameStarted(evt); 58 66 } 59 67 … … 82 90 ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc"); 83 91 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Particles"); 84 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Moria"); 85 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_EnvMap"); 86 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Caustic"); 92 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_PathMap"); 93 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Moria"); 94 //ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_EnvMap"); 95 //ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Caustic"); 87 96 } 88 97 … … 108 117 void chooseSceneManager() 109 118 { 110 //mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");111 mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");119 mSceneMgr = mRoot->createSceneManager("OctreeSceneManager"); 120 //mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager"); 112 121 } 113 122 … … 115 124 { 116 125 std::string occlusion_cfg("OcclusionCulling.cfg"); 117 mSceneMgr->setWorldGeometry(occlusion_cfg);126 //mSceneMgr->setWorldGeometry(occlusion_cfg); 118 127 119 128 //createPostproc(); … … 122 131 OgreIlluminationManager::getSingleton().setMainViewport(mWindow->getViewport(0)); 123 132 OgreIlluminationManager::getSingleton().setFocusingSM(false); 124 OgreIlluminationManager::getSingleton().setShadowMapSize( 512);133 OgreIlluminationManager::getSingleton().setShadowMapSize(128); 125 134 OgreIlluminationManager::getSingleton().setBlurShadowMap(true); 126 OgreIlluminationManager::getSingleton().setShadowMapMaterialName("GTP/Basic/Distance_Normalized");//GameTools/ShadowMapDistance 127 OgreIlluminationManager::getSingleton().setUseLISPSM(false); 135 OgreIlluminationManager::getSingleton().setShadowMapMaterialName(Light::LT_SPOTLIGHT, "GTP/Basic/Distance_Normalized");//GameTools/ShadowMapDistance 136 OgreIlluminationManager::getSingleton().setShadowMapMaterialName(Light::LT_POINT, "GTP/Basic/Distance_Normalized"); 137 OgreIlluminationManager::getSingleton().setUseLISPSM(false); 138 OgreIlluminationManager::getSingleton().joinSharedRuns(false); 128 139 129 140 Root::getSingleton()._setCurrentSceneManager(mSceneMgr); … … 133 144 mCamera->setFOVy(Radian(Degree(80))); 134 145 mCamera->setNearClipDistance(0.01); 135 mCamera->setFarClipDistance(1 000);146 mCamera->setFarClipDistance(150); 136 147 // Set ambient light 137 148 mSceneMgr->setAmbientLight(ColourValue(0.1, 0.1, 0.1)); … … 145 156 inputStream = ResourceGroupManager::getSingleton().openResource("moria.level"); //towers2.level 146 157 s.parseScript(inputStream, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 147 158 s.parseEntryPoints("prmEntryPoints.text"); 159 /* 148 160 ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "GTP/Moria/Smoke_Large"); 149 161 pSys1->setKeepParticlesInLocalSpace(false); 150 162 SceneNode *pSysNode = rootNode->createChildSceneNode("psys1"); 151 163 pSysNode->attachObject(pSys1); 152 pSysNode->setPosition(-40,-1,-15); 164 pSysNode->setPosition(-40,-1,-15);*/ 153 165 154 166 /*Entity* object = mSceneMgr->createEntity("object", "head.mesh"); … … 163 175 //createPlane("p","groundmaterial",Vector3(0,-0.3,0),Vector2(150,150)); 164 176 165 Light*mainLight = mSceneMgr->createLight("MainLight");166 mainLight->setType(Light::LT_ SPOTLIGHT);177 mainLight = mSceneMgr->createLight("MainLight"); 178 mainLight->setType(Light::LT_POINT); 167 179 mainLight->setCastShadows(true); 168 180 mainLight->setDiffuseColour(ColourValue::White); … … 170 182 mainLightNode = rootNode->createChildSceneNode(); 171 183 172 mainLightNode->setPosition(-20,10,0); 173 mainLight->setPosition(-20,10,0); 174 mainLight->setPowerScale(5); 175 mainLight->setDirection(-1,-0.2, -1); 184 mainLightNode->setPosition(15,10,15); 185 mainLight->setPowerScale(30); 186 //mainLight->setDirection(1,0, 0); 176 187 mainLightNode->attachObject(mainLight); 177 mainLight->setSpotlightRange(Degree(0),Degree(90)); 178 mainLight->setAttenuation(40.0, 0, 1, 0); 179 188 //mainLight->setSpotlightRange(Degree(0),Degree(120)); 189 mainLight->setAttenuation(40.0, 0, 3, 0); 190 191 Vector4 v = mainLight->getAs4DVector(); 192 193 BillboardSet* bbs = mSceneMgr->createBillboardSet("bb", 1); 194 bbs->setDefaultDimensions(0.3, 0.3); 195 bbs->createBillboard(Vector3::ZERO, ColourValue::White); 196 bbs->setMaterialName("Flare"); 197 mainLightNode->attachObject(bbs); 198 199 Entity* ent = mSceneMgr->createEntity("troll", "troll.mesh"); 200 // Add entity to the scene node 201 SceneNode *trollNode = mSceneMgr->getRootSceneNode()->createChildSceneNode( Vector3(5,0,5)); 202 trollNode->attachObject(ent); 203 trollNode->setScale(0.1,0.1,0.1); 204 mAnimState = ent->getAnimationState("stand"); 205 mAnimState->setEnabled(true); 206 180 207 OgreIlluminationManager::getSingleton().initTechniques(); 181 208 } -
GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/include/PRMDemo.h
r2296 r2334 81 81 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Basic"); 82 82 ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc"); 83 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Demo");83 //ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Demo"); 84 84 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_PathMapDemo"); 85 85 } … … 163 163 OgreIlluminationManager::getSingleton().initTechniques(); 164 164 }*/ 165 165 /* 166 166 void createScene(void) ///TOWERS 167 167 { … … 214 214 215 215 OgreIlluminationManager::getSingleton().initTechniques(); 216 } /*216 }*/ 217 217 218 218 void createScene(void) ///PATHMAP Hangar … … 256 256 mainLight = mSceneMgr->createLight("MainLight"); 257 257 mainLight->setType(Light::LT_SPOTLIGHT); 258 mainLight->setCastShadows( true);259 mainLight->setDiffuseColour(ColourValue ::White);258 mainLight->setCastShadows(false); 259 mainLight->setDiffuseColour(ColourValue(0.5,0.8,1,1)); 260 260 mainLight->setSpecularColour(ColourValue::White); 261 261 mainLightNode = rootNode->createChildSceneNode(); 262 262 263 mainLightNode->setPosition(3 2,1,0.0);263 mainLightNode->setPosition(30,1,0.0); 264 264 mainLight->setPosition(30,0,0); 265 265 mainLight->setPowerScale(300); … … 268 268 mainLight->setAttenuation(50, 0, 1, 0); 269 269 mainLightNode->attachObject(mainLight); 270 271 272 273 274 Light* blueLight = mSceneMgr->createLight("BlueLight"); 275 blueLight->setType(Light::LT_SPOTLIGHT); 276 blueLight->setCastShadows(false); 277 blueLight->setDiffuseColour(ColourValue(0.0,0.1,1,1)); 278 blueLight->setSpecularColour(ColourValue::White); 279 SceneNode* blueLightNode = rootNode->createChildSceneNode(); 280 281 blueLightNode->setPosition(-30,1,0.0); 282 blueLight->setPosition(-30,0,0); 283 blueLight->setPowerScale(300); 284 blueLight->setDirection(1, 0, 0); 285 blueLight->setSpotlightOuterAngle(Radian(Degree(90))); 286 blueLight->setAttenuation(50, 0, 1, 0); 287 blueLightNode->attachObject(blueLight); 288 270 289 271 290 OgreIlluminationManager::getSingleton().initTechniques(); 272 } */291 } 273 292 274 293 void createPlane(Ogre::String _name, Ogre::String _material, Ogre::Vector3 _pos, Ogre::Vector2 _size, Ogre::Vector2 _subdivisions = Ogre::Vector2(1,1))
Note: See TracChangeset
for help on using the changeset viewer.