Jump to content

MMaps Redux


Guest auntieMangos

Recommended Posts

there is still no point using --skipContinents true and 001 at the same time

From what I see, MapBuilder::build() doesn't use shouldSkipMap checks and specifying the number directly seems to override skipContinents.

Re to below: I finally see your point, but since there is absolutely no downside in specifying the argument, it seems rather moot. I use a batch file. Editing skipContinents out for no reason only to write it in later would be a waste of time.

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Yes indeed :) so there is no point using this arg. What you wrote is not false, there is only not needed information.

@iowahc ; there is no IRC dedicated to mmaps or vmaps. You may talk to the dev(Lynx3d & faramir118) who are working on this, but i think you will get more answers in those topics.

Link to comment
Share on other sites

Well. I'm so far good. extracted vmaps, maps and dbc. but when I try to load the mmap project into VS2010 there are some errors and the projects won't load.

Any suggestions?

@faramir: any clue on how to compile the generator with linux?

Link to comment
Share on other sites

Well, a bunch of errors:

When opening MoveMapGen_VC100.sln with VS2010 I get following errors:

1: The Arrtibute "Label" in element <Import> is unrecognized.

2: Platform 'x64' referenced in the project file 'g3dlite' cannot be found. Please make sure you have it installed under: '%VCTargetsPath%\\Platvorms\\x64\\'.

3: Platform 'x64' referenced in the project file 'zlib' cannot be found. Please make sure you have it installed under: '%VCTargetsPath%\\Platvorms\\x64\\'.

Link to comment
Share on other sites

Anyway, I don't think I understand why you need to load the whole map

I basically came to the same conclusion last night. Initially wasn't concerned about the continents so I didn't think much about memory use.

I think the algorithm will change to:

  • * build list of *.map tiles
    * build list of *.vmtile tiles
    * load all model data
    * build navmesh using composite tile count from *.map list and *.vmap list
    * bound the model data, and iterate through it tile by tile

  1. * load tile heightmap, combine with model data
    * build rcChunkyTriMesh*
    * follow tile building algorithm in buildMoveMap's nested loop
    * unload tile heightmap
    * remove tile from *.map list and *.vmap list

* *.vmap list should be empty now

* build any tiles that remain in *.map list

The reason I'm going to stick with the rcChunkyTriMesh is it allows me to load all model data ahead of time, and then break it into tiles. I'm concerned that loading one vmap tile at a time might prevent [large models that span across tiles] from loading correctly.

Link to comment
Share on other sites

Hm i see, the vmap code doesn't have any easy way to lookup models from a specific tile, that kind of information is only required at loading/unloading and hence not kept in memory. You would need to check each ModelInstance for iModel != 0.

Models that span map tiles are referenced in each tile though, they have a uinique ID to prevent multiple loading/processing (in contrast to od vmap code...it only had a hack for very high poly-count models such as major cities).

So there is no need to load adjacent tiles, but i guess the fully tesselated terrain is the lion's share...

Link to comment
Share on other sites

Models that span map tiles are referenced in each tile

Just to make sure...

Say there is a map that is composed of one model (an instance, like StormwindJail). If the model has X vertices in tile A, and only 1 vertex spans into tile B, will there be a vmtile file for tile B?

As long as this is the case, I guess we're in good shape. I can handle the NULL iModel pretty easily.

edit: that map is not tiled, but for the sake of argument say it is

Link to comment
Share on other sites

Just to make sure...

Say there is a map that is composed of one model (an instance, like StormwindJail). If the model has X vertices in tile A, and only 1 vertex spans into tile B, will there be a vmtile file for tile B?

As long as this is the case, I guess we're in good shape. I can handle the NULL iModel pretty easily.

edit: that map is not tiled, but for the sake of argument say it is

Hehe, let's just take Naxxramas instead...the instance object "touches" 9 tiles, and hence is referenced in all of them and will be loaded as soon as you request loading of any of them.

But thinking of it, only requesting the currently processed tile may cause it to load and unload multiple times which causes some overhead too...also that chunkymesh could even help to sort out non-overlapping parts more efficiently for such big objects, but on the other hand building its spatial structure takes time too...

I guess whatever you do, no miracle in performance will happen from that :)

Link to comment
Share on other sites

Well, I tried without the chunky mesh and loading 1 vmap tile at a time, and it doesn't bound the model data - ended up with a lot of very large mmtiles, even though it was just the models for 1 tile.

There's no built in method other than rcGetChunksInRect to exclude the non-overlapping parts, so I'll use the chunky mesh.

Eventually the difference between [vmap loading/unloading overhead] vs [efficiency of intersecting heightmap and model data] will matter. But for now it's not that big of a deal, because the latter isn't happening for a while.

Link to comment
Share on other sites

I tried a bit more with CMakeList.txt the last errors remaining are:

make -j8
[ 15%] [ 29%] [ 33%] [ 41%] [ 46%] Built target libzlib
Built target libdebugutils
Built target libmangosrecast
Built target libmangosdetour
Built target libmangosvmaps
[ 91%] Built target libg3dlite
Scanning dependencies of target generator
[ 93%] [ 94%] Building CXX object CMakeFiles/generator.dir/MeshLoaderObj.o
Building CXX object CMakeFiles/generator.dir/InputGeom.o
Linking CXX executable generator
CMakeFiles/generator.dir/InputGeom.o: In function `InputGeom::loadMesh(char const*)':
/home/skirnir/Source/m/mmaps_rewrite/contrib/mmap/src/InputGeom.cpp:128: undefined reference to `myMeshLoaderObj::~myMeshLoaderObj()'
/home/skirnir/Source/m/mmaps_rewrite/contrib/mmap/src/InputGeom.cpp:134: undefined reference to `myMeshLoaderObj::myMeshLoaderObj()'
/home/skirnir/Source/m/mmaps_rewrite/contrib/mmap/src/InputGeom.cpp:141: undefined reference to `myMeshLoaderObj::load(char const*)'
CMakeFiles/generator.dir/InputGeom.o: In function `InputGeom::load(char const*)':
/home/skirnir/Source/m/mmaps_rewrite/contrib/mmap/src/InputGeom.cpp:187: undefined reference to `myMeshLoaderObj::~myMeshLoaderObj()'
CMakeFiles/generator.dir/InputGeom.o: In function `~InputGeom':
/home/skirnir/Source/m/mmaps_rewrite/contrib/mmap/src/InputGeom.cpp:119: undefined reference to `myMeshLoaderObj::~myMeshLoaderObj()'
/home/skirnir/Source/m/mmaps_rewrite/contrib/mmap/src/InputGeom.cpp:119: undefined reference to `myMeshLoaderObj::~myMeshLoaderObj()'
collect2: ld returned 1 exit status
make[2]: *** [generator] Error 1
make[1]: *** [CMakeFiles/generator.dir/all] Error 2
make: *** [all] Error 2

The CMakeList.txt is here: http://gist.github.com/433247

I'm not quite sure if that's anywhere near the "final" solution. Maybe someone with a bit more experience than myself could have a look?

Yours

Skirnir

Link to comment
Share on other sites

Hi faramir118,

I just build the generator with your CMakeLists.txt. So far well done :-) But if you run it, it just says

'maps' directory is empty or does not exist
Press any key to close ...

Thanks again for all the work you and everyone else put into this great project. Now I'm waiting for a generator that doesn't crash with continents 1,530 and 570. :-) But take your time ...

Yours sincerely

Skirnir

Link to comment
Share on other sites

Finally I got my Visual Studio fixed up and successfully compiled with windows. now Running without Params is enough? or should I use some params?

Any advice for Windows?

need to switch paths to forward slashes

There's probably more, let me know what it fails on

Well I implemented a Directory Scan Function I found on the net. seems to work. but now I get

terminate called after throwing an instance of 'std::out_of_range'
 what():  basic_string::substr
Aborted

and I don't know where this comes from :(

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use