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
Bren
Goblin
Posts: 215
Joined: Tue Jul 08, 2003 4:41 pm
Location: 0,0,0
Contact:

Post by Bren » Mon Sep 03, 2007 10:22 pm

Can meshmagick be used to combine individual animations from multiple skeletons into one (master) skeleton file? We are running into content creation problems with Maya/MotionBuilder being unable to handle all our anims. We are trying to set up a pipeline that would allow us to have individual animations in many skeleton files, and then offline process them all into one "master" skeleton file.

Also, any comments on this:
hmoraldo wrote:An option to combine different meshes in an only mesh (interpreting different meshes as different poses of a same mesh) would be useful too, for exporting mesh poses when using exporters that can't deal properly with pose & pose animations.
We are also running into a lot of problems with getting pose/pose anims out of Maya. Is there any way meshmagick will save our bacon here?

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 » Mon Sep 03, 2007 10:40 pm

MeshMagick can't yet merge animations from multiple skeleton files into one, adding it to the merge tool is probably not difficult.
But are you aware of Ogre's animation link feature? You can link animations in a skeleton file to a skeleton in another skeleton file. I don't know whether Maya exporter can do this out of the box. But Ankh, whose characters are animated in Maya, uses this feature. This way there wouldn't be a need to have a single big skeleton file.

As for hmoraldo's proposal, I seem to have missed that. Sorry. This doesn't sound too difficult. I add it to the todo-list, but don't expect it to be done anytime soon. I still am busy with summer of code aftermath, Rastullas Lockenpracht and another MeshMagick tool I have in the pipeline. I probably won't come to this feature in this or the next month.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
Bren
Goblin
Posts: 215
Joined: Tue Jul 08, 2003 4:41 pm
Location: 0,0,0
Contact:

Post by Bren » Tue Sep 04, 2007 12:13 am

I'm working on using the meshmagick dll to do the skeleton merge, and so far so good. One small thing -- I had to make the EditableSkeleton exportable.

On further though, I don't think meshmagick could help with a pose anim problem, given that it is actually getting the pose anims out of Maya that is the problem.

EDIT: Looks like I don't even need to use EditableSkeleton -- the base Ogre::Skeleton is adequate for my needs. But all the other stuff meshmagick does (particularly OgreEnvironment) is very handy. Good stuff!
0 x

Sweenie
Silver Sponsor
Silver Sponsor
Posts: 91
Joined: Wed Mar 23, 2005 3:29 pm
Location: Sweden
x 1

Post by Sweenie » Thu Sep 06, 2007 3:16 pm

Hi.

Got a feature request on scaling, actually two...

"FitBox"
Makes the mesh fit inside a defined box.
Example usage
transform -FitBox/5/10/5
Would make the mesh have a size of exactly 5x10x5 units.

"FitAxis" ???Uhm, please come up with a better name
Makes the mesh scale to a certain length on a specific axis, but still performing a uniform scaling.
Example usage
transform -FitAxis/1.8/Y
or maybe
transform -FitAxis/1.8/0/1/0
For example if I want to scale a character to be exactly 1.8 meters on the Y-Axis.

Hope you understand what I mean. :)
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 Sep 06, 2007 3:45 pm

Hi Sweenie, yes I understand what you mean and like this proposal very much. I will definitely add these features, as they are obviously useful.
Though I'm not going to promise a date. This is simple enough to do in-between the other planned changes.
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 » Tue Sep 11, 2007 10:20 pm

I just committed an update to the CVS. There are two relevant improvements:

* transform tool now has a -resize=X/Y/Z option. X, Y and Z each can be either a value, or 's' or 'k'. In case of a value, the mesh is scaled on this axis so the the size of the bounding box on this axis matches the set value. If 's' (scale) is set to an axis, this axis is scaled according to the scale factor needed to resize an axis whose value is set. In case of 'k' (keep) the axis scale is not changed. This implements both changes, that Sweenie proposed, into a single new option. I believe 'resize' is a better name than 'fit', but it took me a while to come to this conclusion. ;)

* info tool now also displays the bounding box of a mesh. If the mesh's bounding box differs from the bounding box that is calculated from all vertices' positions (like in robot.mesh), then both are shown. This way you can easily see, if the bounding box has to be reset.

Both new functions are not thoroughly tested yet. I only tested them with the robot.mesh/skeleton, but did not find any problems. I will test them with other meshes soon too.

Nevertheless I like you to test the functions as well. The more eyes and so on... :)
0 x
team-pantheon programmer
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 3

Post by syedhs » Fri Oct 26, 2007 8:25 pm

There is a tiny thing which I noticed when I tried to optimize mesh - mesh which was unchanged (cannot be optimized further) get written anyway. I think the mesh should only be written if there is a change. :)
0 x

stowelly
Gnoblar
Posts: 23
Joined: Mon Sep 24, 2007 8:54 pm

Post by stowelly » Sun Oct 28, 2007 8:17 pm

I think there is a bug with the scaling program, i had to scale the ninja.mesh file by 0.02,0.02,0.02 and the camera tracking became completely messed up, could have just been me though

basically it was fine when using the ninja.mesh manually scaled at 0.02, using meshmajick scaled it to the correct size, but the camera tracking was really off
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 Oct 29, 2007 8:08 pm

Thank you for your feedback. :)

syedhs, this is the tool programmer's decision, so technically Sinbad has to answer it, but well, at least your meshes get updated to latest Ogre mesh version this way. ;)

stowelly, I couldn't recreate your problem with auto tracking and the scaled ninja.mesh. Did you scale the skeleton with the mesh? (usually done automatically, if skeleton was found) Can you please provide your code snippet and the output of

Code: Select all

meshmagick -verbose info ninja.mesh
for further investigation? Do this for your scaled version of the mesh please.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

stowelly
Gnoblar
Posts: 23
Joined: Mon Sep 24, 2007 8:54 pm

Post by stowelly » Wed Oct 31, 2007 2:50 pm

sorry been busy moving house.... will sort a propper reply later on or tomorrow!!!
0 x

stowelly
Gnoblar
Posts: 23
Joined: Mon Sep 24, 2007 8:54 pm

Post by stowelly » Sat Nov 03, 2007 12:56 pm

it appears it was just the offset i had specified for my 3rd person cam, sorry i didnt test this properly before reporting as a bug
0 x

Blint
Gnoblar
Posts: 1
Joined: Wed Oct 31, 2007 1:46 pm

meshmagick.dll

Post by Blint » Mon Nov 05, 2007 1:54 pm

Hi,
I'd like to use the dll version of meshmagick, but I had trouble getting Cygwin, so I can't download from cvs. Could someone please help me get the dll or help me to get a tool to download cvs stuff?
Thanks a lot!
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 Nov 05, 2007 6:10 pm

You don't need cygwin to download from CVS. Just use TortoiseCVS, with the CVSROOT settings you get on the ogreaddons-webpage, I gave you the link to.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
Beauty
OGRE Community Helper
OGRE Community Helper
Posts: 767
Joined: Wed Oct 10, 2007 2:36 pm
Location: Germany
Contact:

Post by Beauty » Thu Nov 08, 2007 6:55 pm

A nice tool (-:

You can also offer an option like -longhelp where all tools with their options ar listed at once. I would prefer this.

I miss the version number in the tool.
The first line could include it:
MeshMagick 0.4 - versatile Ogre mesh manipulation tool.

The wiki article about is very barely.
Can somebody include a list of the tools and their help information?
I would do, but I have no right.

Greetings from Germany

Beauty
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 Nov 08, 2007 7:30 pm

Thank you for your comments, Beauty. :)

Everybody with a forum account can edit wiki pages. Just log in with your forum username and password and you can edit.

You can get the version of MeshMagick and the Ogre version used to compile it with:

Code: Select all

MeshMagick -version
I'm not sure about the -longhelp option, as you usually want specific help for the tool you want to use and not for all at once. This option will hardly ever be used.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
Beauty
OGRE Community Helper
OGRE Community Helper
Posts: 767
Joined: Wed Oct 10, 2007 2:36 pm
Location: Germany
Contact:

Post by Beauty » Thu Nov 08, 2007 8:57 pm

I just remembered that I wanted to correct some little mistakes at reading the beginner tutorials and I couln't do. Thanks for the tip.

The option -version was not listed by the help.
Show it by default would be more easy and takes not much space.

The -longhelp idea was, because it was strange to get the detail options.
type -help ... type -list ... type -help=xx
I could not make just a pipe to a text file where is all included.
The packing program RAR also offers a full detailed option, which is nice to use.
An other idea:
Include the -list printing into the -help option.
E.g. show the names/descriptions after the global options listing.
And in the listing - add some spaces to get all "-" one upon the other. This is more nice to read.

Code: Select all

info      - print information about the mesh.
meshmerge - Merge multiple submeshes into a single mesh.
optimise  - Optimise meshes and skeletons.
rename    - Rename different elements of meshes and skeletons.
transform - Scale, rotate or otherwise transform a mesh.
0 x

User avatar
Beauty
OGRE Community Helper
OGRE Community Helper
Posts: 767
Joined: Wed Oct 10, 2007 2:36 pm
Location: Germany
Contact:

Post by Beauty » Thu Nov 08, 2007 9:46 pm

Now I extended the wiki article.

For -meshmerge is no help text in the tool.

A new idea at -rename:
Add a prefix to material names (and maybe also update the material file).
In the past I had problems with converted objects which use similar material names like material001 in different objects.
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 Nov 09, 2007 7:24 pm

Thanks for your wiki page work. Much appreciated. :)
I'll add the missing -version help and meshmerge tool help.

For the rename tool I can imagine quite few improvements. The rename tool was done, because we needed it for our project and so far it can do what we needed back then, but not much more. Alas, I don't have the time to do this right now and my next improvement to MeshMagick will be a new tool, which I have in work about mesh buffer reorganisation, which I believe to be very useful. But even this will have to wait. :(
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
Nauk
Gnoll
Posts: 647
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
Contact:

Post by Nauk » Wed Jan 16, 2008 8:04 pm

Hello, I have just found a possible bug in meshmagick:

When modifying meshes with IK-solvers, the mesh distorts somewhat horribly when animated after that. Tools used: Blender 2.45, the latest Ogre-exporter, Ogre 1.4, the latest Meshmagick.

Here after exporting from Blender and before applying a -90 x rotation with Meshmagick, (mesh rotated with the mouse in the Ceguimeshviewer):
Image

Here after applying the -90 x rotation with Meshmagick:
Image

Here a shot of the armature:
Image

We have been testing around for a while, redoing the whole rigging, double checking all settings, etc. until we figured this otherwise invaluable & wonderful tool is causing the problems. I also rechecked it again with older animations without IK-chains, there it is working just fine, also baking the IKs doesn't fix the problem. At first I had been using an older version of Meshmagick, which caused similar problems, those looked very much like it entirely ignores the IK-chain. Any ideas what could be causing it?
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 » Wed Jan 16, 2008 9:09 pm

Hi Nauk, this problem is new to me and I don't have an idea yet. It is astounding that IK causes the problem to appear as after the export IK info is lost. Does the bind pose look alright in the mesh viewer and the problem only start during animation or is the bind pose skewed to?

Anyway, easiest way to solve this, if you could mail me the mesh and skeleton after export but before applying meshmagick, I will have a look then and hopefully find the bug.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
Nauk
Gnoll
Posts: 647
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
Contact:

Post by Nauk » Wed Jan 16, 2008 10:14 pm

The bind pose if that is the resting pose seems fine. I have packed down .blend file, meshes etc and sent you the download location via mail. So you have the complete chain. Thanks for the quick response and for looking into it! :)

/Nauk
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 » Wed Jan 16, 2008 10:40 pm

Thanks, Nauk. Got the package and it contains everything I need to work this out. Probably a mistake in the animation transformation code, I will look at this tomorrow evening.
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 Jan 17, 2008 9:39 pm

Hi Nauk, I just tested your mesh with meshmagick myself with the command lines you provided in the info text file and it works.

Do you maybe use the binary version of meshmagick? The one you can download from the homepage is not up to date and not all bugfixes made in last year are in there. I'll ping Sinbad about it, so that it is updated in next release.

The version in CVS (ogreaddons/meshmagick) works and processes your mesh properly and the transformed mesh and its animations work as they should. Please compile meshmagick yourself and it will work. :)
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
Nauk
Gnoll
Posts: 647
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
Contact:

Post by Nauk » Fri Jan 18, 2008 1:34 am

Ok just tried what you suggested and it works like a charm! Thanks a lot for looking into this Haffax :) and special thanks from DragonSnail, she was squeekingly happy not having to do the animation yet again.

Time to get the Troll dressed...
0 x

Post Reply