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
Contact:

Official MeshMagick thread - now licensed under MIT

Post by haffax » Wed May 23, 2007 9:05 pm

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.
Last edited by haffax on Fri Sep 14, 2007 3:11 pm, edited 3 times in total.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
johnhpus
Platinum Sponsor
Platinum Sponsor
Posts: 1186
Joined: Sat Apr 17, 2004 2:49 am

Post by johnhpus » Wed May 23, 2007 9:10 pm

Wow, sweet! This is awesome haffax.
0 x

User avatar
ahmedali
Gnome
Posts: 302
Joined: Fri Feb 20, 2004 8:52 pm
Location: Lahore, Pakistan

Post by ahmedali » Wed May 23, 2007 9:16 pm

Thanks haffax. This tool carries high utility, I wanted something like this for pre-processing of the meshes.
0 x

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

Post by jacmoe » Wed May 23, 2007 9:19 pm

Awesome! :)
0 x
/* 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 » Wed May 23, 2007 10:13 pm

Great work!

Here is my binary for OSX if someone is interested:

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

User avatar
Blakharaz
Gnoblar
Posts: 19
Joined: Wed Jun 02, 2004 8:51 pm
Location: Potsdam, Germany

Post by Blakharaz » Thu May 24, 2007 10:45 am

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.
0 x
Coder in the Pantheon team - creators of Rastullahs Lockenpracht

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2702
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 1

Post by syedhs » Thu May 24, 2007 11:22 am

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:
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Thu May 24, 2007 6:33 pm

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.
0 x
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
Contact:

Post by Jabberwocky » Thu May 31, 2007 10:13 pm

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!
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Thu May 31, 2007 10:30 pm

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.
0 x
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
Contact:

Post by Jabberwocky » Fri Jun 01, 2007 12:25 am

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?
0 x

User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
Contact:

Post by KungFooMasta » Fri Jun 01, 2007 3:51 am

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
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Fri Jun 01, 2007 8:36 am

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.
0 x
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 » Wed Jun 06, 2007 12:03 am

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!
0 x
Go Go Gadget OGRE!!
Image

User avatar
jacobb
Greenskin
Posts: 127
Joined: Tue Feb 14, 2006 1:34 am
Location: Orlando, FL

Post by jacobb » Wed Jun 06, 2007 5:49 am

Great tool! This will fit nicely into my blender workflow...thx a ton! :)
0 x

User avatar
Duncan Mac Leod
Halfling
Posts: 79
Joined: Fri Jun 23, 2006 12:27 am
Location: Germany
Contact:

Post by Duncan Mac Leod » Wed Jun 06, 2007 6:19 pm

PERFECT! Just what we need ;) ...

THANK YOU!
0 x

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

Post by jacmoe » Wed Jun 06, 2007 6:23 pm

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:
0 x
/* 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

Post by jacobb » Thu Jun 07, 2007 4:53 pm

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
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Thu Jun 07, 2007 5:58 pm

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. :)
0 x
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
Contact:

Post by haffax » Thu Jun 07, 2007 10:58 pm

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. ;)
0 x
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 » Sat Jun 09, 2007 6:29 pm

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.
0 x

shevegen
Gnoblar
Posts: 17
Joined: Fri May 13, 2005 6:21 pm

Post by shevegen » Sun Jun 10, 2007 2:27 pm

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 :) )
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Mon Jun 11, 2007 1:51 pm

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

wangpeibin
Gnoblar
Posts: 11
Joined: Thu Apr 05, 2007 5:37 am

Post by wangpeibin » Tue Jun 12, 2007 6:19 am

i can not download from BerliOS Download Server
can you give the other right url?
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Tue Jun 12, 2007 10:17 am

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

Post Reply