This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Use WMO as M2?  (Read 1820 times)

Scytheria23

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 49
    • View Profile
Use WMO as M2?
« on: January 18, 2017, 10:12:58 pm »
Probably a stupid question,

I know you can easily make the client spawn WMOs as if they were M2s (Amaroth's pack allows you to do this well enough) but can you spawn WMOs in Noggit in the same way?  I would like to be able to scale, rotate and otherwise transform WMOs, but Noggit only seems to allow these actions to be performed on M2 objects.

Any easy answer?

Thanks
Scy
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Use WMO as M2?
« Reply #1 on: January 18, 2017, 11:02:03 pm »
The game engine only allows that, not noggit: https://wowdev.wiki/ADT/v18#MDDF_chunk vs https://wowdev.wiki/ADT/v18#MODF_chunk
Note how there is no scale field for modf.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Scytheria23

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 49
    • View Profile
Re: Use WMO as M2?
« Reply #2 on: January 18, 2017, 11:30:55 pm »
Thanks for the fast reply.  OK, but I guess it's possible to convert a WMO into an M2... essentially all the needed data will be in there.  I'll look into an automated way of doing this when my current project is done.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Skarn

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 807
    • View Profile
    • http://skarn-project.net
Re: Use WMO as M2?
« Reply #3 on: January 19, 2017, 12:55:17 pm »
WMO is simply not meant to be an M2 and vice versa. Besides geometry, WMOs contain vertex colors, portals, group types, lights, fogs, different batch types, bsp tree, convex hulls and more. On the other hand, m2s contain more simple geometry, animations, events etc. So, I don't recommend you doing that. If you just want to make a model smaller, you can use Blender to downscale a WMO.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: Use WMO as M2?
« Reply #4 on: January 19, 2017, 01:40:36 pm »
Like Skarn's said, doing so might not be the best idea. However, if you have no use for WMO functions of your WMO and on the other hand, you would like to make your WMO scaleable, you can export that WMO as OBJ from WMV and go to OBJtoM2 process. You'll loose doodad sets, interior settings, vertex paint, you'll have to have as many geosets as materials(textures) and so on though, but if you can create a custom M2, this should be no problem for you. If you can't do that, learn basics of OBJ to M2 first.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Scytheria23

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 49
    • View Profile
Re: Use WMO as M2?
« Reply #5 on: January 19, 2017, 10:54:07 pm »
Thanks for the suggestions.  Indeed, the situation described is what I'm aiming for (using just the exterior geometry of some WMOs to fast-build lots of walls, walkways, etc).  I think, on balance, custom M2s are the answer.

Scy
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Skarn

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 807
    • View Profile
    • http://skarn-project.net
Re: Use WMO as M2?
« Reply #6 on: January 21, 2017, 09:37:11 am »
Quote from: "Scytheria23"
Thanks for the suggestions.  Indeed, the situation described is what I'm aiming for (using just the exterior geometry of some WMOs to fast-build lots of walls, walkways, etc).  I think, on balance, custom M2s are the answer.

Scy
There is a problem with that too actually. M2s do not have a server navmesh suitable for that purpose on the current cores. So, NPCs, spells and everything is likely to go trough M2s as it works a little bit different than WMO. As for what I know, right now M2s are only used for pathfinding to compute the path of NPC around the object, not on it or in it. However, with some navmesh generator and core modifications, it is possible to achieve what you want. The example video is here:
« Last Edit: January 01, 1970, 01:00:00 am by Admin »