Official MeshMagick thread - now licensed under MIT
- BonD
- Gnoblar
- Posts: 4
- Joined: Mon Jan 07, 2008 3:39 pm
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
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.
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.
- BonD
- Gnoblar
- Posts: 4
- Joined: Mon Jan 07, 2008 3:39 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.
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.
- Jerky
- Orc Shaman
- Posts: 791
- Joined: Wed Mar 02, 2005 4:13 am
- Location: Springville, Utah
- Contact:
- Praetor
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
- Contact:
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
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?
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?
- Praetor
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
- Contact:
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
-
- Gnoblar
- Posts: 3
- Joined: Tue Feb 19, 2008 2:13 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.
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.
- steven
- Gnoll
- Posts: 657
- Joined: Mon Feb 28, 2005 1:53 pm
- Location: Australia - Canberra (ex - Switzerland - Geneva)
- Contact:
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
This is caused by the line 28 of EditableSkeleton.cpp where it tries to copy-constructor a skeleton.
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
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 &)'
Code: Select all
EditableSkeleton::EditableSkeleton(const Ogre::Skeleton& skel)
: Skeleton(skel) <----- HERE
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
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
- steven
- Gnoll
- Posts: 657
- Joined: Mon Feb 28, 2005 1:53 pm
- Location: Australia - Canberra (ex - Switzerland - Geneva)
- Contact:
-
- Halfling
- Posts: 52
- Joined: Wed Jun 06, 2007 5:01 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?
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?
- Blakharaz
- Gnoblar
- Posts: 19
- Joined: Wed Jun 02, 2004 8:51 pm
- Location: Potsdam, Germany
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..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
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.
Coder in the Pantheon team - creators of Rastullahs Lockenpracht
-
- Orc
- Posts: 424
- Joined: Wed Aug 01, 2007 8:13 pm
- Location: Venice, CA, USA
- x 7
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!
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!
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
-
- Orc
- Posts: 424
- Joined: Wed Aug 01, 2007 8:13 pm
- Location: Venice, CA, USA
- x 7
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!
Thanks for a great tool!
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
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.
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.
- Beauty
- OGRE Community Helper
- Posts: 767
- Joined: Wed Oct 10, 2007 2:36 pm
- Location: Germany
- x 39
- Contact:
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
It would be nice, if somebody can update the wiki page:
http://www.ogre3d.org/wiki/index.php/MeshMagick
- Katzenjoghurt
- Halfling
- Posts: 52
- Joined: Sat Jan 22, 2005 8:44 pm
- Contact:
Yipp. Would be great.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
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.
Btw... what I missed was a tool to remove a material completely.
Yet, renaming a material to "none" or "grmblflx" does the job as well.
Better to reign in hell than serve in heaven
- Beauty
- OGRE Community Helper
- Posts: 767
- Joined: Wed Oct 10, 2007 2:36 pm
- Location: Germany
- x 39
- Contact:
Thanks for the feedback. I updated the wiki.
Is this a joke or does it realy work. So I could add it to the wiki.Katzenjoghurt wrote:Yet, renaming a material to "none" or "grmblflx" does the job as well.
Help to add information to the wiki. Also tiny edits will let it grow ...
Add your country to your profile ... it's interesting to know from where of the world you are.
Add your country to your profile ... it's interesting to know from where of the world you are.
- Katzenjoghurt
- Halfling
- Posts: 52
- Joined: Sat Jan 22, 2005 8:44 pm
- Contact:
Just a dumb workaround to make Ogre no longer find the material any more.Beauty wrote:Thanks for the feedback. I updated the wiki.
Is this a joke or does it realy work. So I could add it to the wiki.Katzenjoghurt wrote:Yet, renaming a material to "none" or "grmblflx" does the job as well.
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".)
Better to reign in hell than serve in heaven
- Beauty
- OGRE Community Helper
- Posts: 767
- Joined: Wed Oct 10, 2007 2:36 pm
- Location: Germany
- x 39
- Contact:
The output of info tool is e.g.
It would be nice if there would be a sum of all included vertices and triangles in the end.
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
Help to add information to the wiki. Also tiny edits will let it grow ...
Add your country to your profile ... it's interesting to know from where of the world you are.
Add your country to your profile ... it's interesting to know from where of the world you are.
- prolow
- Halfling
- Posts: 72
- Joined: Tue May 08, 2007 10:47 pm
- Location: Cedar Falls, Iowa USA
- Contact:
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!
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!