[HELP] Exception on all .exe after adding plsm...
MoDDiB
29-12-2005 22:48:28
I work with The CVS version of Ogre and PLSM2
After 3 days of trying I finally succeed to compile the plug-in.
But now when I execute a .exe in the Samples/Common/Bin/release I get this exception :
Function RessourceManager::add ; ressource with the name BaseWhiteNoLightDepthCheckWrite already exists .
I've try to coment all the BaseWhiteNoLightDepthCheckWrite 's line but I get the same exception on all the .exe ( ogre's sample which doesn't depend on PLSM ! )
Where am I wrong ?
Thanks
fiesch
30-12-2005 16:08:14
Hi - this always means that a resource has been defined twice or more - since ogre needs unique resourceNames it's bound to "crash".
Please check that you didn't define that material twice (try looking in PLSM2's Material Scripts, there might be another definition of that material.
For a hint where to look check your resources.cfg, PLSM2 section
MoDDiB
31-12-2005 11:59:20
Ok thank , it was a material script which makes the problem , I've just remove it ....
But now I'm trying to mapsplit a datasrcs map ( the ps map )
maptool.cfg
DefaultMap=puget_sound
#Terrain_Scene_Manager_Terrain=TsmTerrain
puget_sound=puget_1k
#grand_canyon=gcanyon_height_4k2k.gen
#terragen_genrated=terragen16bits.gen
#European_Alpes=Alpes.gen
# resource group name
GroupName=PLSM2
#do you want to run it on all maps listed here
BatchMode=no
paginglandscape2.cfg
DefaultMap=puget_sound
puget_sound=ps_height_1k
#grand_canyon=gcanyon_height_4k2k
#terragen_generated=terragen16bits
#European_Alpes=Alpes
#Terrain_Scene_Manager_Terrain=TsmTerrain
#def=Default
# resource group name where to find map definition
GroupName=PLSM2
# Try forbidden textureformat combinations
TextureFormatDebug=no
puget_1k.gen.cfg
GroupName=PLSM2
LandScapeFileName=ps_height_1k
TextureStretchFactor=1
OutDirectory=../../../../Samples/Media/paginglandscape2/terrains/LandScapeFileName
Data2DFormat=HeightField
ColorMapName=ps_texture_1k.png
ColorMapSplit=yes
HeightMap=yes
BaseMap=yes
CoverageMap=yes
AlphaMaps=yes
MiniMap=yes
MiniMapWidth=256
MiniMapHeight=256
NumMatHeightSplat=5
MaterialHeight0=0
MaterialHeight1=1
MaterialHeight2=20
MaterialHeight3=75
MaterialHeight4=75
AvgColorsExists=yes
#Sand
MaterialColor0.r=0.0f
MaterialColor0.g=0.0f
MaterialColor0.b=1.0f
#Grass
MaterialColor1.r=0.13f
MaterialColor1.g=0.545f
MaterialColor1.b=0.13f
#Rock 171 29 14
MaterialColor2.r=0.6705f
MaterialColor2.g=0.1137f
MaterialColor2.b=0.0549ff
#Rock
MaterialColor3.r=0.411764f
MaterialColor3.g=0.811764f
MaterialColor3.b=0.811764f
#Snow
MaterialColor4.r=0.411764f
MaterialColor4.g=0.811764f
MaterialColor4.b=0.811764f
ps_height_1k.cfg
GroupName=PLSM2
LandScapeFileName=ps_height_1k
LandScapeExtension=png
Height=2
Width=2
#
# Size of the Heightfiled in pixels (must be (power of 2) + 1)
PageSize=513
#
# Size of the Heightfield in pixels
#193 is the best spot as its the last power of two size that gives 16bits indexbuffer
TileSize=65
ScaleX=90000
ScaleY=15000
ScaleZ=90000
Deformable=yes
VertexCompression=yes
VertexProgramMorph=yes
VertexNormals=yes
VertexNormals=yes
TextureFormat=Image
ImageFilename=ps_texture_1k
TextureExtension=png
TextureStretchFactor=2
HorizonVisibilityComputing=yes
BaseCameraViewpoint.x=41000.0f
BaseCameraViewpoint.y=674000.0f
BaseCameraViewpoint.z=8531.0f
Baselookat.x=0.0f
Baselookat.y=0.0f
Baselookat.z=0.0f
So , if the directory "ps_height_1k" doesn't exist I get an error in the mapsplitterlog :
Error #: 8
Function: FileSystemArchive::changeDirectory
Description: Cannot open requested directory ../../../Media/paginglandscape2/terrains/ps_height_1k.
File: \coding\ogrenew\OgreMain\src\OgreFileSystem.cpp
Line: 141
Stack unwinding: <<beginning of stack>>
and if I create the folder I don't get any error in the log but in the console I get :
Oudirectory cannot be created
What's wrong ?
Thank and Happy new Year
tuan kuranes
03-01-2006 09:50:42
FileSystemArchive::changeDirectory is from resources.cfg referencing non existing resources. (directory here). Ogre raise an exception in this case.
'Outdirectory cannot be created' means it cannot be created, so check if mapsplitter can create a "../../../../Samples/Media/paginglandscape2/terrains/LandScapeFileName" from where it is launched. (not likely if it's in the same directory as the demo for example.)
Something's more than terribly wrong with the "stable" non-cvs MapSplitter. It can't seem to create any Output directories, for my maps nor for the example maps. Whatever I do it always states that it simply can't create. I'm running out of options, and losing my mind.
Whether I set OutDirectory to temp, or ../../Some/Where/LandscapeFileName, it still doesn't work!
- Dids
tuan kuranes
01-03-2006 19:05:03
Linux ? Win32 ?
And what happens when you pre-create the directory ?
Win32. If I pre-create the directory, the result is the exact same. It could be that I'm doing something very silly here, but I even tried to copy MapSplitter along with proper cfg's and dll's to it's own directory in C: root, and tried to run it from there, but still can't seem to create the directory (nor use is, if I've created it myself before running MapSplitter). Also, built MapSplitter in release mode.
tuan kuranes
01-03-2006 19:36:34
What says Mapsplitter.log ?
Nothing in particular:
20:43:52: Creating resource group General
20:43:52: Registering ResourceManager for type Material
20:43:52: Registering ResourceManager for type Mesh
20:43:52: Registering ResourceManager for type Skeleton
20:43:52: Loading library OgrePlatform.dll
20:43:52: OverlayElementFactory for type Panel registered.
20:43:52: OverlayElementFactory for type BorderPanel registered.
20:43:52: OverlayElementFactory for type TextArea registered.
20:43:52: Registering ResourceManager for type Font
20:43:52: ArchiveFactory for archive type FileSystem registered.
20:43:52: ArchiveFactory for archive type Zip registered.
20:43:52: DevIL version: Developer's Image Library (DevIL) 1.6.7 Nov 9 2005
20:43:52: 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
20:43:52: Registering ResourceManager for type HighLevelGpuProgram
20:43:52: Loading library .\RenderSystem_Direct3D9
20:43:52: D3D9 : Direct3D9 Rendering SubSystem created.
20:43:52: D3D9: Driver Detection Starts
20:43:52: D3D9: Driver Detection Ends
20:43:52: Loading library .\RenderSystem_GL
20:43:52: OpenGL Rendering Subsystem created.
20:43:52: Loading library .\Plugin_ParticleFX
20:43:52: Particle Emitter Type 'Point' registered
20:43:52: Particle Emitter Type 'Box' registered
20:43:52: Particle Emitter Type 'Ellipsoid' registered
20:43:52: Particle Emitter Type 'Cylinder' registered
20:43:52: Particle Emitter Type 'Ring' registered
20:43:52: Particle Emitter Type 'HollowEllipsoid' registered
20:43:52: Particle Affector Type 'LinearForce' registered
20:43:52: Particle Affector Type 'ColourFader' registered
20:43:52: Particle Affector Type 'ColourFader2' registered
20:43:52: Particle Affector Type 'ColourImage' registered
20:43:52: Particle Affector Type 'ColourInterpolator' registered
20:43:52: Particle Affector Type 'Scaler' registered
20:43:52: Particle Affector Type 'Rotator' registered
20:43:52: Loading library .\Plugin_BSPSceneManager
20:43:52: Registering ResourceManager for type BspLevel
20:43:52: Loading library .\Plugin_OctreeSceneManager
20:43:52: TerrainSceneManager: Registered a new PageSource for type Heightmap
20:43:52: Loading library .\Plugin_CgProgramManager
20:43:52: Loading library .\Plugin_PagingLandScapeSceneManager2
20:43:52: *-*-* OGRE Initialising
20:43:52: *-*-* Version 1.0.7 (Azathoth)
20:43:52: Creating resource group PLSM2
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2/gui' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2/fonts' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2/models' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2/overlays' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2/materials' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2/materials/scripts' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2/materials/textures' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2/materials/programs' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2/datasrcs' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'D:/ogrenew/Samples/Media/paginglandscape2/terrains' of type 'FileSystem' to resource group 'PLSM2'
20:43:52: Added resource location 'rvTerrain' of type 'FileSystem' to resource group 'PLSM2'
Very weird, since my dir structure is something like this:
ogrenew
|
|Samples
|---Media
---paginglandscape2
---|--datasrc
---|--terrains
|---Common
---|--bin
------|--Release
Irrelevant dirs not included of course. Still, it *should* just work, right? Even with the default demo maps, but nope, still the same bloody message.
tuan kuranes
02-03-2006 08:43:27
Nope, those instructions didn't quite help me.
Tuan, I've been succesfully using the CVS MapSplitter for quite some time, but recently I switched over to the "stable" non-cvs Ogre Souce, along with PLSM2 source (from you website), so the MapSplitter is oldish, right?
I wonder why it doesn't even report any errors, and would it be wise to only build the MapSplitter as cvs head?
I just need to get that damn thing to work, and I don't have a clue whether it's the MapSplitter.exe causing this or not.
- Dids
tuan kuranes
03-03-2006 13:40:12
so the MapSplitter is oldish, right?
Not that much.
What I don't get is why there is no error message at all from mapsplitter. Those usually happens with inconstent dll - lib link version.
Can you make sure ogremain.dll and ogreplatform.dll in the mapslitter folder are same version as libs linked against.
I'm still going to try to rebuild Ogre along with PLSM2 and see that the right libs and right dll's are linked.
Oh, Tuan, might the "error" be cause by Visual Studio 8? Since it does have all sorts of "new and fancy features", like manifests etc.
I need to thank you for your patience, since I can imagine how awkward it must be to find odd errors like these daily, and also, I hope you'll be able to pursue PLSM as long as possible since it's the best plugin for ogre I've come across as of yet
EDIT: Something worth mentioning! Debug release works at the moment, well, atleast I got it to split the map, although it's very slow so didn't have a proper go at it but yes, it seems to work. Tried checking through the configurations and comparing debug to release, but nothing "big" there. Will try again tomorrow!
- Dids
tuan kuranes
04-03-2006 09:06:10
I don't think vc8 is the problem as it's what I use.
You're not far from solution, if Debug works, there's no reason Release don't.
Hmm, the major difference between the release and debug builds of MapSplitter is the following files (in Release build):
Microsoft.VC80.CRT.manifest
msvcm80.dll
msvcp80.dll
msvcr80.dll
Also a few notable differences in the configuration, in release configuration under Linker->Optimization:
References: Eliminate unreferenced data (/OPT:REF)
Enable COMDAT Folding: Remove redundant COMDATs (/OPT:ICF)
Debug configuration only has "Default" stated in both of those options.
Command line options for the manifest thingie:
Debug -> /nologo /outputresource:"..\bin\debug\MapSplitterD.exe;#1"
Release -> /nologo /out:..\obj\Release\MapSplitter.exe.embed.manifest /notify_update
And that's about it. Hope this helps atleast a wee bit.
- Dids
Here's my output of the compile:
------ Rebuild All started: Project: Tool_MapSplitter, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'Tool_MapSplitter', configuration 'Release|Win32'
Compiling...
cl : Command line warning D9042 : invalid value '6011' for '/wd'; assuming '4999'; Code Analysis warnings are not available in this edition of the compiler
cl : Command line warning D9042 : invalid value '6385' for '/wd'; assuming '4999'; Code Analysis warnings are not available in this edition of the compiler
cl : Command line warning D9042 : invalid value '6326' for '/wd'; assuming '4999'; Code Analysis warnings are not available in this edition of the compiler
MapSplitter.cpp
MapMergeModulater.cpp
MapInfinitizer.cpp
MapEqualizer.cpp
MapBlurrer.cpp
MapBlender.cpp
filetutils.cpp
OgrePagingLandScapeData2D_Spline.cpp
OgrePagingLandScapeData2D_HeightFieldTC.cpp
OgrePagingLandScapeData2D_HeightFieldRawTC.cpp
OgrePagingLandScapeData2D_HeightFieldRaw.cpp
OgrePagingLandScapeData2D_HeightField.cpp
DRGNURBSSurface.cpp
OgrePagingLandScapeData2D.cpp
MapVis.cpp
MapSplatter.cpp
MapLighter.cpp
MapHorizon3.cpp
MapHorizon2.cpp
MapHorizon.cpp
Compiling...
MapNormaler.cpp
OgrePagingLandScapeOptions.cpp
MapUtil.cpp
MapTool.cpp
Compiling manifest to resources...
Linking...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
Generating code
Finished generating code
Embedding manifest...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
Generating code
Finished generating code
Performing Post-Build Event...
1 tiedosto(a) on kopioitu.
Build log was saved at "file://d:\Raziel_SVN\ogrenew\Tools\MapSplitter\obj\Release\BuildLog.htm"
Tool_MapSplitter - 0 error(s), 5 warning(s)
------ Rebuild All started: Project: Tool_MapSplitter, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'Tool_MapSplitter', configuration 'Debug|Win32'
Compiling...
cl : Command line warning D9042 : invalid value '6011' for '/wd'; assuming '4999'; Code Analysis warnings are not available in this edition of the compiler
cl : Command line warning D9042 : invalid value '6385' for '/wd'; assuming '4999'; Code Analysis warnings are not available in this edition of the compiler
cl : Command line warning D9042 : invalid value '6326' for '/wd'; assuming '4999'; Code Analysis warnings are not available in this edition of the compiler
MapSplitter.cpp
MapMergeModulater.cpp
MapInfinitizer.cpp
MapEqualizer.cpp
MapBlurrer.cpp
MapBlender.cpp
filetutils.cpp
OgrePagingLandScapeData2D_Spline.cpp
OgrePagingLandScapeData2D_HeightFieldTC.cpp
OgrePagingLandScapeData2D_HeightFieldRawTC.cpp
OgrePagingLandScapeData2D_HeightFieldRaw.cpp
OgrePagingLandScapeData2D_HeightField.cpp
DRGNURBSSurface.cpp
OgrePagingLandScapeData2D.cpp
MapVis.cpp
MapSplatter.cpp
MapLighter.cpp
MapHorizon3.cpp
MapHorizon2.cpp
MapHorizon.cpp
Generating Code...
Compiling...
MapNormaler.cpp
OgrePagingLandScapeOptions.cpp
MapUtil.cpp
MapTool.cpp
Generating Code...
Linking...
Embedding manifest...
Performing Post-Build Event...
1 tiedosto(a) on kopioitu.
Build log was saved at "file://d:\Raziel_SVN\ogrenew\Tools\MapSplitter\obj\Debug\BuildLog.htm"
Tool_MapSplitter - 0 error(s), 3 warning(s)
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========
tuan kuranes
04-03-2006 09:25:25
Hmm, the major difference between the release and debug builds of MapSplitter is the following files (in Release build):
Microsoft.VC80.CRT.manifest
msvcm80.dll
msvcp80.dll
msvcr80.dll
Those come from my binary demo release, which should'nt be used as a base to build over. It should be completly separated directory !
all my compiled libs (all dll in this folder coming from my build includ devil,libpng,cegui,etc...) are compatible only with my binary release.
you have to use dll that comes with Ogre SDK and Dependency pack.
Hmm, not sure where "your" libs would be, since MapSplitter is using this directory for additional libraries:
"$(OGRE_HOME)\lib\$(ConfigurationName)"
That meaning that it's using Ogre's libs. I tried also adding:
"D:\Raziel_SVN\ogrenew\Dependencies\lib\$(ConfigurationName)"
But even that didn't quite help me. I'm still getting the same output error, and not sure what the debug build is actually doing compared to the release build that makes it work.
tuan kuranes
04-03-2006 09:42:59
I'm speaking of dll files, not lib files.
you do link on good lib files, but using wrong dll files, as Release folder conaints my binary dll files (that you should erase).
Downloaded the Dependency package from Ogre's main site, overwrote everything in bin/Release(and Debug), and still, getting the Output error.
tuan kuranes
04-03-2006 10:58:52
try using depends.exe on mapsplitter (a ms tool from visual studio, also available on the net) to clarify dependencies.
Hmm, it complained that MSJAVA.DLL cannot be found, but other than that, it finds all of them.
EDIT: Hehe, downloaded msjava.dll via google, placed it in release folder, and mapsplitter hogged all resources and my system rebooted *grin*
Okay Tuan. Somehow I magically made it work, atleast for a while.
The problem might be the actual filenames/dirnames of the heightmaps, texturemaps and directories, since it would seem that I set the LandScapeFilename to the same name as the heightmap, configuration and directory, so, I must say I'm more than confused myself
If I set the ColorMap stuff to work with my texture file, MapSplitter crashes when the texture has been split from 0.0 -> 7.7. HeightMap exportion works just fine.
Also, still in debug, since Release doesn't seem to work at all, still all the same problems.
So, I might have to re-do all of my config files, since they're pretty messed up with all the tweaking and commenting out/deleting.
Let me know what you think!
After multiple rewrites of the .gen.cfg file, still crashes at 7.7 with the texturemap. Not sure why that is, but the files it *does* create are all 128x128 resolution, which seems odd, does it not?
tuan kuranes
04-03-2006 13:09:06
it may be a memory problem making it crash after. I fixed a bug on that on CVS that I still haven't backported to SDK version. Which I'll try to do asap.
Meanwhile, as you have the texture splitted, you can set it to false and relaunch mapsplitter...
Yeah, that seemed to work. Now it runs somewhat perfectly in debug-mode, which is good enough for me, so thank you Tuan.
Although I do have another issue, which isn't a biggie, but I've been wondering it since I got "together" with PLSM.
When I specify a ColorMap, can I actually make an RGB-based (hence, "color-based") texture map, which would then bind a certain texture to a certain color. This way I could make the texture editing easier and allow nicer texture resolution, since if I simply cut & paste different textures into my current ColorMap, it looks awful.
If this is possible, could you point me to the right direction, Tuan?
- Dids
tuan kuranes
04-03-2006 17:02:13
When I specify a ColorMap, can I actually make an RGB-based (hence, "color-based") texture map, which would then bind a certain texture to a certain color. This way I could make the texture editing easier and allow nicer texture resolution, since if I simply cut & paste different textures into my current ColorMap, it looks awful.
yes, actually it's a form of splatting.
What you want is splatting using a RGB instead of 3 alpha map, and using non-repeating textures instead of grass/rock/sand repeating texture ?
All splatting mode can be tweaked to do that, disabling the repeat in the material template or in cg shader.
Actually, I'd like to get the "splatting" textures repeated, so that lets say that I would have a sand-texture as the "base" texture, and that would be predefined via a color (right?), now I could add another color on top of the base-color, and "bind" that to a new texture.
So, basically I'd be using only a few splatting-textures, which would be repeatable. But, I'd like to define a certain spot/color with a certain texture "easily". Actually, I don't even know how to define splatting on a terrain, so if you'd like to point me to the right direction/thread, I would greatly appreciate it. Hope I made any sense to you, Tuan.
tuan kuranes
04-03-2006 17:21:17