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
BonD
Gnoblar
Posts: 4
Joined: Mon Jan 07, 2008 3:39 pm

Post by BonD » Tue Jan 29, 2008 6:49 pm

I got it from CVS because the old one has some problems with resizing animations, but I can't compile it.

It uses OgreMainStatic.lib, and I don't have such library file (I'm using the prebuild SDK)...

Where can I get it?

*Or is there any way to get around 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 » Tue Jan 29, 2008 7:45 pm

Hi BonD, two possible ways: You can compile Ogre yourself and there the ReleaseStaticLib configuration, this will create OgreMainStatic.lib. Or you can change the linker settings of the MeshMagick project and just change the the linker input from OgreMainStatic.lib to OgreMain.lib and remove OGRE_STATIC_LIB from the preprocessor definitions in the C/C++ project settings.

It might be a good idea to just use Ogre source version instead of the SDK, it will work better with addon projects usually (as can be seen here), and it makes debugging more comfortable, when you can debug into ogre. But changing meshmgaick project settings should work too.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
BonD
Gnoblar
Posts: 4
Joined: Mon Jan 07, 2008 3:39 pm

Post by BonD » Tue Jan 29, 2008 7:59 pm

Thanks for the fast reply.

Yes, I will change to the source version of Ogre once, but while I'm just learning Ogre and its features SDK is enough..

I've tried to change the linker input to OgreMain.lib but then I got linker errors, but now I know what was missing.

Thanks again for your help and for this great tool.
0 x

User avatar
Jerky
Orc Shaman
Posts: 791
Joined: Wed Mar 02, 2005 4:13 am
Location: Springville, Utah
Contact:

Post by Jerky » Fri Feb 15, 2008 5:02 am

KungFooMasta wrote:Wow how did I miss this thread! :shock:
Umm, thats what I am thinking. One of our programmers just pointed me here. I can't believe I missed this tool. Looks likely a hugely helpful set of abilities.

Thanks haffax!
0 x
Erik Briggs (Jerky)
My Blog
Project Wish
Image

User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
Contact:

Post by Praetor » Sat Feb 16, 2008 10:29 pm

Never had a need to try this out yet, until I got an unaligned mesh. Lined it right up very easily. Excellent tool! I ran into crashes whenever I mistyped commands though.
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 » Sat Feb 16, 2008 11:36 pm

Thank you all, I am very glad this tool is useful for you. Now that I've got a little time at hand again, I will work on the reorganise tool again.

Praetor: Did you use the binary version or the CVS one? Actually there shouldn't be a crash on misnamed options or files. I tested a little and didn't make the program crash. Do you maybe remeber what arguments caused a crash?
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
Contact:

Post by Praetor » Sun Feb 17, 2008 4:00 am

I grabbed it from CVS. It crashed when I did not input the tool name, just input arguments like "MeshMagick -xalign=center"
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 » Sun Feb 17, 2008 9:55 am

Thanks, got it. Fixed in CVS.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

FredFriendship
Gnoblar
Posts: 3
Joined: Tue Feb 19, 2008 2:13 am

Post by FredFriendship » Wed Feb 27, 2008 3:05 am

On a somewhat related note, but not quite, how did you get the meshes to load nicely? I'm trying to load them like you did in your code, without a root and scenemanager and all, but whenever I try to create a meshptr like you do, I always get the error:

OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource avatar.mesh in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 604)

I've created a LogManager, Log, ResourceGroupManager, MeshManager, DefaultHardwareManager, and MeshSerializer in the same order as you, yet I always crash, while I was able to build and run MeshMagick fine(on Windows).

Thanks

EDIT: Never mind, your code ran fine, it was mine that was causing that exception immediately after.
0 x

User avatar
steven
Gnoll
Posts: 657
Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)
Contact:

Post by steven » Sat Mar 01, 2008 12:17 pm

I tried to compile MeshMagick in Release_DLL.

Ogre 1.5.0 have multithreading enabled and because of this it stopped compiling EditableSkeleton.cpp with

Code: Select all

1>EditableSkeleton.cpp
1>C:\Work\Library\boost_1_34_1\boost/thread/recursive_mutex.hpp(75) : error C2248: 'boost::noncopyable_::noncopyable::noncopyable' : cannot access private member declared in class 'boost::noncopyable_::noncopyable'
1>        C:\Work\Library\boost_1_34_1\boost/noncopyable.hpp(27) : see declaration of 'boost::noncopyable_::noncopyable::noncopyable'
1>        C:\Work\Library\boost_1_34_1\boost/noncopyable.hpp(22) : see declaration of 'boost::noncopyable_::noncopyable'
1>        This diagnostic occurred in the compiler generated function 'boost::recursive_mutex::recursive_mutex(const boost::recursive_mutex &)'
This is caused by the line 28 of EditableSkeleton.cpp where it tries to copy-constructor a skeleton.

Code: Select all

	EditableSkeleton::EditableSkeleton(const Ogre::Skeleton& skel)
	: Skeleton(skel)   <----- HERE
Ogre::Skeleton doesn't have a constructor with a Skeleton as param.

Not sure what is happening or how you thought it would copy the skeleton.

Btw if I simply comment this line it compiles
and as I don't need right now skeletons it is not urgent for me to investigate 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 » Sat Mar 01, 2008 1:38 pm

Oh, yep that looks very wrong indeed.
Code compiles fine here and it works, we use it in another project. This is the reason it has not been noticed yet. But this might be because you have Ogre's threading enabled and I don't.

I'll inform blakharaz about this and it will get fixed soon.
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 Mar 18, 2008 9:01 pm

steven, should be fixed now. (for over a week actually, but I forgot to post here about it. :oops:)
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
steven
Gnoll
Posts: 657
Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)
Contact:

Post by steven » Wed Mar 19, 2008 2:06 am

haffax wrote:steven, should be fixed now. (for over a week actually, but I forgot to post here about it. :oops:)
No problem - thanks for this great tool :)

I will re-try it... when I have time :roll:
0 x

.overlord.
Halfling
Posts: 52
Joined: Wed Jun 06, 2007 5:01 pm

Post by .overlord. » Wed Mar 26, 2008 3:43 pm

Hi

i just recently downloaded 1.4.7's version of the ogre command line tools
and noticed that meshmagick's command line changed. breaking some scripts of mine.

i'm trying to rename some meshes material files i used to be able to do
meshmagick rename -material="name before"/"name after" temp.mesh

but now that doens't work. also the help implies the delimiter is now "|", which i hope isn't true cause thats the pipe command so doing

meshmagick rename -material="name before"|"name after" temp.mesh
doesn't work, since it thinks its 2 commands, etc

how can i get this to work?
0 x

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

Post by Blakharaz » Thu Mar 27, 2008 3:00 pm

.overlord. wrote:Hi

i'm trying to rename some meshes material files i used to be able to do
meshmagick rename -material="name before"/"name after" temp.mesh

but now that doens't work. also the help implies the delimiter is now "|", which i hope isn't true cause thats the pipe command so doing

meshmagick rename -material="name before"|"name after" temp.mesh
doesn't work, since it thinks its 2 commands, etc
The delimiter is ":" now (see RenameTool.cpp:208), the help is wrong. "|" was a bad idea which is obviously not completely changed. The forward slash is bad because we had slashes in material names.
I think we should change the syntax to something like -material=%name before%name after% where "%" can be any char (but it must be the same char for every three position) so the user can choose a delimiter which is legal within his system shell and his names.
0 x
Coder in the Pantheon team - creators of Rastullahs Lockenpracht

cyrfer
Orc
Posts: 424
Joined: Wed Aug 01, 2007 8:13 pm
Location: Venice, CA, USA
x 2

Post by cyrfer » Tue Apr 01, 2008 3:53 am

Hi,
I'm using a version of OGRE and MeshMagick from a recent (within a month maybe) CVS checkout. Is it possible to "negate" a single component? I want each vertex's y values to become -y. Somehow a file conversion with another tool left me with -y and I want to get it back to +y. How to do this?

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 » Tue Apr 01, 2008 12:07 pm

No not really possible yet. You can apply -scale=1/-1/1, which basically has this effect, but the problem is that the normal is broken afterwards. I will have to see what I can do about it, but not in the next few days.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

cyrfer
Orc
Posts: 424
Joined: Wed Aug 01, 2007 8:13 pm
Location: Venice, CA, USA
x 2

Post by cyrfer » Fri Apr 04, 2008 5:42 am

Thanks for the tip. This could be a useful addition. Anyway, I don't know if my normals were preserved in the first place, so maybe I'll give the scale option a try. BTW, will MeshMagic recalculate normals? If it did, I could just run MeshMagic a 2nd time to fix my normals. Also, does MeshMagic assume a vertex format? How does it know what data is in the vertex array?

Thanks for a great tool!
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 Apr 04, 2008 11:31 am

MeshMagick does not recalculate normals. In the long term I plan to add this functionality. But I don't know when.
By default the transform tool renormalizes normals, with the option -no-normalise-normals this can be prevented.
MeshMagick does not assume a vertex format, what data is in the buffers is explained in the VertexData's VertexDeclaration.
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 » Wed Apr 16, 2008 11:16 pm

I'm not shure what did change.
It would be nice, if somebody can update the wiki page:
http://www.ogre3d.org/wiki/index.php/MeshMagick
0 x

User avatar
Katzenjoghurt
Halfling
Posts: 52
Joined: Sat Jan 22, 2005 8:44 pm
Contact:

Post by Katzenjoghurt » Sat Jun 21, 2008 10:01 am

Beauty wrote:I'm not shure what did change.
It would be nice, if somebody can update the wiki page:
http://www.ogre3d.org/wiki/index.php/MeshMagick
Yipp. Would be great.

Wiki says: -material=before/after change all materials 'before' to 'after'
meshmagick -help=rename says: -material=before|after - change all materials 'before' to 'after'

And what really works is: -material=before:after


Was pretty confusing and it took quite some time to find out for me. :lol:

Btw... what I missed was a tool to remove a material completely.
Yet, renaming a material to "none" or "grmblflx" :lol: does the job as well.
0 x
Better to reign in hell than serve in heaven

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 » Sat Jun 21, 2008 11:30 am

Thanks for the feedback. I updated the wiki.
Katzenjoghurt wrote:Yet, renaming a material to "none" or "grmblflx" :lol: does the job as well.
Is this a joke or does it realy work. So I could add it to the wiki.
0 x
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.

User avatar
Katzenjoghurt
Halfling
Posts: 52
Joined: Sat Jan 22, 2005 8:44 pm
Contact:

Post by Katzenjoghurt » Sat Jun 21, 2008 11:46 am

Beauty wrote:Thanks for the feedback. I updated the wiki.
Katzenjoghurt wrote:Yet, renaming a material to "none" or "grmblflx" :lol: does the job as well.
Is this a joke or does it realy work. So I could add it to the wiki.
Just a dumb workaround to make Ogre no longer find the material any more.
Expected ogre to complain in the log file - but it didn't.

(Used the mesh for physics only and had to load it - yet, there was a huuuge material attached to it which unnecessarily made the app load 10 seconds longer.
Wanted to get rid of it with MeshMagick - but there was no tool to do so.
So I just renamed the material to "none".)
0 x
Better to reign in hell than serve in heaven

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 » Tue Jul 22, 2008 1:03 pm

The output of info tool is e.g.

Code: Select all

Submesh 0 (unnamed) :
    6170 vertices.
    7760 triangles.
    16 bit index buffer
Submesh 1 (unnamed) :
    1110 vertices.
    1050 triangles.
    16 bit index buffer
...
...
...
Submesh 14 (unnamed) :
    14770 vertices.
    16143 triangles.
    16 bit index buffer
It would be nice if there would be a sum of all included vertices and triangles in the end.
0 x
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.

User avatar
prolow
Halfling
Posts: 72
Joined: Tue May 08, 2007 10:47 pm
Location: Cedar Falls, Iowa USA
Contact:

Post by prolow » Tue Jul 22, 2008 7:58 pm

i can't seem i get the meshmerge tool to work correctly

my batch cmd:
MeshMagick meshmerge M_ShortsTShirt.mesh -- M_ShortsTShirtb.mesh
MeshMagick -no-follow-skeleton info M_ShortsTShirtb.mesh
MeshMagick -no-follow-skeleton info M_ShortsTShirt.mesh

the output:
G:\OgreCommandLineTools>MeshMagick meshmerge M_ShortsTShirt.mesh -- M_ShortsTShirtb.mesh

G:\OgreCommandLineTools>MeshMagick -no-follow-skeleton info M_ShortsTShirtb.mesh

Analysing meshfile M_ShortsTShirtb.mesh...
File version : [MeshSerializer_v1.40]
Endian mode : Little Endian

Shared vertex data with 1308 vertices
Number of bone assignments per vertex: 4
Total number of bones referenced: 43
buffer layout: p(f3)n(f3)-u(f2)u(f2)-i(u4)w(f4)

Submesh 0 (unnamed) :
Default material: CharacterSh
shared vertex data used.
456 triangles.
32 bit index buffer
Submesh 1 (unnamed) :
Default material: CharacterSh
shared vertex data used.
324 triangles.
32 bit index buffer
Submesh 2 (unnamed) :
Default material: CharacterSh
shared vertex data used.
480 triangles.
32 bit index buffer
Submesh 3 (unnamed) :
Default material: CharacterSh
shared vertex data used.
356 triangles.
32 bit index buffer
Submesh 4 (unnamed) :
Default material: CharacterSh
shared vertex data used.
152 triangles.
32 bit index buffer
Submesh 5 (unnamed) :
Default material: CharacterSh
shared vertex data used.
20 triangles.
32 bit index buffer

Mesh does not have morph animations.
Mesh does not have poses.

G:\OgreCommandLineTools>MeshMagick -no-follow-skeleton info M_ShortsTShirt.mesh

Analysing meshfile M_ShortsTShirt.mesh...
File version : [MeshSerializer_v1.40]
Endian mode : Little Endian

Shared vertex data with 1308 vertices
Number of bone assignments per vertex: 4
Total number of bones referenced: 43
buffer layout: p(f3)n(f3)-u(f2)u(f2)-i(u4)w(f4)

Submesh 0 (unnamed) :
Default material: CharacterSh
shared vertex data used.
456 triangles.
32 bit index buffer
Submesh 1 (unnamed) :
Default material: CharacterSh
shared vertex data used.
324 triangles.
32 bit index buffer
Submesh 2 (unnamed) :
Default material: CharacterSh
shared vertex data used.
480 triangles.
32 bit index buffer
Submesh 3 (unnamed) :
Default material: CharacterSh
shared vertex data used.
356 triangles.
32 bit index buffer
Submesh 4 (unnamed) :
Default material: CharacterSh
shared vertex data used.
152 triangles.
32 bit index buffer
Submesh 5 (unnamed) :
Default material: CharacterSh
shared vertex data used.
20 triangles.
32 bit index buffer

Mesh does not have morph animations.
Mesh has 68 poses.

---------
so, it dosn't look like multiple submeshes were merged and it no longer has poses, and is twice as large a file on disk, so something happened but i'm not sure what
if this can work like it sounds it should, it will save me lots of time, help!
0 x

Post Reply