Official MeshMagick thread - now licensed under MIT

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Official MeshMagick thread - now licensed under MIT

Post by haffax »

MeshMagick has been updated for Ogre 1.12 and can be found in OgreAddons: https://github.com/OGRECave/meshmagick.

MeshMagick is now part of the Ogre command line tools download. Updated download URL accordingly...

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.
Last edited by haffax on Fri Sep 14, 2007 3:11 pm, edited 3 times in total.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
johnhpus
Platinum Sponsor
Platinum Sponsor
Posts: 1186
Joined: Sat Apr 17, 2004 2:49 am
x 3

Post by johnhpus »

Wow, sweet! This is awesome haffax.
User avatar
ahmedali
Gnome
Posts: 302
Joined: Fri Feb 20, 2004 8:52 pm
Location: Lahore, Pakistan

Post by ahmedali »

Thanks haffax. This tool carries high utility, I wanted something like this for pre-processing of the meshes.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Awesome! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
starbug
Halfling
Posts: 56
Joined: Wed Jan 24, 2007 7:06 pm
Location: Germany

Post by starbug »

Great work!

Here is my binary for OSX if someone is interested:

http://www.sharebigfile.com/file/174934 ... x-zip.html
User avatar
Blakharaz
Gnoblar
Posts: 19
Joined: Wed Jun 02, 2004 8:51 pm
Location: Potsdam, Germany

Post 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.
Last edited by Blakharaz on Thu May 24, 2007 12:26 pm, edited 1 time in total.
Coder in the Pantheon team - creators of Rastullahs Lockenpracht
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Post 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:
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post 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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
Jabberwocky
OGRE Moderator
OGRE Moderator
Posts: 2819
Joined: Mon Mar 05, 2007 11:17 pm
Location: Canada
x 218
Contact:

Post 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!
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post 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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
Jabberwocky
OGRE Moderator
OGRE Moderator
Posts: 2819
Joined: Mon Mar 05, 2007 11:17 pm
Location: Canada
x 218
Contact:

Post 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?
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post 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
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post 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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
walaber
OGRE Expert User
OGRE Expert User
Posts: 829
Joined: Sat Oct 02, 2004 2:20 pm
Location: California, USA
Contact:

Post 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!
Go Go Gadget OGRE!!
Image
User avatar
jacobb
Greenskin
Posts: 127
Joined: Tue Feb 14, 2006 1:34 am
Location: Orlando, FL
x 1

Post by jacobb »

Great tool! This will fit nicely into my blender workflow...thx a ton! :)
User avatar
Duncan Mac Leod
Halfling
Posts: 79
Joined: Fri Jun 23, 2006 12:27 am
Location: Germany
Contact:

Post by Duncan Mac Leod »

PERFECT! Just what we need ;) ...

THANK YOU!
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post 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:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
jacobb
Greenskin
Posts: 127
Joined: Tue Feb 14, 2006 1:34 am
Location: Orlando, FL
x 1

Post 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
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post 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. :)
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post 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. ;)
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
deficite
Gremlin
Posts: 160
Joined: Sat Oct 15, 2005 4:31 pm
Location: TN, USA
Contact:

Post 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.
shevegen
Gnoblar
Posts: 17
Joined: Fri May 13, 2005 6:21 pm

Post 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 :) )
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post 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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
wangpeibin
Gnoblar
Posts: 11
Joined: Thu Apr 05, 2007 5:37 am

Post by wangpeibin »

i can not download from BerliOS Download Server
can you give the other right url?
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post 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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
Post Reply