Modcraft - The community dedicated to quality WoW modding!

Featured => Noggit => Topic started by: Scytheria23 on January 18, 2017, 10:12:58 pm

Title: Use WMO as M2?
Post by: Scytheria23 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
Title: Re: Use WMO as M2?
Post by: schlumpf on January 18, 2017, 11:02:03 pm
The game engine only allows that, not noggit: https://wowdev.wiki/ADT/v18#MDDF_chunk (https://wowdev.wiki/ADT/v18#MDDF_chunk" onclick="window.open(this.href);return false;) vs https://wowdev.wiki/ADT/v18#MODF_chunk (https://wowdev.wiki/ADT/v18#MODF_chunk" onclick="window.open(this.href);return false;)
Note how there is no scale field for modf.
Title: Re: Use WMO as M2?
Post by: Scytheria23 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.
Title: Re: Use WMO as M2?
Post by: Skarn 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.
Title: Re: Use WMO as M2?
Post by: Amaroth 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.
Title: Re: Use WMO as M2?
Post by: Scytheria23 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
Title: Re: Use WMO as M2?
Post by: Skarn 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: https://www.youtube.com/watch?v=gi2SjFAYamc (https://www.youtube.com/watch?v=gi2SjFAYamc" onclick="window.open(this.href);return false;)