Page 1 of 12

Official MeshMagick thread - now licensed under MIT

Posted: Wed May 23, 2007 9:05 pm
by haffax
MeshMagick has been updated for Ogre 1.10 and can be found in OgreAddons: https://bitbucket.org/ogreaddons/meshmagick .

[s]MeshMagick is now part of the Ogre command line tools download. Updated download URL accordingly...[/s]

Today I'd like to announce the first official release of the versatile mesh
manipulation tool MeshMagick.

MeshMagick

MeshMagick is a mesh (and skeleton) manipulation tool for Ogre meshes (and skeletons). It allows to query interesting informations and to transform binary meshes (and skeletons) in many ways.

Are you as annoyed as I was when I started with Ogre? Robot and Ninja don't look into the same direction. The Ninja looks toward -Z, the Robot toward +X. Not anymore! With a single command you can change the direction the robot looks:

Code: Select all

> MeshMagick transform -rotate=90/0/1/0 robot.mesh 
(Make sure the skeleton is in the same directory as the mesh)


This rotates the robot mesh 90° along the Y-axis (0/1/0).
Similarly you can change the scale using the -scale option, or you can translate the mesh along a vector using -translate or you can even realign the mesh in its local coordinate system. Say you want to have the robot pivot point in the model center instead of at the model bottom like it is now. Just call:

Code: Select all

> MeshMagick transform -yalign=center robot.mesh
Same works for X- and Z-alignment.

Transforms can be concatenated and are executed in order.
MeshMagick works directly on the binary mesh (and skeleton) without detour through XML. It allows to use different output file names and is ready for batch use via find or multiple input files (no wildcards).
MeshMagick can not only work as a stand-alone command line tool, but also be linked against your application in order to use transform or merge during your program's runtime. For instance is the merge tool used in Rastullahs Lockenpracht to support mixing mesh parts for characters (A character having a scale-mail shirt, chain greaves and leather bracers for instance)

For full information about how MeshMagick works and what tools are there beside transform please call

Code: Select all

> MeshMagick -help
Download
A binary windows download is available as part of the Ogre command line tools available from the Ogre tools download page.
MeshMagick is free open source software released under the LGPL license. You can download its source code from Ogre's CVS repository under ogreaddons/meshmagick.

Future
I plan further useful tools inside MeshMagick and extension of the existing tools. The first tool to be added is the reorganise-tool, which will allow to reorganise buffers with a simple syntax and do other useful buffer-oriented operations like changing tangent semantics.
I'm also waiting for user input here, if you have a specific need for a new feature, please write about it and provide a real-life example about how this addition would be useful.

Bugs
This is the first official release, MeshMagick only saw limited testing so far. There are likely bugs left. If you encounter one, please notify me by posting in this thread. I will work on removing it then.

Posted: Wed May 23, 2007 9:10 pm
by johnhpus
Wow, sweet! This is awesome haffax.

Posted: Wed May 23, 2007 9:16 pm
by ahmedali
Thanks haffax. This tool carries high utility, I wanted something like this for pre-processing of the meshes.

Posted: Wed May 23, 2007 9:19 pm
by jacmoe
Awesome! :)

Posted: Wed May 23, 2007 10:13 pm
by starbug
Great work!

Here is my binary for OSX if someone is interested:

http://www.sharebigfile.com/file/174934 ... x-zip.html

Posted: Thu May 24, 2007 10:45 am
by Blakharaz
Haffax forgot one point (maybe it was not mentioned intentionally :) ), MeshMagick can also be built as a library, at least for Linux and Windows. This and the LGPL allows using MeshMagick inside other tools or programs.

//Edit: No I've just not read throroughly.

Posted: Thu May 24, 2007 11:22 am
by syedhs
Great! I must say it has been countless of times when I instruct my 3d artist to re-scale objects in 3dsmax. Each time, it takes sometimes and not to mention, bored him too. :wink:

Posted: Thu May 24, 2007 6:33 pm
by haffax
Thank you all for your comments. :)
starbug, glad it works on OSX too. Personally I only tested on Windows so far, but Blakharaz developed on MeshMagick on Linux, so this works just fine too.

Posted: Thu May 31, 2007 10:13 pm
by Jabberwocky
Looks handy!

If possible, could you post more detailed information on the various command line arguments for meshmerge and transform? Or else point me to where they are available?

Thanks!

Posted: Thu May 31, 2007 10:30 pm
by haffax
Jabberwocky, for help on transform just input

Code: Select all

meshmagick -help=transform
It will list all possible options.

meshmerge has no options at this moment, it will just merge all input files to the single output file.

Posted: Fri Jun 01, 2007 12:25 am
by Jabberwocky
Cool, thanks. I see now that I missed the "-help=toolname" bit in the help output.

How do you specify input files vs. output files for meshmerge?

Posted: Fri Jun 01, 2007 3:51 am
by KungFooMasta
Wow how did I miss this thread! :shock:

This was the exact same kind of functionality I was going for with my EntityViewer app, lol.

Of course, I had some problems, and yours would be better built anyway! Looking forward to using this tool. :D

KungFooMasta

Posted: Fri Jun 01, 2007 8:36 am
by haffax
Jabberwocky wrote:How do you specify input files vs. output files for meshmerge?
Like this:

Code: Select all

> meshmagick meshmerge input1.mesh input2.mesh input3.mesh -- output.mesh
I will create a wiki page for the tool, but this has to wait till next week.

Posted: Wed Jun 06, 2007 12:03 am
by walaber
I can't believe I missed this! This tool is going to be an absolute LIFE SAVER! (sorry for the caps). This will seriously help when trying to fix alignment issues post-export from the modeling program.

thank you for this!

Posted: Wed Jun 06, 2007 5:49 am
by jacobb
Great tool! This will fit nicely into my blender workflow...thx a ton! :)

Posted: Wed Jun 06, 2007 6:19 pm
by Duncan Mac Leod
PERFECT! Just what we need ;) ...

THANK YOU!

Posted: Wed Jun 06, 2007 6:23 pm
by jacmoe
I do agree! :)

And what's cool is that it's both a tool and a library - you can drive it from the command-line or from your application. :wink:

Posted: Thu Jun 07, 2007 4:53 pm
by jacobb
I have problems with animation after transforming. After using a "transform -rotate=-90/1/0/0" to correct orientation the animation is incorrect. The original files work as expected.

I've made the files available here, including the original blend file. The .mesh is original export, before transform with meshmagick...transform it and you can see the difference in the animation. The animation is named UpLoop

Posted: Thu Jun 07, 2007 5:58 pm
by haffax
Hi jacobb,

thanks for the bug report. I fixed an error just yesterday that might be connected with your problem. Bone translations weren't handled correctly, so if your animation translates bones, the error might be fixed already. I will test your mesh later this day and tell how it went.

Btw, the binary is not yet updated, but only the version in CVS ogreaddons/meshmagick.

@all, thanks for your comments. I'm glad this tool is useful for you. :)

Posted: Thu Jun 07, 2007 10:58 pm
by haffax
jacobb, I can reproduce the bug. The animation itself is ok, at least with my new version, but the mesh is translated as a whole in the process of the animation. I've yet to figure out what the problem is, but no time right now. The weekend is packed, so I guess this has to wait till next week. :(

But luckily MeshMagick is open source. Hint, hint. ;)

Posted: Sat Jun 09, 2007 6:29 pm
by deficite
Thank you very much for this tool. I'm probably going to be using it extensively on my current project, as I'm very poor at modelling and have to resort to free models ATM.

Posted: Sun Jun 10, 2007 2:27 pm
by shevegen
Is there a standalone download (tarball) of this tool available too? (I was looking at first post but could only find a windows download, I am on Linux though and love to use the source whenever possible :) )

Posted: Mon Jun 11, 2007 1:51 pm
by haffax
shevegen wrote:Is there a standalone download (tarball) of this tool available too? (I was looking at first post but could only find a windows download, I am on Linux though and love to use the source whenever possible :) )
No Linux binaries or source tarball at this moment. But the source is available from ogreaddons/meshmagick and it also has linux makefiles. Fastest way to get bugfixes is to use the cvs directly, I usually see to it, that the CVS is not getting unstable. And if there is need for it, I will branch, so the best version at any time is usually HEAD.

Posted: Tue Jun 12, 2007 6:19 am
by wangpeibin
i can not download from BerliOS Download Server
can you give the other right url?

Posted: Tue Jun 12, 2007 10:17 am
by haffax
wangpeibin wrote:i can not download from BerliOS Download Server
can you give the other right url?
The direct download link is http://download.berlios.de/dsa-hl/meshm ... in_0-4.zip

BerliOS is at the moment the only download option I have available realistically. You can't download it at all from there or maybe you just hit a short downtime? Short outages are nothing out of the ordinary with BerliOS.