[HELP] Directory Structure Screwed Up...

rweiss

26-11-2005 01:19:20

Hello,

I currently have the OGRE 1.0.6 Source for Windows compiled and all. I've downloaded the PLSM2 source from http://tuan.kuranes.free.fr/Ogre.html. Now I've extracted all of the contents inside of the PLSM2 source file into C:\Ogre\ogrenew\PlugIns\PagingSceneManager. I opened the plsm2.sln file in this directory. All of the projects load fine. I had to change a bunch of include directories to suit my structure. Now I build all, and everything goes along just fine, but when linking, it crashes with these 4 errors:


------ Build started: Project: Plugin_PagingLandScapeSceneManager2, Configuration: Debug Win32 ------

Linking...
Creating library C:\Ogre\ogrenew\PlugIns\PagingSceneManager\bin\debug/Plugin_PagingLandScapeSceneManager2.lib and object C:\Ogre\ogrenew\PlugIns\PagingSceneManager\bin\debug/Plugin_PagingLandScapeSceneManager2.exp
OgrePagingLandScapeOctreeNode.obj : error LNK2001: unresolved external symbol "public: virtual class Ogre::MapIterator<class stdext::hash_map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Ogre::MovableObject *,class stdext::hash_compare<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Ogre::MovableObject *> > > > __thiscall Ogre::SceneNode::getAttachedObjectIterator(void)" (?getAttachedObjectIterator@SceneNode@Ogre@@UAE?AV?$MapIterator@V?$hash_map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVMovableObject@Ogre@@V?$hash_compare@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@stdext@@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVMovableObject@Ogre@@@std@@@2@@stdext@@@2@XZ)
OgrePagingLandScapeOctreeNode.obj : error LNK2001: unresolved external symbol "public: virtual class Ogre::ConstMapIterator<class stdext::hash_map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Ogre::MovableObject *,class stdext::hash_compare<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Ogre::MovableObject *> > > > __thiscall Ogre::SceneNode::getAttachedObjectIterator(void)const " (?getAttachedObjectIterator@SceneNode@Ogre@@UBE?AV?$ConstMapIterator@V?$hash_map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVMovableObject@Ogre@@V?$hash_compare@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@stdext@@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVMovableObject@Ogre@@@std@@@2@@stdext@@@2@XZ)
OgrePagingLandScapeOctreeNode.obj : error LNK2001: unresolved external symbol "public: virtual class Ogre::MapIterator<class stdext::hash_map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Ogre::Node *,class stdext::hash_compare<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Ogre::Node *> > > > __thiscall Ogre::Node::getChildIterator(void)" (?getChildIterator@Node@Ogre@@UAE?AV?$MapIterator@V?$hash_map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVNode@Ogre@@V?$hash_compare@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@stdext@@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVNode@Ogre@@@std@@@2@@stdext@@@2@XZ)
OgrePagingLandScapeOctreeNode.obj : error LNK2001: unresolved external symbol "public: virtual class Ogre::ConstMapIterator<class stdext::hash_map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Ogre::Node *,class stdext::hash_compare<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Ogre::Node *> > > > __thiscall Ogre::Node::getChildIterator(void)const " (?getChildIterator@Node@Ogre@@UBE?AV?$ConstMapIterator@V?$hash_map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVNode@Ogre@@V?$hash_compare@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@stdext@@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVNode@Ogre@@@std@@@2@@stdext@@@2@XZ)
C:\Ogre\ogrenew\PlugIns\PagingSceneManager\bin\debug/Plugin_PagingLandScapeSceneManager2.dll : fatal error LNK1120: 4 unresolved externals

Build log was saved at "file://c:\Ogre\ogrenew\PlugIns\PagingSceneManager\PlugIns\PagingLandScape2\obj\Debug\BuildLog.htm"
Plugin_PagingLandScapeSceneManager2 - 5 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped


Could someone help me out installing this plugin? ...This is the first time I've tried to install a plugin in Ogre, and the installation instructions are very confusing on the Ogre Wiki.

-Ryan

Jon

26-11-2005 04:46:46

Well, that's not a crash. Just a few linker errors.

Getting PLSM added into a solution was a bit of a nuisance as I recall. In this case I'd say you didn't add Ogremain.lib to PLSM's additional dependancies (since it looks like you are using Visual Studio.

I also recommend adding a post-build event to copy the DLL into the proper bin directory (normally Samples/Common/bin/$(ConfigurationName).

Since this is your first plug-in I'll remind you to add Plugin_PagingLandScapeSceneManager2.dll to Plugins.cfg once you have it built.

rweiss

28-11-2005 02:24:35

Hey, thanks for the reply. I've got it setup as follows:

C/C++ :: General ::Additional Include Directories = ..\include;C:\Ogre\ogrenew\OgreMain\include;C:\Ogre\ogrenew\Dependencies\include\zzip;C:\Ogre\ogrenew\OgreMain\Dependencies\include\CEGUI

Linker :: General :: Additional Library Dependencies = C:\Ogre\ogrenew\OgreMain\lib\Debug

Linker :: General :: Additional Dependencies = OgreMain_d.dll


Now when I try to compile, I get a single error in linking:

------ Build started: Project: Plugin_PagingLandScapeSceneManager2, Configuration: Debug Win32 ------

Linking...
C:\Ogre\ogrenew\OgreMain\lib\Debug\OgreMain_d.dll : fatal error LNK1136: invalid or corrupt file

Build log was saved at "file://c:\Ogre\ogrenew\PlugIns\PagingSceneManager\PlugIns\PagingLandScape2\obj\Debug\BuildLog.htm"
Plugin_PagingLandScapeSceneManager2 - 1 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped



Why would it say invalid or corrupt file? OgreMain_d.dll exists in that directory.

Jon

28-11-2005 03:48:59

Compare it to the one in the build directory. I imagine that the wrong file was copied over.

If the files match, then delete the library from the build directory and rebuild OgreMain -- it is possible that there was an error in creating the library. Still I'm voting for the wrong file.

rweiss

28-11-2005 19:09:56

Well, I've come a long way. I got it to run, but after the Ogre options window pops up, and I click OK, the black window comes up with an error message on top:


An exception has been thrown!

---------------------
Details
---------------------
Error: #7
Function: SceneManager::getCamera
Description: Cannot find Camera with PlayerCam.
File: c:/ogrenew/ogremain/src/ogrescenemanager.cpp
Line: 236
Stack unwinding: <<beginning of stack>>

| OK |


I just built the new version of Ogre succesfully (I was using 1.0.5), which is how I got the PLSM plugin to compile. Now I'm trying to run the Demo application, and I'm running into the above error. Any suggestions?

tuan kuranes

28-11-2005 19:56:07

PlayerCam is the name of the Camera created in the demo.
but as "getCamera(cameraName)" is not used in Demo nor in Plugin, I've no Idea where this bug comes from.

Could you launch debug mode and check the stack to see where the exception is raised.

rweiss

04-12-2005 19:16:49

I've put that on hold for now, as I'm trying to compile the new Ogre version with PLSM2. I downloaded the newest Azathoth CVS, compiled it successfully, now I'm trying to compile the PLSM2 plugin (from the ogreaddons CVS). My include settings are:

C/C++ :: Additional Include Directories = ..\include;..\..\..\OgreMain\include;..\..\..\Dependenciese\include

I'm using the newest 1.0.6 dependencies from the site. When compiling, I get these errors:


------ Build started: Project: Plugin_PagingLandScapeSceneManager2, Configuration: Debug Win32 ------

Compiling...
OgrePagingLandScapeListenerManager.cpp
OgrePagingLandScapeOcclusionQuerySet.cpp
OgreOcclusionBoundingBox.cpp
OgreDebugRectangle2D.cpp
OgrePagingLandScapeOcclusionVFTraversal.cpp
OgrePagingLandScapeOcclusionTraversal.cpp
OgrePagingLandScapeOcclusionSWTraversal.cpp
OgrePagingLandScapeOcclusionDebugTraversal.cpp
OgrePagingLandScapeOcclusionCHCTraversal.cpp
OgrePagingLandScapeOcclusionCameraTraversal.cpp
OgrePagingLandScapeOcclusionElement.cpp
OgrePagingLandScapeOcclusion.cpp
OgrePagingLandScapeOctreeSphereSceneQuery.cpp
OgrePagingLandScapeOctreeRaySceneQuery.cpp
OgrePagingLandScapeOctreePlaneBoundedVolumeListSceneQuery.cpp
OgrePagingLandScapeOctreeIntersectionSceneQuery.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeIntersectionSceneQuery.cpp(66) : error C2039: 'MovableObjectFactoryIterator' : is not a member of 'Ogre::Root'
..\..\..\OgreMain\include\OgreRoot.h(61) : see declaration of 'Ogre::Root'
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeIntersectionSceneQuery.cpp(66) : error C2065: 'MovableObjectFactoryIterator' : undeclared identifier
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeIntersectionSceneQuery.cpp(66) : error C2146: syntax error : missing ';' before identifier 'factIt'
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeIntersectionSceneQuery.cpp(66) : error C2065: 'factIt' : undeclared identifier
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeIntersectionSceneQuery.cpp(67) : error C2039: 'getMovableObjectFactoryIterator' : is not a member of 'Ogre::Root'
..\..\..\OgreMain\include\OgreRoot.h(61) : see declaration of 'Ogre::Root'
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeIntersectionSceneQuery.cpp(68) : error C2228: left of '.hasMoreElements' must have class/struct/union type
type is ''unknown-type''
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeIntersectionSceneQuery.cpp(68) : error C3861: 'factIt': identifier not found, even with argument-dependent lookup
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeIntersectionSceneQuery.cpp(68) : fatal error C1903: unable to recover from previous error(s); stopping compilation
OgrePagingLandScapeOctreeAxisAlignedBoxSceneQuery.cpp
OgrePagingLandScapeOctreeSceneManager.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeSceneManager.cpp(422) : error C2039: 'destroyCamera' : is not a member of 'Ogre::SceneManager'
..\..\..\OgreMain\include\OgreSceneManager.h(77) : see declaration of 'Ogre::SceneManager'
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeSceneManager.cpp(988) : error C2039: 'setCurrentPassIterationCount' : is not a member of 'Ogre::RenderSystem'
..\..\..\OgreMain\include\OgreRenderSystem.h(118) : see declaration of 'Ogre::RenderSystem'
OgrePagingLandScapeOctreeNode.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeNode.cpp(163) : error C2039: 'getDisplaySceneNodes' : is not a member of 'Ogre::SceneManager'
..\..\..\OgreMain\include\OgreSceneManager.h(77) : see declaration of 'Ogre::SceneManager'
OgrePagingLandScapeOctreeCamera.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeCamera.cpp(95) : error C2039: 'getDestinationRenderSystem' : is not a member of 'Ogre::SceneManager'
..\..\..\OgreMain\include\OgreSceneManager.h(77) : see declaration of 'Ogre::SceneManager'
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeCamera.cpp(95) : error C2227: left of '->getCapabilities' must point to class/struct/union
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeOctreeCamera.cpp(95) : error C2227: left of '->hasCapability' must point to class/struct/union
Generating Code...
Compiling...
OgrePagingLandScapeOctree.cpp
OgrePagingLandScapeTileManager.cpp
OgrePagingLandScapeTile.cpp
OgrePagingLandScapeTexture_SplattingShader.cpp
OgrePagingLandScapeTexture_Splatting7Edit.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeTexture_Splatting7Edit.cpp(87) : warning C4267: 'initializing' : conversion from 'size_t' to 'const Ogre::uint', possible loss of data
OgrePagingLandScapeTexture_Splatting7.cpp
OgrePagingLandScapeTexture_Splatting6.cpp
OgrePagingLandScapeTexture_Splatting5.cpp
OgrePagingLandScapeTexture_Splatting4.cpp
OgrePagingLandScapeTexture_Splatting3.cpp
OgrePagingLandScapeTexture_Splatting2Edit.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeTexture_Splatting2Edit.cpp(86) : warning C4267: 'initializing' : conversion from 'size_t' to 'const Ogre::uint', possible loss of data
OgrePagingLandScapeTexture_Splatting2.cpp
OgrePagingLandScapeTexture_Splatting.cpp
OgrePagingLandScapeTextureManager.cpp
OgrePagingLandScapeTexture_InstantBaseTextureShadowed.cpp
OgrePagingLandScapeTexture_InstantBaseTextureEdit.cpp
OgrePagingLandScapeTexture_InstantBaseTexture.cpp
OgrePagingLandScapeTexture_Image.cpp
OgrePagingLandScapeTexture_BaseTexture2.cpp
OgrePagingLandScapeTexture_BaseTexture.cpp
Generating Code...
Compiling...
OgrePagingLandScapeTexture.cpp
OgrePagingLandScapeTextureCoordinatesManager.cpp
OgrePagingLandScapeRenderableManager.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderableManager.cpp(239) : error C2259: 'Ogre::PagingLandScapeRenderable' : cannot instantiate abstract class
due to following members:
'const Ogre::String &Ogre::MovableObject::getName(void) const' : pure virtual function was not defined
c:\ogrenew\OgreMain\include\OgreMovableObject.h(79) : see declaration of 'Ogre::MovableObject::getName'
OgrePagingLandScapeRenderable.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderable.cpp(90) : error C2039: 'WORLD_GEOMETRY_TYPE_MASK' : is not a member of 'Ogre::SceneManager'
c:\ogrenew\OgreMain\include\OgreSceneManager.h(77) : see declaration of 'Ogre::SceneManager'
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderable.cpp(90) : error C2065: 'WORLD_GEOMETRY_TYPE_MASK' : undeclared identifier
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderable.cpp(201) : error C2065: 'mName' : undeclared identifier
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderable.cpp(207) : error C2065: 'mUpperDistance' : undeclared identifier
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderable.cpp(482) : error C3861: 'mName': identifier not found, even with argument-dependent lookup
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderable.cpp(510) : error C2065: 'mBeyondFarDistance' : undeclared identifier
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderable.cpp(510) : error C3861: 'mUpperDistance': identifier not found, even with argument-dependent lookup
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderable.cpp(511) : error C3861: 'mBeyondFarDistance': identifier not found, even with argument-dependent lookup
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderable.cpp(1081) : error C2039: 'WORLD_GEOMETRY_TYPE_MASK' : is not a member of 'Ogre::SceneManager'
c:\ogrenew\OgreMain\include\OgreSceneManager.h(77) : see declaration of 'Ogre::SceneManager'
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeRenderable.cpp(1081) : error C3861: 'WORLD_GEOMETRY_TYPE_MASK': identifier not found, even with argument-dependent lookup
OgrePagingLandScapeIndexBuffer.cpp
OgrePagingLandScapePageRenderable.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapePageRenderable.cpp(66) : error C2664: 'Ogre::MovableObject::MovableObject(const Ogre::MovableObject &)' : cannot convert parameter 1 from 'const Ogre::String' to 'const Ogre::MovableObject &'
Reason: cannot convert from 'const Ogre::String' to 'const Ogre::MovableObject'
No constructor could take the source type, or constructor overload resolution was ambiguous
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapePageRenderable.cpp(306) : error C2039: 'WORLD_GEOMETRY_TYPE_MASK' : is not a member of 'Ogre::SceneManager'
c:\ogrenew\OgreMain\include\OgreSceneManager.h(77) : see declaration of 'Ogre::SceneManager'
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapePageRenderable.cpp(306) : error C2065: 'WORLD_GEOMETRY_TYPE_MASK' : undeclared identifier
OgrePagingLandScapePageManager.cpp
OgrePagingLandScapePage.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapePage.cpp(153) : error C2259: 'Ogre::PagingLandScapePageRenderable' : cannot instantiate abstract class
due to following members:
'const Ogre::String &Ogre::MovableObject::getName(void) const' : pure virtual function was not defined
c:\ogrenew\OgreMain\include\OgreMovableObject.h(79) : see declaration of 'Ogre::MovableObject::getName'
OgrePagingLandScapeData2D_Spline.cpp
OgrePagingLandScapeData2D_HeightFieldTC.cpp
OgrePagingLandScapeData2D_HeightFieldRawTC.cpp
OgrePagingLandScapeData2D_HeightFieldRaw.cpp
OgrePagingLandScapeData2D_HeightFieldNTC.cpp
OgrePagingLandScapeData2D_HeightFieldN.cpp
OgrePagingLandScapeData2D_HeightFieldBlendNeighbor.cpp
OgrePagingLandScapeData2D_HeightField.cpp
DRGNURBSSurface.cpp
OgrePagingLandScapeData2DManager.cpp
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeData2DManager.cpp(699) : error C2660: 'Ogre::Math::pointInTri2D' : function does not take 4 arguments
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeData2DManager.cpp(711) : error C2660: 'Ogre::Math::pointInTri2D' : function does not take 4 arguments
\ogrenew\PlugIns\PagingLandScape2\src\OgrePagingLandScapeData2DManager.cpp(711) : fatal error C1903: unable to recover from previous error(s); stopping compilation
OgrePagingLandScapeData2D.cpp
OgrePagingLandScapeSceneManagerDll.cpp
Generating Code...
Compiling...
OgrePagingLandScapeSceneManager.cpp
OgrePagingLandScapeRaySceneQuery.cpp
OgrePagingLandScapeOptions.cpp
OgrePagingLandScapeHorizon.cpp
OgrePagingLandScapeCamera.cpp
filetutils.cpp
Generating Code...

Build log was saved at "file://c:\ogrenew\PlugIns\PagingLandScape2\obj\Debug\BuildLog.htm"
Plugin_PagingLandScapeSceneManager2 - 32 error(s), 2 warning(s)


---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped


I've followed the directions exactly as written on the Installation tutorial. I've been trying to get this to compile for a while now, and I don't know why it won't.


EDIT :: I downloaded the source from the PLSM2 homepage, and that compiled fine. I don't know why the one from ogreaddons CVS won't work. Perhaps it needs an update?

tuan kuranes

05-12-2005 09:23:56

as said on WIKI page of plsm2 CVS PLSM2 is OGRE CVS HEAD compatible only.

plsm2 SDK is ogre SDK compatible and Azathoth CVS compatible.

rweiss

06-12-2005 03:05:35

Alright, well I've got it compiled, thanks to that little tip, for which I'm sorry I missed. After all is finished, I copied the .dll's from samples/common/bin/debug into the PLSM plugin directory (plsm2/bin/debug). I then copied the demo_paginglandscape2.exe file into this directory as well. I also copied all the .cfg files from the plsm2 source .zip into here. Lastly, I copied the media folder from the .zip into the main plsm2 plugin directory. When trying to run the Demo, the Ogre application runs, but into the render stage, all I see is the sky. Then a window pops up saying it cannot locate resource terrain.Base.0.0.png in resource groupe PLSM2.

I searched around and can't find this file anywhere. I thought it might come from running the map splitter, so I copied MapSplitter.exe into the PLSM2 bin directory, and ran it.... Hours later, I ran out of virtual memory. I upped the VM limit to 2500MB, and hours later, it eventually crashed for some unkown reason. Anyway, what do you suggest I do about finding this lost resource?

-Ryan

kiolakin

06-12-2005 06:35:41

This file does come from running MapSplitter. Make sure your Maptools.cfg is setup correctly and rerun MapSplitter. You shouldnt have to copy around the binary much as the Maptools.cfg should tell it where to search and where to put its output.

tuan kuranes

06-12-2005 13:27:00

remove grand_canyon from your Maptools.cfg and paginglandscape2.cfg and rerun mapsplitter.
grand_canyon is too big.
Next SDK should ease that.

rweiss

06-12-2005 22:21:04

Well, I took out the grandcanyon stuff, and MapSplitter.exe completed successfully, but it still didn't make any file called terrain.Base.0.0.png (the closest thing is terrain.0.0.png). I get the same error when trying to run the demo. So if the MapSplitter is supposed to generate this file, why didn't it?

The mapsplitter.log has no errors, I'm lost as of now.

tuan kuranes

07-12-2005 08:57:07

add

BaseMap=yes

in tsm.gen.cfg
(check wiki page on mapsplitter options there : http://www.ogre3d.org/wiki/index.php/Pa ... nfig_files )

rweiss

07-12-2005 17:20:10

Well, BaseMap=yes was already in TsmTerrain.gen.cfg (there is no file called tsm.gen.cfg anywhere). I added it again at the bottom, still doesn't work. I changed it to 'no', still doesn't work. I'll have to look into the other options and files to see if there's something else I need to change.

tuan kuranes

07-12-2005 17:22:21

try disabling minimap in .gen.cfg file, there was a bug fixed today in CVS about that.

rweiss

08-12-2005 07:14:28

No good. I don't understand why this works for other people and not me.

I'll go over what I did again, from the beginning...


1) compiled Ogre CVS azathoth
2) put the /tools, /samples, and /plugins folders in the PLSM2 source .zip into the ogrenew directory.
3) put the media folder into the plsm plugin directory
4) compiled the plsm2 plugin successfully
5) compiled the mapsplitter and plsm2 demo successfully
6) put the mapsplitter and demo .exe's into the plsm2 plugin bin/debug directory (with the necessary .dll's to run them)
7) ran the mapsplitter, everything completed successfully(after removing grandcanyon to prevent crash)
8) tried to run the demo, keep getting missing resource error.
-MapSplitter.exe doesn't generate the so called "lost" resource: terrain.Base.0.0.png

I dunno?

tuan kuranes

08-12-2005 08:19:45

can you post mapsplitter.log ?

gistenjunge

08-12-2005 10:01:23

In addition to disable MiniMap I had to set
ColorMapSplit=no
too to make MapSplitter work.

Then at first the sample app was not able to find the MapSplitter generated files. They were being built in the wrong directory (one level to high in directory hierarchy).
So I had to change the output dir as well. I changed
OutDirectory=../../../../Samples/Media/paginglandscape2/terrains/TsmTerrain
to
OutDirectory=../../../Samples/Media/paginglandscape2/terrains/TsmTerrain
in the gen.fg file.

Good Luck,
Markus

rweiss

09-12-2005 00:03:27

Hmm, apparently the CVS version and the SDK version are a lot different, both in directory structures and file contents. The CVS TsmTerrain.gen.cfg file looks like:


GroupName=General
LandScapeFileName=terrain
TextureStretchFactor=2

ScaleX=1.5
ScaleY=1
ScaleZ=1.5

OutDirectory=../../../../Samples/Media/paginglandscape2/terrains/TsmTerrain


Data2DFormat=HeightField

ColorMapName=terrain_texture.jpg
ColorMapSplit=yes


HeightMap=yes
BaseMap=yes
CoverageMap=yes
AlphaMaps=yes
ZHorizon=yes

LightMap=yes
Sunx=0.0f
Suny=0.88f
Sunz=0.47f
Ambient=0.5f
Diffuse=0.5f
Blur=0.0f

MiniMap=yes
MiniMapWidth=64
MiniMapHeight=64

NumMatHeightSplat=5

MaterialHeight1=12
MaterialHeight2=35
MaterialHeight3=80
MaterialHeight4=100

AvgColorsExists=yes

#Sand
MaterialColor0.r=0.0f
MaterialColor0.g=0.0f
MaterialColor0.b=1.0f
#Grass
MaterialColor1.r=0.145f
MaterialColor1.g=0.624f
MaterialColor1.b=0.0f
#Rock
MaterialColor2.r=0.411764f
MaterialColor2.g=0.811764f
MaterialColor2.b=0.811764f
#Rock
MaterialColor3.r=0.411764f
MaterialColor3.g=0.811764f
MaterialColor3.b=0.811764f
#Snow
MaterialColor4.r=1.0f
MaterialColor4.g=0.0f
MaterialColor4.b=0.0f



The TsmTerrain.gen.cfg file in the SDK (the one I'm using) looks like:


### WARNING
## read Data2dLoader.txt, Mapsplitterreadme.txt
## in ogreaddons paginglandscape root folder before anything here.
##

# resource group name
GroupName=General

# Base file name for the landscape heightfield data
# The file name MUST be LandScapeFileName.LandScapeExtension (ex: landscape.png)
LandScapeFileName=terrain
LandScapeExtension=png
#
#

# for textures. (raw is possible but raw texture isn't supported directly for Ogre so it's experimental)
# jpg or anything else ?
## For heightmap only
LandScapeExportExtension=png
## For Texturing heightmap only (all but pure heightmap data.)
TextureExtension=png
## scale factor bettween pagesize and textursize
TextureStretchFactor=2

#
# If you intend to use it with
# Paginglandscape scenemanager Paged=yes
# or with Terrain scenemanager Paged=no
Paged=yes


#
# Scale values
ScaleX=1.5
ScaleY=1
ScaleZ=1.5


# Directory where to store files
# absolute or related to maptool directory
# if OutDirectory=LandScapeFileName will use filename of your input data
OutDirectory=../../Media/paginglandscape/TsmTerrain



###########
###########
# Options only useful for paging landscape scene manager paged=yes
#
# Size of the Heightfiled in pixels (must be 2^n + 1)
PageSize=513
TileSize=65



# Especialized 2D data loader.
# Currently the only available loaders are
# 'HeightField', 'HeightFieldTC' and 'SplineField'.
# More to come. (For Terrainscene (paged =yes HeightField is used by default)
#

Data2DFormat=HeightField
#Data2DFormat=HeightFieldTC

# The HeightField TC is a compresed format and need to know the value range from where the
# heightfield file was compresed (if it's paged, and Data2DFormat=HeightFieldTC)
MaxValue=3000
MinValue=0

# don't work with mapsplitter for now
#Data2DFormat=SplineField


#############COLOR MAP

# Map that user have generated before, using terragen,
#and want to split or to light (Textureformat=Image)
ColorMapName=terrain_texture.jpg
# Split your color map
ColorMapSplit=no
# same but with modulated with light
LitColorMapSplit=no


#########HEIGTHMAPS
#
# What to generate
# HERE IS WHERE YOU SPECIFY YOUR NEEDS
#
# usual HeightMap (but splitted)
HeightMap=yes
# If you want your map to be infinitizable
InfiniteMap=no

# If you want smooth your heightmap
HeightMapBlurFactor=0.0f
# Make sure heights use the whole range (0-255 or 0-65535)
Equalize=no
# Creates a MiniMap (width=numpageswidth*numtiles and height=numpagesheight*numtiles)
# (as the name don't tell, it's creates a file.small.png image...)
MiniMap=no
MiniMapWidth=128
MiniMapHeight=128

#########NORMALS
#
# Normal Map
NormalMap=no
# RGB as XYZ normal and Alpha as 8 bits HeightMap (paging scene manager)
HeightNormalMap=no


#
# Map that can be used on not too much scaled terrain or old hardware
# no enough texture units or too slow multipass (Textureformat=Image)
ColorMapGenerated=no
# same but with modulated with light
LitColorMapGenerated=no

#########SPLATTING

#
# Splatting
# We are allowing 4 textures to build the terrain texture
# MaterialHeight to change alpha weights ( using percentage )
MaterialHeight1=12
MaterialHeight2=50

# yes if you specify below otherwise it reads splatting textures
AvgColorsExists=yes

#Sand
MaterialColor0.r=1.0f
MaterialColor0.g=1.0f
MaterialColor0.b=0.0f
#Grass
MaterialColor1.r=0.13f
MaterialColor1.g=0.545f
MaterialColor1.b=0.13f
#Rock
MaterialColor2.r=0.411764f
MaterialColor2.g=0.411764f
MaterialColor2.b=0.411764f
#Snow
MaterialColor3.r=1.0f
MaterialColor3.g=0.98f
MaterialColor3.b=0.98f

#needs to be in maptool directory
SplatFilename0=splatting_sand.jpg
SplatFilename1=splatting_grass.jpg
SplatFilename2=splatting_rock.jpg
SplatFilename3=splatting_snow.jpg

# Base map for big scale maps, used for long distance instead of splatting
# (Textureformat=Base and splattingX)
BaseMap=yes
# same but with modulated with light
LitBaseMap=no
#
#### Maps used for splattings
#
# coverage is RGBA, each channel has info for 1 splat
# (Textureformat=splatting3)
CoverageMap=yes
#
# generate 1 alpha map per splatting
# (Textureformat=splatting2) When Ogre has support fo PF_A8
AlphaMaps=yes
# same but with black RGB data until Ogre has support fo PF_A8
AlphaSplatRGBAMaps=no
# same but with light in RGB data
AlphaSplatLightMaps=no
#
# generate 1 RGB map per splatting gray level instead of alpha
# (mainly debug, but can be used to get some splatting in GL version one day)
RGBMaps=no


####################LIGHTING

# Shadows on terrains (lightmap is used, shadowmap is mainly for debugging)
# (Textureformat=splatting4)
LightMap=no
ShadowMap=no

Sunx=0.0f
Suny=0.88f
Sunz=0.47f

Ambient=0.5f
Diffuse=0.5f
Blur=0.0f

######## Real-Time LIGHTING

# Horizon Mapping (real-time lightmapping shader with V2 pixel shader)
# LONG TIME COMPUTATION
HorizonMap=no
# map elevation lookup table independant, so generate once and rename according to your materials.
ElevationMap=no

# trick Real-Time mapping : sun is constricted in Z axis. Fastest Horizon mapping possible with and without shaders.
ZHorizon=yes


########VISIBILITY
#
# PVS (potential visibility set)
# VERY LONG TIME COMPUTATION
# Will be used to decide if terrain patches are visible or hidden by some hills
# or mountains (not used for now in plugin's code)
# could be used for AI to know if something is visible from a point to another...
# so perhaps a thing that can lies in scenemanagers...
PVSMap=no




I've also attached a copy of my MapSplitter.log file.


13:03:23: Creating resource group General
13:03:23: Registering ResourceManager for type Material
13:03:23: Registering ResourceManager for type Mesh
13:03:23: Registering ResourceManager for type Skeleton
13:03:23: Loading library OgrePlatform_d.dll
13:03:23: OverlayElementFactory for type Panel registered.
13:03:23: OverlayElementFactory for type BorderPanel registered.
13:03:23: OverlayElementFactory for type TextArea registered.
13:03:23: Registering ResourceManager for type Font
13:03:23: ArchiveFactory for archive type FileSystem registered.
13:03:23: ArchiveFactory for archive type Zip registered.
13:03:23: DevIL version: Developer's Image Library (DevIL) 1.6.7 Oct 28 2005
13:03:23: DevIL image formats: bmp dib cut dcx dds gif hdr ico cur jpg jpe jpeg lif mdl mng jng pcx pic pix png pbm pgm pnm ppm psd pdd psp pxr sgi bw rgb rgba tga vda icb vst tif tiff wal xpm raw
13:03:23: Registering ResourceManager for type HighLevelGpuProgram
13:03:23: Loading library .\RenderSystem_Direct3D7
13:03:23: Direct3D7 Rendering Subsystem created.
13:03:23: ----- DirectDraw Detection Starts
13:03:23: Detected DirectDraw driver Primary Display Driver
13:03:23: Detected DirectDraw driver NVIDIA GeForce FX Go5200
13:03:23: ----- DirectDraw Detection Ends
13:03:23: Loading library .\RenderSystem_Direct3D9
13:03:23: D3D9 : Direct3D9 Rendering SubSystem created.
13:03:23: D3D9: Driver Detection Starts
13:03:23: D3D9: Driver Detection Ends
13:03:23: Loading library .\RenderSystem_GL
13:03:23: OpenGL Rendering Subsystem created.
13:03:24: Loading library .\Plugin_ParticleFX
13:03:24: Particle Emitter Type 'Point' registered
13:03:24: Particle Emitter Type 'Box' registered
13:03:24: Particle Emitter Type 'Ellipsoid' registered
13:03:24: Particle Emitter Type 'Cylinder' registered
13:03:24: Particle Emitter Type 'Ring' registered
13:03:24: Particle Emitter Type 'HollowEllipsoid' registered
13:03:24: Particle Affector Type 'LinearForce' registered
13:03:24: Particle Affector Type 'ColourFader' registered
13:03:24: Particle Affector Type 'ColourFader2' registered
13:03:24: Particle Affector Type 'ColourImage' registered
13:03:24: Particle Affector Type 'ColourInterpolator' registered
13:03:24: Particle Affector Type 'Scaler' registered
13:03:24: Particle Affector Type 'Rotator' registered
13:03:24: Loading library .\Plugin_BSPSceneManager
13:03:24: Registering ResourceManager for type BspLevel
13:03:24: Loading library .\Plugin_OctreeSceneManager
13:03:24: TerrainSceneManager: Registered a new PageSource for type Heightmap
13:03:24: Loading library .\Plugin_CgProgramManager
13:03:24: Loading library .\Plugin_PagingLandScapeSceneManager2
13:03:24: *-*-* OGRE Initialising
13:03:24: *-*-* Version 1.0.6 (Azathoth)
13:03:24: Creating resource group Bootstrap
13:03:24: Added resource location '../../media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
13:03:24: Added resource location '../../media' of type 'FileSystem' to resource group 'General'
13:03:24: Added resource location '../../media/fonts' of type 'FileSystem' to resource group 'General'
13:03:24: Added resource location '../../media/materials/programs' of type 'FileSystem' to resource group 'General'
13:03:24: Added resource location '../../media/materials/scripts' of type 'FileSystem' to resource group 'General'
13:03:24: Added resource location '../../media/materials/textures' of type 'FileSystem' to resource group 'General'
13:03:24: Added resource location '../../media/models' of type 'FileSystem' to resource group 'General'
13:03:24: Added resource location '../../media/overlays' of type 'FileSystem' to resource group 'General'
13:03:24: Added resource location '../../media/particle' of type 'FileSystem' to resource group 'General'
13:03:24: Added resource location '../../media/gui' of type 'FileSystem' to resource group 'General'
13:03:24: Added resource location '../../media/packs/cubemap.zip' of type 'Zip' to resource group 'General'
13:03:24: Added resource location '../../media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
13:03:24: Added resource location '../../media/packs/dragon.zip' of type 'Zip' to resource group 'General'
13:03:24: Added resource location '../../media/packs/fresneldemo.zip' of type 'Zip' to resource group 'General'
13:03:24: Added resource location '../../media/packs/ogretestmap.zip' of type 'Zip' to resource group 'General'
13:03:24: Added resource location '../../media/packs/skybox.zip' of type 'Zip' to resource group 'General'
13:03:24: Creating resource group PLSM2
13:03:24: Added resource location '../../Media/paginglandscape' of type 'FileSystem' to resource group 'PLSM2'
13:03:24: Added resource location '../../Media/paginglandscape/terragen16bits' of type 'FileSystem' to resource group 'PLSM2'
13:03:24: Added resource location '../../Media/paginglandscape/ps_height_1k' of type 'FileSystem' to resource group 'PLSM2'
13:03:25: Added resource location '../../Media/paginglandscape/gcanyon_height_4k2k' of type 'FileSystem' to resource group 'PLSM2'
13:03:25: Added resource location '../../Media/paginglandscape/alpes' of type 'FileSystem' to resource group 'PLSM2'
13:03:25: Added resource location '../../Media/paginglandscape/datasrcs' of type 'FileSystem' to resource group 'PLSM2'
13:03:25: Added resource location '../../Media/paginglandscape/TsmTerrain' of type 'FileSystem' to resource group 'PLSM2'
13:21:31: *-*-* OGRE Shutdown
13:21:32: Unregistering ResourceManager for type Font
13:21:32: Unregistering ResourceManager for type Skeleton
13:21:32: Unregistering ResourceManager for type Mesh
13:21:32: Unregistering ResourceManager for type HighLevelGpuProgram
13:21:32: Unloading library .\Plugin_PagingLandScapeSceneManager2
13:21:33: Unloading library .\Plugin_CgProgramManager
13:21:33: Unloading library .\Plugin_OctreeSceneManager
13:21:33: Unregistering ResourceManager for type BspLevel
13:21:33: Unloading library .\Plugin_BSPSceneManager
13:21:33: Unloading library .\Plugin_ParticleFX
13:21:33: *** Stopping Win32GL Subsystem ***
13:21:33: Unloading library .\RenderSystem_GL
13:21:34: D3D9 : Shutting down cleanly.
13:21:34: D3D9 : Direct3D9 Rendering SubSystem destroyed.
13:21:34: Unloading library .\RenderSystem_Direct3D9
13:21:35: *-*-* Direct3D Subsystem shutting down cleanly.
13:21:35: Direct3D7 Rendering Subsystem destroyed.
13:21:35: Unloading library .\RenderSystem_Direct3D7
13:21:35: Unregistering ResourceManager for type Material
13:21:36: Unloading library OgrePlatform_d.dll



Should I just ditch Azathoth and go with HEAD and the CVS version of the PLSM2?

tuan kuranes

16-12-2005 14:13:27

yes they're quite different, as much work has been done since.
If you can use HEAD as Dagon is/will very soon be the Ogre Stable Version.