Page 5 of 12

Posted: Tue Jan 29, 2008 6:49 pm
by BonD
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?

Posted: Tue Jan 29, 2008 7:45 pm
by haffax
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.

Posted: Tue Jan 29, 2008 7:59 pm
by BonD
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.

Posted: Fri Feb 15, 2008 5:02 am
by Jerky
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!

Posted: Sat Feb 16, 2008 10:29 pm
by Praetor
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.

Posted: Sat Feb 16, 2008 11:36 pm
by haffax
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?

Posted: Sun Feb 17, 2008 4:00 am
by Praetor
I grabbed it from CVS. It crashed when I did not input the tool name, just input arguments like "MeshMagick -xalign=center"

Posted: Sun Feb 17, 2008 9:55 am
by haffax
Thanks, got it. Fixed in CVS.

Posted: Wed Feb 27, 2008 3:05 am
by FredFriendship
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.

Posted: Sat Mar 01, 2008 12:17 pm
by steven
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 ;)

Posted: Sat Mar 01, 2008 1:38 pm
by haffax
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.

Posted: Tue Mar 18, 2008 9:01 pm
by haffax
steven, should be fixed now. (for over a week actually, but I forgot to post here about it. :oops:)

Posted: Wed Mar 19, 2008 2:06 am
by steven
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:

Posted: Wed Mar 26, 2008 3:43 pm
by .overlord.
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?

Posted: Thu Mar 27, 2008 3:00 pm
by Blakharaz
.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.

Posted: Tue Apr 01, 2008 3:53 am
by cyrfer
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!

Posted: Tue Apr 01, 2008 12:07 pm
by haffax
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.

Posted: Fri Apr 04, 2008 5:42 am
by cyrfer
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!

Posted: Fri Apr 04, 2008 11:31 am
by haffax
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.

Posted: Wed Apr 16, 2008 11:16 pm
by Beauty
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

Posted: Sat Jun 21, 2008 10:01 am
by Katzenjoghurt
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.

Posted: Sat Jun 21, 2008 11:30 am
by Beauty
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.

Posted: Sat Jun 21, 2008 11:46 am
by Katzenjoghurt
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".)

Posted: Tue Jul 22, 2008 1:03 pm
by Beauty
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.

Posted: Tue Jul 22, 2008 7:58 pm
by prolow
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!