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!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Garthog

Pages: 1 [2] 3 4
16
Resources and Tools / Re: [TOOL] OBJ to M2 converter
« on: August 17, 2013, 02:38:30 pm »
Quote from: "fearless_wind"
Just awesome! First stable converter for static models)) Do you plan to make smth with other formats supporting animations?

Yeah, I plan to work on FBX format !

17
Miscellaneous / Re: ERROR #132 - An actual way to fix it. (Build 12340)
« on: August 14, 2013, 08:17:33 pm »
New WoW Error, occuring on "newly enabled" race/class combination. Happening since I did that TrinityCore update ( two years of update ).

WoW Errors occurs on character selection screen, when clicking one of those character.

Here's the error :

ERROR #132 (0x85100084) Fatal Exception
Program:   D:Projet MithrasDossiers WOWWorld of Warcraft MithrasWow.exe
Exception:   0xC0000005 (ACCESS_VIOLATION) at 0023:004E4191

[attachment=0:2t4mt494]Wow error.txt[/attachment:2t4mt494]

EDIT : Found the answer. Basically it's when you have a wrong CHAR_ENUM packet ( with wrong displayid ). It leads to wow errors and strange green items. ( I had an item with entry 0, it made the whole trinitycore server bugging >-< )

18
First script made out of it WMO Light Adder. Permit to add lights and print informations of existing lights.

Here's the code : http://pastebin.com/UytKL9ze

Thanks for that amazing lib.

19
Resources and Tools / [TOOL] OBJ to M2 converter + Sources
« on: August 13, 2013, 10:00:21 pm »
Hello Modcraft,

I'm happy to share my first "good" tool. A OBJ to M2 converter, which permit to create new M2s !
I have to thank several people for that, so :

Thanks schlumpf, gamh, relaxok, mjollna, LIMEEE, Zim4k, allifeur, and all people who contributed to wowdev wiki.

I don't want this tool to be shared anywhere else than on modcraft for now.

What is currently supported by this tool ?



  • Geometry / Normals / Texture coordinates import from OBJ
  • Each "group" is imported as a new geoset. For each geoset, a render flag is created.
  • Each material is imported as a texture
  • Collisions / Bounding boxes are calculated at M2 creation ( thanks to Mjollna )

What is unsupported by this tool ?



  • Animations & Rigging
  • Particles & Ribbons
  • Geosets calculations ( centermass etc.. )
  • MTL Parsing ( it doesn't parse MTL files )
  • Different LOD ( ModelName00.skin is the only skin generated )
  • Cameras

How to use ?



OBJ Format



  • No extra space is allowed in the file. Having the vertex defined like that "v  1.0 1.1  1.3" will make the converter crash. ( It's mainly for 3DS Max )
  • UV Map should stay in the [0,1] space
  • UV Mapping should be done "per vertex". WoW doesn't support multiple texture coordinates per vertice
  • Smoothing must be done through "Normals welding" ( and not vertices welding ). This is 3DS Max option, idk about blender.
  • Normals should be calculated by the 3D software
  • Objects should be exported as "group" ( g in obj file )
  • Probably other things, i just don't remember atm. Anyway, formats below must be respected

Vertex format : "v X Y Z"
Normals format : "vn X Y Z"
Vertex Textures format : "vt U V"

X Y Z are floats. There must be only one space between v, X, Y and Z, else it'll crash ( my bad ).
Same for U and V.

Face format : "f v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn3"
Same there, any extra space and it'll crash.

If it crashes with your OBJ file ( which shouldn't happen if those rules are followed ), just post and tell me if there's an error + send me the obj file so I can look at it.

Export settings for 3DS Max

[attachment=2:39gjq86j]objsettingsmax.png[/attachment:39gjq86j]

Export settings for Blender ( old )



About Materials

There must be 1 material per group( not more, didn't test about less ). Currently, there is a "ugly" hack as I didn't do the MTL Parsing. The texture name is extracted from the "usemtl" statement inside a .obj file.

Meaning, if you have in your OBJ file "usemtl wood", it won't look in the mtl file for the material wood etc.., it'll just use "wood.blp".
Depending on the software you use, material name could be different than the actual texture filename, so be careful with that, i'll implement that on the following days.

Command Line



It's a command line tool, here's the usage :

OBJtoM2.exe MyFile.obj MyModel pathtomytexturesinthempq

MyModel argument shouldn't have any extension ( else it'll lead to strange filenames )
pathtomytexturesinthempq must have a  at the end.

That's all I think, enjoy, and don't forget to post screens of the things you do with that, and report all bugs you might encounter !

[attachment=3:39gjq86j]OBJtoM2.rar[/attachment:39gjq86j]


UPDATE : Working for WinXP 32 bits version

[attachment=1:39gjq86j]OBJtoM2.rar[/attachment:39gjq86j]

This new version doesn't add texture automatically, there is a built-in console that permit you to add textures / textureunit / renderflag.

It also permits to add reflect on models quite easily.

Garthog

UPDATE : Sources

I do not really have time to work on that anymore. It has more potential than only a bad command line tool. So here are the sources. You're free to change it, though if you do so, you're strongly encouraged to share the modifications.

Such a tool wouldn't exist without the help I got from the community, and previously shared things, so let's continue that mind.

[attachment=0:39gjq86j]OBJtoM2_SOURCE.rar[/attachment:39gjq86j]

-> Proposed todo list :
--> The CMD sucks
--> Make a more generic format to which M2 will be loaded.
--> FBX ?
--> 3D View + QT ?

Have fun & good luck !

20
Maybe there's a flag somewhere you have to put in the WMO. You should investigate that with PyWMO lib from gamh

21
What server are you using ? Trinitycore ?

Well, if it is, I did some research :

Code: [Select]
if (movementInfo.flags & MOVEMENTFLAG_ONTRANSPORT)
    {
        // transports size limited
        // (also received at zeppelin leave by some reason with t_* as absolute in continent coordinates, can be safely skipped)
        if (movementInfo.t_pos.GetPositionX() > 50 || movementInfo.t_pos.GetPositionY() > 50 || movementInfo.t_pos.GetPositionZ() > 50)
        {
            recvData.rfinish();                 // prevent warnings spam
            return;
        }

        if (!Trinity::IsValidMapCoord(movementInfo.pos.GetPositionX() + movementInfo.t_pos.GetPositionX(), movementInfo.pos.GetPositionY() + movementInfo.t_pos.GetPositionY(),
            movementInfo.pos.GetPositionZ() + movementInfo.t_pos.GetPositionZ(), movementInfo.pos.GetOrientation() + movementInfo.t_pos.GetOrientation()))
        {
            recvData.rfinish();                 // prevent warnings spam
            return;
        }

        // if we boarded a transport, add us to it
        if (plrMover)
        {
            if (!plrMover->GetTransport())
            {
                // elevators also cause the client to send MOVEMENTFLAG_ONTRANSPORT - just dismount if the guid can be found in the transport list
                for (MapManager::TransportSet::const_iterator iter = sMapMgr->m_Transports.begin(); iter != sMapMgr->m_Transports.end(); ++iter)
                {
                    if ((*iter)->GetGUID() == movementInfo.t_guid)
                    {
                        plrMover->m_transport = *iter;
                        (*iter)->AddPassenger(plrMover);
                        break;
                    }
                }
            }
            else if (plrMover->GetTransport()->GetGUID() != movementInfo.t_guid)
            {
                bool foundNewTransport = false;
                plrMover->m_transport->RemovePassenger(plrMover);
                for (MapManager::TransportSet::const_iterator iter = sMapMgr->m_Transports.begin(); iter != sMapMgr->m_Transports.end(); ++iter)
                {
                    if ((*iter)->GetGUID() == movementInfo.t_guid)
                    {
                        foundNewTransport = true;
                        plrMover->m_transport = *iter;
                        (*iter)->AddPassenger(plrMover);
                        break;
                    }
                }

                if (!foundNewTransport)
                {
                    plrMover->m_transport = NULL;
                    movementInfo.ClearTransport();
                }
            }
        }

        if (!mover->GetTransport() && !mover->GetVehicle())
        {
            GameObject* go = mover->GetMap()->GetGameObject(movementInfo.t_guid);
            if (!go || go->GetGoType() != GAMEOBJECT_TYPE_TRANSPORT)
                movementInfo.flags &= ~MOVEMENTFLAG_ONTRANSPORT;
        }
    }
    else if (plrMover && plrMover->GetTransport())                // if we were on a transport, leave
    {
        plrMover->m_transport->RemovePassenger(plrMover);
        plrMover->m_transport = NULL;
        movementInfo.ClearTransport();
    }

Basically it means even when you're out of the transport, your client is still having the flag : MOVEMENTFLAG_ONTRANSPORT , so it's client-side, maybe you should check your WMOs bounding boxes etc.. !

22
Noggit / Re: Development progress
« on: July 29, 2013, 02:39:11 am »
Nice, good things coming. I have to say I agree with Schlumpf, but that's great someone is working on that.

23
Thank you very much ! Searched this for some time x)

24
General / Re: [NUT] Custom Ship and fly routes on custom maps
« on: March 17, 2013, 09:00:54 pm »
Also don't forget there are two transports type. The one for ship / zep etc.., and the other for elevators / some random things. The main differences between the two is that Ship / Zep coords are absolute ( When x = 20 for a node, it's x = 20 on the map ), while for Elevators when x = 20, it means elevators->position_x + 20.

I'll release info on those elevators, they are really useful, you can make little boat to travel on a lake, elevators, and other random things. However I have no idea if it works with WMOs.

About the map on transport, every transport has a map for it's route. With an ID etc.. It's mainly for Unit i guess, as a unit should have a spawn point, how do you specify the static coord of a transport on another map ? It's better to make the transport have it's own map, like map 610 where 0, 0, 0 should be the center ( or another point, don't know ) of the transport.

25
Resources and Tools / Re: [TOOL] 3ds to WMO
« on: March 05, 2013, 02:09:51 am »
Impressive work ! Can't wait to see more !

26
The patch should be downloaded in a temp folder, and then added to your patch in WoW/Data folder. You might want to add me on skype so that i'll explain you how it works. ( my skype is gragorundermine )

27
Serverside Modding / Re: Trinity core gossip
« on: February 03, 2013, 05:17:28 am »
Yes there is, but you have to code it server side. Nothing too hard, I guess there are already existing example on trinitycore project.

28
Serverside Modding / Re: [QUESTION] DBC Hair Colour Edit
« on: February 01, 2013, 12:36:25 am »
I'll test it and see if I get the same issue, however, the best way would be modifying the DBCs to make all colors available at character creation.

29
Is this for the modcraft community launcher ?

30
Ahah, seems to be like Dune in warcraft. You should call it Dune-craft !
Awesome work.

Pages: 1 [2] 3 4