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.


Topics - Garthog

Pages: [1]
1
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 !

2
FuTa / [BUG] Alphamap export [Rev 41]
« on: April 04, 2012, 01:09:12 pm »
Here's what I get when I do export alphamaps from Azeroth_28_41.adt

[spoiler:3gngmc9y]Layer 1


Layer 2


Layer 3
[/spoiler:3gngmc9y]

Here's noggit 2D view of the ADT :



Here's a link to the ADT :

http://localhostr.com/files/4pSTpE5/Azeroth_28_41.adt

3
Development and Presentation / [PROJECT] [WIP] Community Launcher
« on: February 23, 2012, 07:18:21 pm »
Hello,

I'm here to present my project of a Community Launcher. First, what is it ? It's basically a launcher, with two important features that were missing in a lot of launcher I saw : Patching / Autoupdate.

I think that it's the only use for a launcher. Spread your custom modifications / eventually add some repair | check functions. And this is what I expect my launcher to do. Spread your patches, without having to worry about versionning etc..

It will get a patchlist to download from a Host you specify, at a URL you specify ( for now, and for test purpose, url is http://localhost/update/getlist.php, and it send two parameters : Launcher version, Patch version ). And it'll download every patch you provide in this page.

How does the patching works ?

First, it creates a file inside your Data folder, ( which is - for now - names patch-R.MPQ ), which contains your data. When created, it's empty. Then, you just have to add some updates.

Updates are in .rvp format ( It's MPQ but I needed to find a name, to make a difference ). It has a patching sequence inside, which - for now - has three command :

a [FileName] : it replace or add FileName in the patch-R from the .RVP update
d [FileName] : it deletes FileName from the patch-R
e [FileName] [Destination] : it extracts the FileName, from .RVP, to Destination, on the local filesystem

For exemple, if you have a .rvp archive, which contains 3 files :

- patch_sequence
- Test.rar
- WORLD/test.dbc

and if the patch_sequence is

Quote
a WORLD/test.dbc
d WORLD/Map.exemple
e Test.rar C:/sometest.rar

It will update / add WORLD/test.dbc in patch-R, delete WORLD/Map.exemple from patch-R, and extract Test.rar to that location.

This system is simple, but it permits ( with a good versionning ) to send a lot of update, and keep a trace of each. For exemple, if you have a patch which weight 300mo, and you have to delete or update one file, your update will only contain that file, and that patch_sequence. It will increment the patch-R version, etc.. etc..

It's coded in C++, and use StormLib and Qt. I develope it with QtCreator.

Working features :

- Logging ( For debug purposes )
- All MPQ manipulations ( create / add file / update file / remove file / apply patch file etc.. )
- Versionning ( For now it's still very basic, but you can set the version of your launcher, and of a patch )
- Queuing / Downloading files, and apply all the patches when downloaded.
- Versionning is done
- Webpart has been done

TODO List before release :

- Auto-update of the Launcher. ( Quite done, but I have to modify the .pro, in order to auto-increment version, auto-generate the update, and then you just have to upload it to some host )
- Translate it with QtLinguist ( and put all these tr() )
- Code basic GUI functions ( Menu, Clear cache, Launch game etc.. :p )
- Make the GUI beautiful
- Compile with static version of qt
- Test it

TODO List which is not needed before release ( and which won't be worked before ) :

- StormLib is loaded with a QLibrary hack. It should be static, like that, no StormLib.dll
- Improve patching ( Adding some command, like Exe modification etc.. )
- Support for Changelog, for patch
- Adding some asynchronous cryptography ( for exemple, if you want to download only signed patch etc.. etc.. )

When it will be fully working and when it'll be easy to do autoupdate, I'll release source code.
Feel free to ask if you didn't understand something, or if you have a suggestion / question !

Garthog.

4
Resources and Tools / [C++] LightAdder
« on: August 04, 2011, 12:57:21 am »
It's a tool which is used to add lights to M2. As a screen talk much than writing :



Download : Windows / Source / OSX / Linux

How to use : Drag a M2 file on the LightAdder, and then follow the menu. It's still a work in progress, so some things don't work, like deletion.

Create light : AR = Ambiant Red | AG = Ambiant Green | AB = Ambiant Blue | AI = Ambiant Intensity
DR, DG, DB, DI ( Same thing as ambiant ).

Modify : ID => Number of the light with the i command on the menu ( start from 0 )
And the rest work as intended. Be careful some things are integers, others are float ( eg : 1.24 ).

Author : Me, and help from Schlumpf / Tigurius / pxr.dk !

Thanks ! Don't hesitate to post me some improvements !

5
Modelling and Animation / [QUESTION] Why does my m2 disappear ?
« on: July 04, 2011, 04:27:38 am »
Hi everyone, i'm new to this community ( Sorry, I feel a little rude because I didn't introduce myself :o )
I have a little problem. I took a box model, and i started to edit it.
When I make it longer, it disappears, depending on the angle of the camera. I guess it's because it's bigger than the original M2, and WoW executable "thinks" we don't see it, so, it doesn't render it.

How can I fix this model, so it will render it properly, when we can see it ?
(Also, does someone know another link to a WoW Dev wiki ? )

Thanks !

Pages: [1]