World\WMO\Dungeon WMO file position and scale menu

User Tag List

Results 1 to 3 of 3
  1. #1
    bobsir's Avatar Member
    Reputation
    3
    Join Date
    Apr 2012
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    World\WMO\Dungeon WMO file position and scale

    I'm attempting to write a program that reads in WMO files and the map tiles (from World\Minimaps) from raids and dungeons, and then overlays them with other position data.

    My program opens the WMO root files, reads the MOGI chunk to get the boundary boxes for each group, and then loads the corresponding .blp file for each group.
    The wmo root files I'm using are from World\wmo\Dungeon\, e.g. World\wmo\Dungeon\OrgrimmarRaid\Orgrimmar_raid.wmo.
    Then map tiles are loaded from World\Minimaps, e.g. World\Minimaps\OrgrimmarRaid\mapXX_YY.blp

    Here are some screenshots: WoW Experiment - Imgur

    It works fine, except for the different coord system being used. The major issue is the scale is completely off. I've searched everywhere trying to find how to properly scale and position these wmo files but with no success. They are all much bigger than they should be compared to the map tiles, and I know the map tiles are scaled correctly.

    I've searched the dbc files, and can't find anything. I've looked at the WDT (MWMO chunk always empty i.e. size = 0), WDL (MWMO also empty). Nothing!!

    I did manage to find references to the files in the ADT file MWMO chunk:
    OrgrimmarRaid_31_30_obj1.adt - 0: WORLD\WMO\DUNGEON\ORGRIMMARRAID\MG_RAIDBUILDING_ENTRANCE.WMO
    OrgrimmarRaid_38_27_obj0.adt - 0: WORLD\WMO\DUNGEON\ORGRIMMARRAID\ORGRIMMAR_RAID.WMO
    OrgrimmarRaid_38_27_obj1.adt - 0: WORLD\WMO\DUNGEON\ORGRIMMARRAID\ORGRIMMAR_RAID.WMO
    OrgrimmarRaid_38_28_obj0.adt - 0: WORLD\WMO\DUNGEON\ORGRIMMARRAID\ORGRIMMAR_RAID.WMO
    OrgrimmarRaid_38_28_obj1.adt - 0: WORLD\WMO\DUNGEON\ORGRIMMARRAID\ORGRIMMAR_RAID.WMO
    OrgrimmarRaid_38_29_obj0.adt - 0: WORLD\WMO\DUNGEON\ORGRIMMARRAID\ORGRIMMAR_RAID.WMO
    OrgrimmarRaid_38_29_obj1.adt - 0: WORLD\WMO\DUNGEON\ORGRIMMARRAID\ORGRIMMAR_RAID.WMO
    OrgrimmarRaid_38_30_obj0.adt - 0: WORLD\WMO\DUNGEON\ORGRIMMARRAID\ORGRIMMAR_RAID.WMO
    I don't quite understand why multiple adt files are referencing the same wmo. I'm still working on parsing more chunks of the adt file as I post this, but I thought I'd post anyway.

    TLDR: How can I properly scale and position these WMO files?

    World\WMO\Dungeon WMO file position and scale
  2. #2
    bobsir's Avatar Member
    Reputation
    3
    Join Date
    Apr 2012
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Update with findings so far...

    I'm parsing the MODF chunk now ("Placement information for WMOs.") which has position, rotation, lower and upper bounds.

    OrgrimmarRaid_30_48_obj0.adt
    SW_Stormwind_Orgrimmar_Raid.wmo
    Position { 15954.52, -56.98012, 25566.77 }
    Lower { 15392.21, -86.79752, 25082.08 }
    Upper { 16306.52, 230.0789, 25897.74 }

    OrgrimmarRaid_28_47_obj0.adt
    SW_Stormwind_Orgrimmar_Raid.wmo
    Position { 15954.52, -56.98012, 25566.77 }
    Lower { 15392.21, -86.79752, 25082.08 }
    Upper { 16306.52, 230.0789, 25897.74 }

    w = 914.31
    h = 316.87642
    d = 815.66

    SW_Stormwind_Orgrimmar_Raid.wmo
    boundingBoxA = { -484.6902, -562.3107, -29.8174 }
    boundingBoxB = { 330.9713, 351.9987, 287.059 }

    w = 815.6615
    h = 914.3094
    d = 316.8764
    From the above, multiple adt files contain the same wmo file, but luckily their coordinates is exactly the same. My guess is the WoW engine must check the persons current tile (the xx_yy adt files) to decide what wmo files are to be displayed by the minimap. When I analyze the .wmo file I noticed the bounding box has the exact same size as the adt ( upper - lower ) box, if you jumble around the coordinates.

    Still that doesn't give us any info about scale...

    Edit: So far from the dungeons I've opened it seems like scale is 1:1 so... this post may be pointless.. Magisters terrace appeared 1 to 1.
    Last edited by bobsir; 08-20-2014 at 11:14 AM.

  3. #3
    bobsir's Avatar Member
    Reputation
    3
    Join Date
    Apr 2012
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay I've figured it all out, nothing like a bit of persistence. May as well post what I've learned just case anyone else is trying to do the same, and this thread keeps coming up in my own googles searches. Most of it is already on the wiki WoWDev

    Scale between wmos and the map tiles is fine, perfect in fact! Map tiles are 533.33x533.33 in map coords as specified in the wiki. The WMO blp files (images used by wmo files) are oddly scaled down by 1.993. I only learned this from World of MapCraft - WoW Slippy Maps in his source code. I cannot find any other information on why this is the case and if it was just an estimation.

    Maps with no files (i.e. no *.adt files in \World\Maps) will list a global .wmo file in their .wdt file.

    e.g.
    OrgrimmarInstance.wdt
    MWMO:
    {
    Files:
    {
    0: World\wmo\Dungeon\KL_OrgrimmarLavaDungeon\LavaDungeon.wmo
    }
    }

    MODF:
    {
    MODFEntries:
    {
    0: MODFEntry. Pos: 0, 0, 0. Rotation: { 0, 0, 0 }
    }
    }
    If there is a map, then the map .WMO files will be references in the .adt files (once for each tile). Multiple adt's can point to the same wmo. The same WMO may be referenced multiple times with different position and rotation, like buildings. Unfortunately in some cases (like SoO) the raid WMO has 3 unique references with slightly different positions. Here is what my program found in all the .adt tiles for Siege of Orgrimmar:
    WORLD\WMO\DUNGEON\ORGRIMMARRAID\MG_RAIDBUILDING_ENTRANCE.WMO
    Unique:

    WORLD\WMO\DUNGEON\ORGRIMMARRAID\ORGRIMMAR_RAID.WMO
    Unique:

    LowerBounds: { 20767.35, -978.6453, 14202.76 }
    UpperBounds: { 23543.84, 249.7471, 17086.32 }
    Position: { 21485, 30.65552, 15566.38 }
    Rotation: { 0, 34, 0 }

    LowerBounds: { 21396.83, 14.18546, 15509.7 }
    UpperBounds: { 21452.34, 56.30676, 15572.04 }
    Position: { 21422.48, 16.613, 15544.76 }
    Rotation: { 0, 241.5, 0 }

    LowerBounds: { 21840.12, 28.83254, 15576.67 }
    UpperBounds: { 21902.38, 71.32452, 15631.86 }
    Position: { 21871.49, 29.38882, 15604.49 }
    Rotation: { 0, 70, 0 }
    I don't understand that, and its a pain if I want to load a map programmatically.

    WMO placement wasn't too difficult. The position and boundary boxes defined in the adt and wdt file are in coordinates that start from the top left corner, which is 17066.656, 17066.656 in WoW map coordinates. e.g. 17066.656,0,17066.656 is (0, 0) in world map coords. The boundary box in the wdt and adl files takes into account the rotation of the object, i.e. boundary box increases in size when rotated.
    Last edited by bobsir; 08-23-2014 at 03:08 PM.

Similar Threads

  1. [HELP]How to convert WMO to 3DS and 3DS to WMO
    By WargRider in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 08-30-2008, 03:01 PM
  2. [Question] WMOs, ADTs, NoggIt and Cryects Tools..
    By dreamhacker in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 02-22-2008, 11:14 AM
  3. Question, WMO files ->Help
    By thesixth in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 08-16-2007, 01:56 PM
  4. WoW Map edittor, (edit .adt and .wmo files)
    By SomeWhiteGuy in forum World of Warcraft Model Editing
    Replies: 34
    Last Post: 05-25-2007, 01:34 PM
  5. How to view the .WMO files?
    By Itazuki in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 11-06-2006, 05:53 PM
All times are GMT -5. The time now is 05:50 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search