Thank you for clearing that. I wanted to scale meshes coming from OgreMax (via Maya) according to their correct values since the "beastie" collision detection library seems to only take the mesh data into account and not the scale inherited from the scenenode. Ok, guess I have to try something else.spacegaier wrote:You can always just scale the SceneNode you attached the mesh to (more exactly the Entity using that mesh). MeshMagick is usually used to manipulate mesh data offline (at application creation time) and not e.g. while running a game, so basically for scenarios where you want to serialize/save the mesh afterwards.
Official MeshMagick thread - now licensed under MIT
-
- Gnoblar
- Posts: 9
- Joined: Tue Mar 09, 2010 5:50 pm
- Location: Dresden, Germany
Re: Official MeshMagick thread - now licensed under MIT
-
- Gnome
- Posts: 397
- Joined: Sat Nov 08, 2008 1:59 pm
- x 2
Re: Official MeshMagick thread - now licensed under MIT
haffax wrote:Hi PolyVox, in the old days Sinbad used to build meshmagick for Windows and provide the download. Unlike OgreXMLConverter, Meshmagick is not an official Ogre tool, so it was a bit of an extra service from his side. I'm afraid you have to build it yourself.
JDX_John wrote:By the way, it would be awesome if MeshMagick was included in Ogre tools in the same way as OgreXMLConverter, it's such a useful tool.
You and haffax seem to be contradicting here... anyway I have the full 1.7.3 source and I don't see MeshMagick anywhere - OgreXMLConverter and MeshUpgrader are in /tools but MeshMagick isn't.spacegaier wrote:It is and was (I just uploaded anew version for Ogre 1.7.2).JDX_John wrote:By the way, it would be awesome if MeshMagick was included in Ogre tools in the same way as OgreXMLConverter, it's such a useful tool.
-
- Gnome
- Posts: 397
- Joined: Sat Nov 08, 2008 1:59 pm
- x 2
Re: Official MeshMagick thread - now licensed under MIT
Aha, I found a bundled OgreMeshMagick 1.7.2 download, not in the sources but on the Tools page. Awesome!
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: Official MeshMagick thread - now licensed under MIT
OgreMeshMagick is part of the Ogre Addons source not of the OgreMain source.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
- Halfling
- Posts: 40
- Joined: Fri Jul 30, 2010 2:40 am
- x 1
Re: Official MeshMagick thread - now licensed under MIT
Assertion when running on Ogre 1.7.3+Linux.
Solved by changing line 86 of MmOgreEnvironment.cpp from :
to :
Code: Select all
meshmagick: OgreSingleton.h:80: Ogre::Singleton<T>::Singleton() [with T = Ogre::LodStrategyManager]: Assertion `!ms_Singleton' failed.
Code: Select all
mLodStrategyMgr = new LodStrategyManager();
Code: Select all
mLodStrategyMgr = LodStrategyManager::getSingletonPtr();
-
- Gnoblar
- Posts: 2
- Joined: Thu May 05, 2011 2:15 pm
Re: Official MeshMagick thread - now licensed under MIT
Hi,
I fixed two things for my use of meshmagick so I thougth I would share them with you.
I believe I got the last source code from SVN so bear with me if this was already fixed elsewhere.
First thing is for pose animations in meshes. Vertex were not reindexed so I made a small loop to do it.
It's probably not the best way to do it and it may not work in some case but it did the job for me.
Added in MmOptimiseTool.cpp at line 263. This is in the "Dedicated geometry" loop after the submesh dedicated vertex data optmisation.
The second fixes a bug with the tangent comparison.
The conditions in the OptimiseTool::UniqueVertexLess::less method were inverted.
Changed to
in MmOptimiseTool.cpp from line 813 to 823.
Hope this can help somebody.
I fixed two things for my use of meshmagick so I thougth I would share them with you.
I believe I got the last source code from SVN so bear with me if this was already fixed elsewhere.
First thing is for pose animations in meshes. Vertex were not reindexed so I made a small loop to do it.
It's probably not the best way to do it and it may not work in some case but it did the job for me.
Added
Code: Select all
// Pose
if(mesh->getPoseCount())
{
print(" fixing poses...");
for(size_t j = 0; j < mesh->getPoseCount(); j++)
{
Pose *pose = mesh->getPose(j);
if(pose->getTarget() == i+1)
{
const Pose::VertexOffsetMap map = pose->getVertexOffsets();
Pose::VertexOffsetIterator it = pose->getVertexOffsetIterator();
for(Pose::VertexOffsetMap::const_iterator it = map.begin(); it != map.end(); it++)
{
size_t index = (*it).first;
Vector3 xyz = (*it).second;
_ASSERTE(index < mIndexRemap.size());
{
IndexInfo indexInfo = mIndexRemap[index];
pose->removeVertex(index);
pose->addVertex(indexInfo.targetIndex, xyz);
}
}
}
}
}
The second fixes a bug with the tangent comparison.
The conditions in the OptimiseTool::UniqueVertexLess::less method were inverted.
Changed
Code: Select all
bool OptimiseTool::UniqueVertexLess::equals(
const Vector4& a, const Vector4& b, Real tolerance) const
{
// no built-in position equals
for (int i = 0; i < 4; ++i)
{
if (Math::RealEqual(a[i], b[i], tolerance))
return true;
}
return false;
}
Code: Select all
bool OptimiseTool::UniqueVertexLess::equals(
const Vector4& a, const Vector4& b, Real tolerance) const
{
// no built-in position equals
for (int i = 0; i < 4; ++i)
{
if (!Math::RealEqual(a[i], b[i], tolerance))
return false;
}
return true;
}
Hope this can help somebody.
-
- Gnoblar
- Posts: 17
- Joined: Sun Aug 14, 2011 2:53 pm
Re: Official MeshMagick thread - now licensed under MIT
So confused>< lol I'm trying to install it on linux(linuxmint11) and the build went fine, but when I go root(with either "sudo" or "su -" and make install, I get this error, which...I'm assuming I must have screwed something up...
does anyone have this built on linux? I mean I saw like 3 posts that even mentioned linux...
Thanks
-ice
Code: Select all
THE-VAGABLEND meshmagick # make install
Making install in include
make[1]: Entering directory `/home/ice/Downloads/meshmagick/meshmagick/include'
make[2]: Entering directory `/home/ice/Downloads/meshmagick/meshmagick/include'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/include/meshmagick" || /bin/mkdir -p "/usr/local/include/meshmagick"
/usr/bin/install -c -m 644 MeshMagick.h MeshMagickPrerequisites.h MmEditableBone.h MmEditableMesh.h MmEditableSkeleton.h MmInfoToolFactory.h MmInfoTool.h MmMeshMergeToolFactory.h MmMeshMergeTool.h MmMeshUtils.h MmOgreEnvironment.h MmOptimiseTool.h MmOptimiseToolFactory.h MmOptionsParser.h MmRenameToolFactory.h MmRenameTool.h MmStatefulMeshSerializer.h MmStatefulSkeletonSerializer.h MmToolFactory.h MmTool.h MmToolManager.h MmToolUtils.h MmTransformToolFactory.h MmTransformTool.h MmStatefulMeshSerializer.h MmStatefulSkeletonSerializer.h '/usr/local/include/meshmagick'
/usr/bin/install: will not overwrite just-created `/usr/local/include/meshmagick/MmStatefulMeshSerializer.h' with `MmStatefulMeshSerializer.h'
/usr/bin/install: will not overwrite just-created `/usr/local/include/meshmagick/MmStatefulSkeletonSerializer.h' with `MmStatefulSkeletonSerializer.h'
make[2]: *** [install-pkgincludeHEADERS] Error 1
make[2]: Leaving directory `/home/ice/Downloads/meshmagick/meshmagick/include'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/ice/Downloads/meshmagick/meshmagick/include'
make: *** [install-recursive] Error 1
Thanks
-ice
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: Official MeshMagick thread - now licensed under MIT
@Harry Coder: Can you please put that on one of our trackers (either bug or patch)? In both cases either link here or add the source directly. Thanks!
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
- Waruck
- Goblin
- Posts: 210
- Joined: Mon Dec 12, 2011 12:52 pm
- Location: Germany
- x 34
Re: Official MeshMagick thread - now licensed under MIT
I tried to built this with Ogre 1.8. However I run into a problem:
I checked OgreProgressiveMesh.h and indeed the typedef LODFaceList is gone in 1.8 (or I can't find it).
Any fix fot this?
Code: Select all
MmOptimiseTool.h(153): error C2039: 'LODFaceList': Is no member of 'Ogre::ProgressiveMesh'
Any fix fot this?
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
Re: Official MeshMagick thread - now licensed under MIT
ogresubmesh.h has the public members:
while ogreprogressivemesh.h has the protected member:
Checking the history... looks like the LODFaceList define was removed from ogreprogressivemesh.h in march last year.
I'll try giving it a build when I get a chance, I'm sure I've built meshmagick since then without problems.
I also need to look at it for a possible skeleton bug, I used it to rotate, recentre and scale a mesh, the animations were broken afterwards.
Code: Select all
typedef vector<IndexData*>::type LODFaceList;
LODFaceList mLodFaceList;
Code: Select all
vector<IndexData*>::type mLodFaceList;
I'll try giving it a build when I get a chance, I'm sure I've built meshmagick since then without problems.
I also need to look at it for a possible skeleton bug, I used it to rotate, recentre and scale a mesh, the animations were broken afterwards.
- Waruck
- Goblin
- Posts: 210
- Joined: Mon Dec 12, 2011 12:52 pm
- Location: Germany
- x 34
Re: Official MeshMagick thread - now licensed under MIT
next error: MmStatefulSkeletonSerializer.cpp Line 80:
The compiler is expecting a SkeletonVersion as 3rd parameter. I just copyed the standard value SKELETON_VERSION_LATEST and everything compiled. Hope it also works.. ^^
Code: Select all
exportSkeleton(mSkeleton.getPointer(),name, endianMode);
-
- Gnoblar
- Posts: 2
- Joined: Wed Apr 04, 2012 7:50 pm
Re: Official MeshMagick thread - now licensed under MIT
Hi there,
i'm new to Ogre. But from my point of view there is some easy fix to this:
in MmOptimiseTool.h do the following:
- Insert after the includes:
- Replace:
with:
in MmOptimiseTool.cpp edit the following code:
to:
in MeshMagick.cpp edit line 32:
change to:
in MmOgreEnvironment.cpp edit line 35:
change to:
In MmStatefulSkeletonSerializer.cpp edit line 80:
change to:
This should be it. MeshMagick compiles on my system now.
[EDIT] I just integrated these changes to MeshMagick into ogitor 0.5 and compilation went well.[/EDIT]
i'm new to Ogre. But from my point of view there is some easy fix to this:
in MmOptimiseTool.h do the following:
- Insert after the includes:
Code: Select all
#include <OgreProgressiveMesh.h>
Code: Select all
void fixLOD(Ogre::ProgressiveMesh::LODFaceList lodFaces);
Code: Select all
void fixLOD(Ogre::vector<Ogre::IndexData*>::type lodFaces);
Code: Select all
//---------------------------------------------------------------------
void OptimiseTool::fixLOD(ProgressiveMesh::LODFaceList lodFaces)
{
for (ProgressiveMesh::LODFaceList::iterator l = lodFaces.begin();
l != lodFaces.end(); ++l)
{
IndexData* idata = *l;
print(" fixing LOD...");
remapIndexes(idata);
}
}
Code: Select all
void OptimiseTool::fixLOD(Ogre::vector<Ogre::IndexData*>::type lodFaces)
{
for (Ogre::vector<Ogre::IndexData*>::type::iterator l = lodFaces.begin();
l != lodFaces.end(); ++l)
{
IndexData* idata = *l;
print(" fixing LOD...");
remapIndexes(idata);
}
}
Code: Select all
template<> meshmagick::MeshMagick* Ogre::Singleton<meshmagick::MeshMagick>::ms_Singleton = NULL;
Code: Select all
template<> meshmagick::MeshMagick* Ogre::Singleton<meshmagick::MeshMagick>::msSingleton = NULL;
Code: Select all
template<> meshmagick::OgreEnvironment* Singleton<meshmagick::OgreEnvironment>::ms_Singleton = NULL;
Code: Select all
template<> meshmagick::OgreEnvironment* Singleton<meshmagick::OgreEnvironment>::msSingleton = NULL;
Code: Select all
exportSkeleton(mSkeleton.getPointer(), name, endianMode);
Code: Select all
exportSkeleton(mSkeleton.getPointer(), name,Ogre::SKELETON_VERSION_LATEST, endianMode);
[EDIT] I just integrated these changes to MeshMagick into ogitor 0.5 and compilation went well.[/EDIT]
-
- Halfling
- Posts: 86
- Joined: Tue Sep 01, 2009 7:15 pm
- Location: Cologne, Germany
- x 4
Re: Official MeshMagick thread - now licensed under MIT
The last commit for MeshMagick was April 15, 2010.spacegaier wrote:OgreMeshMagick is part of the Ogre Addons source not of the OgreMain source.
Considering people are actively posting patches and even start double-posting fixes
, maybe it could indeed be moved into the main repository so we can submit our patches with a higher chance of them getting accepted to the Main Patch Tracking System?My Poses re-map fix May 10 2011: http://www.ogre3d.org/forums/viewtopic. ... 42#p427642
Harry Codders Poses re-map fix Jan 09 2012: http://www.ogre3d.org/forums/viewtopic. ... 50#p448068
-
- Goblin
- Posts: 262
- Joined: Fri Nov 18, 2011 6:50 pm
- x 3
Re: Official MeshMagick thread - now licensed under MIT
I want to build MeshMagick for Ogre 1.8. I've checked out the source but CMake fails as it cannot find Ogre. From FindOgre.cmake:
edit: I changed my OGRE_HOME not to point to my Ogre1.8 dir, but my Ogre1.8 build dir. Now CMake is finding and setting a bunch of Ogre vars, but still telling me it can't find Ogre.
Does MeshMagick CMake only work against an Ogre SDK, not a regular Ogre directory?
I set an OGRE_HOME variable (it shows up in new cmd window) but still CMake fails# - Try to find OGRE
# If you have multiple versions of Ogre installed, use the CMake or
# the environment variable OGRE_HOME to point to the path where the
# desired Ogre version can be found.
Where exactly is this variable supposed to be pointing? I even tried putting MeshMagick inside the Ogre source dir in the hope it might manage the tremendously difficult job of noticing Ogre was JUST THERE, but of course CMake is rarely that helpful!CMake Error at cmake/FindPkgMacros.cmake:112 (message):
Required library OGRE not found!
edit: I changed my OGRE_HOME not to point to my Ogre1.8 dir, but my Ogre1.8 build dir. Now CMake is finding and setting a bunch of Ogre vars, but still telling me it can't find Ogre.
Does MeshMagick CMake only work against an Ogre SDK, not a regular Ogre directory?
Looking to find experienced Ogre & shader developers/artists. PM me with a contact email address if interested.
- saejox
- Goblin
- Posts: 260
- Joined: Tue Oct 25, 2011 1:07 am
- x 36
Re: Official MeshMagick thread - now licensed under MIT
I packed my 1.9 tools.
Includes upgrader, xmlconverter, meshmagick
here https://docs.google.com/file/d/0B3MVwL3 ... NRblU/edit
someone might need it.
Includes upgrader, xmlconverter, meshmagick
here https://docs.google.com/file/d/0B3MVwL3 ... NRblU/edit
someone might need it.
-
- Goblin
- Posts: 262
- Joined: Fri Nov 18, 2011 6:50 pm
- x 3
Re: Official MeshMagick thread - now licensed under MIT
Neat, thanks. Are 1.9 meshes compatible with 1.8... and since 1.8 doesn't seem compatible with MeshMagick trunk what were your tweaks (assuming 1.9 didn't fix the problem)?
Looking to find experienced Ogre & shader developers/artists. PM me with a contact email address if interested.
- saejox
- Goblin
- Posts: 260
- Joined: Tue Oct 25, 2011 1:07 am
- x 36
Re: Official MeshMagick thread - now licensed under MIT
I'm using meshmagick to rotate and scale. Works great with 1.9.simedj wrote:Neat, thanks. Are 1.9 meshes compatible with 1.8... and since 1.8 doesn't seem compatible with MeshMagick trunk what were your tweaks (assuming 1.9 didn't fix the problem)?
There are only some compile errors to be fixed. Very easy stuff.
I just noticed, Shadowrom's post. That's pretty spot on.
-
- Greenskin
- Posts: 126
- Joined: Thu Jun 05, 2008 3:26 am
- Location: Thames, New Zealand
- x 9
Re: Official MeshMagick thread - now licensed under MIT
If you want to find out what it's doing you need to look at the cmake/FindOGRE.cmake script.simedj wrote:I want to build MeshMagick for Ogre 1.8. I've checked out the source but CMake fails as it cannot find Ogre. From FindOgre.cmake:I set an OGRE_HOME variable (it shows up in new cmd window) but still CMake fails# - Try to find OGRE
# If you have multiple versions of Ogre installed, use the CMake or
# the environment variable OGRE_HOME to point to the path where the
# desired Ogre version can be found.Where exactly is this variable supposed to be pointing? I even tried putting MeshMagick inside the Ogre source dir in the hope it might manage the tremendously difficult job of noticing Ogre was JUST THERE, but of course CMake is rarely that helpful!CMake Error at cmake/FindPkgMacros.cmake:112 (message):
Required library OGRE not found!
edit: I changed my OGRE_HOME not to point to my Ogre1.8 dir, but my Ogre1.8 build dir. Now CMake is finding and setting a bunch of Ogre vars, but still telling me it can't find Ogre.
Does MeshMagick CMake only work against an Ogre SDK, not a regular Ogre directory?
I have it building (r2986 + fixes) on Windows (VS 2010). I'm using Ogre 1.8.1 that was built from source and I had to define OGRE_SOURCE and OGRE_BUILD in CMakeLists.txt. BTW maintainers, this should be mentioned in the instructional comment at the beginning of FindOGRE.cmake.
Code: Select all
set(OGRE_SOURCE "/path/to/ogre-1.8")
set(OGRE_BUILD "/path/to/ogre-1.8-build")
find_package(OGRE REQUIRED)
-
- Gremlin
- Posts: 193
- Joined: Sat Aug 06, 2011 11:02 pm
- x 6
Re: Official MeshMagick thread - now licensed under MIT
Is there a version of this that is built with the latest Ogre (1.9 stable)? I checked out the source but it doesn't build since it looks like the source hasn't been updated to work with 1.9 since it's using a lot of types and things that have been replaced or renamed.
EDIT: Never mind. It was actually fairly easy to modify the code to get it to build with 1.9. Hopefully it still works. I guess I'll find out. I'd be happy to submit a patch somewhere to get this committed, I'm unsure of where to do that though.
EDIT: Never mind. It was actually fairly easy to modify the code to get it to build with 1.9. Hopefully it still works. I guess I'll find out. I'd be happy to submit a patch somewhere to get this committed, I'm unsure of where to do that though.
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: Official MeshMagick thread - now licensed under MIT
See http://www.ogre3d.org/developers/submit-patch -> basically a Hg pull-request is the easiest for us to merge it in and therefore the preferred option.shenjoku wrote:I'd be happy to submit a patch somewhere to get this committed, I'm unsure of where to do that though.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
- Gremlin
- Posts: 193
- Joined: Sat Aug 06, 2011 11:02 pm
- x 6
Re: Official MeshMagick thread - now licensed under MIT
How would you do that for MeshMagick though? It's not part of the main Ogre repository.
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: Official MeshMagick thread - now licensed under MIT
Sorry, my bad. I was thinking of the official Ogre tools from the main repo. In the case of MeshMagick an regular SVN patch should help. And then create a JIRA ticket for it and attach the patch (you could in theory also add it to the addons SVN tracker, but it will most likely be buried there, hence go for JIRA)..shenjoku wrote:How would you do that for MeshMagick though? It's not part of the main Ogre repository.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: Official MeshMagick thread - now licensed under MIT
Who manages that repo though? Do we?
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: Official MeshMagick thread - now licensed under MIT
As far as I know, it's a mixture. Some of us team members have global access and other community members / maintainers have access to certain sub areas for the projects they (used to) maintain. Not sure if there is an active MeshMagick maintainer. I think Haffax used to have that position, but he is gone, so back to us as the team I guess to apply the patch.masterfalcon wrote:Who manages that repo though? Do we?
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
- Gremlin
- Posts: 193
- Joined: Sat Aug 06, 2011 11:02 pm
- x 6
Re: Official MeshMagick thread - now licensed under MIT
Well I added the issue with the patch file attached to it. So hopefully that will do the trick.