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 »

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!
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 »

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.
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 »

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!
Sweenie
Silver Sponsor
Silver Sponsor
Posts: 92
Joined: Wed Mar 23, 2005 3:29 pm
Location: Sweden
x 1

Post by Sweenie »

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. :)
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 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.
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 »

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... :)
team-pantheon programmer
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 »

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. :)
stowelly
Gnoblar
Posts: 23
Joined: Mon Sep 24, 2007 8:54 pm

Post by stowelly »

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
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 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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
stowelly
Gnoblar
Posts: 23
Joined: Mon Sep 24, 2007 8:54 pm

Post by stowelly »

sorry been busy moving house.... will sort a propper reply later on or tomorrow!!!
stowelly
Gnoblar
Posts: 23
Joined: Mon Sep 24, 2007 8:54 pm

Post by stowelly »

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
Blint
Gnoblar
Posts: 1
Joined: Wed Oct 31, 2007 1:46 pm

meshmagick.dll

Post by Blint »

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!
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 »

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

Post by Beauty »

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

Post by Beauty »

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.
User avatar
Beauty
OGRE Community Helper
OGRE Community Helper
Posts: 767
Joined: Wed Oct 10, 2007 2:36 pm
Location: Germany
x 39
Contact:

Post by Beauty »

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.
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 »

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. :(
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
Nauk
Gnoll
Posts: 653
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
x 36
Contact:

Post by Nauk »

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?
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 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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
Nauk
Gnoll
Posts: 653
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
x 36
Contact:

Post by Nauk »

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
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 »

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.
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 »

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. :)
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
Nauk
Gnoll
Posts: 653
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
x 36
Contact:

Post by Nauk »

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...
Post Reply