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
cyrfer
Orc
Posts: 424
Joined: Wed Aug 01, 2007 8:13 pm
Location: Venice, CA, USA

Re: Official MeshMagick thread - now licensed under MIT

Post by cyrfer » Wed Mar 24, 2010 1:14 am

haffax wrote:Hi cryfer,

glad you found meshmagick helpful.
Regarding your problem: I don't know why this happens. Rotating a mesh/skeleton should not change the pivot. Rotation is always around the origin of the mesh's local coordinate system, its 0/0/0 position vector.

What orientation did you change, around what of its axes? Where is the meshes pivot supposed to be? In its center, between its feet or elsewhere?
What is the command line you used for rotation?
I'm assuming that the mesh's local coordinate system is the pelvis bone, which changes in elevation for a sit-to-stand animation, hence my problem. I would like to swing the entire animation around the X (1,0,0) axis so that distances from that axis are preserved. The command line I used was:

MeshMagick.exe transform -rotate=90/1/0/0 myFile.mesh

Thanks for any tips!


Edit: For the time being, I am able to rotate the mesh when exporting by using a feature of the exporter to use Z-up instead of Y-up. The animations were correctly made expecting this setting, an oversight on my part. So, I'm no longer desperate for this feature. However, I am having a problem related to transforms about a different axis and I'm looking for a fix. link
0 x

Ripgiblet
Gnoblar
Posts: 16
Joined: Sun Jul 19, 2009 8:55 pm

Re: Official MeshMagick thread - now licensed under MIT

Post by Ripgiblet » Sun Aug 22, 2010 5:07 pm

Does anybody know of a tool, or a simple way to add mesh faces together, that are facing the same way... the reason is I am trying to optimise a physics heightmap, so that adjacent triangles will add together to form large triangles for bigger flat areas.
I can create a mesh from the new ogre terrain, then create physics shape from the mesh...

I am planning on using LOD somehow to simplify the mesh, Anybody know if LOD should join together adjacent faces(And should I just grab this from the OgreMeshUpgrader Code?), and if not, anybody know anyway to do this? (Code, library...)

regards,
Mark.
0 x

hike1
Greenskin
Posts: 118
Joined: Sun Mar 30, 2003 3:46 am
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post by hike1 » Thu Sep 02, 2010 3:26 pm

I'm having trouble merging submeshes with this mesh,
I type meshmagick meshmerge ruins.mesh but the
submeshes are still there,making texturing impossible.
0 x

hike1
Greenskin
Posts: 118
Joined: Sun Mar 30, 2003 3:46 am
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post by hike1 » Thu Sep 02, 2010 3:31 pm

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:

Re: Official MeshMagick thread - now licensed under MIT

Post by haffax » Thu Sep 02, 2010 4:04 pm

That's not what meshmerge does. Meshmerge merges multiple mesh files into one. Merging submeshes is not yet possible with meshmagick.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post by PolyVox » Sun Oct 10, 2010 9:52 pm

Hi, are there binaries for this tool? I notice that OgreXMLConverter, OgreMeshUpgrader, etc are shipped in the Ogre 1.7 SDK, but I don't see MeshMagick in there. And the command line tools on the download page are for Ogre 1.6.3 (June 2009)? I could build from source of course, but I was just a bit suprised it wasn't in the SDK given that the other command line tools are. Did I miss something?
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:

Re: Official MeshMagick thread - now licensed under MIT

Post by haffax » Mon Oct 11, 2010 10:41 am

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.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post by PolyVox » Mon Oct 11, 2010 10:51 pm

Thanks, I've compiled it from source. The CMake script didn't seem to find Boost (I only have the version that comes with the OgreSDK) though it was in 'C:\OgreSDK\boost_1_42'.

Also, I had to comment out the follwing line of code in the #if/endif:

Code: Select all

mMeshMgr->setBoundsPaddingFactor(0.0f);
#if OGRE_VERSION_MAJOR > 1 || (OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR >= 7)
	//mLodStrategyMgr = new LodStrategyManager();
#endif
mMaterialMgr = MaterialManager::getSingletonPtr();
Otherwise I was getting the following runtime error:
Assertion failed: !ms_Singleton, file c:\hg_code\ogre_1-7-1\src\ogremain\include\OgreSingleton.h, line 80
Anyway, I have uploaded a binary build for anyone who wants it. It was made on Windows 7 using VS2010 and Ogre 1.7.1. Hopefully it's useful for someone, but I can't support it if it doesn't work.

You can get it here: http://www.david-williams.info/linked_f ... magick.exe
0 x

larnya
Gnoblar
Posts: 4
Joined: Tue Mar 09, 2010 2:53 pm

Re: Official MeshMagick thread - now licensed under MIT

Post by larnya » Fri Nov 05, 2010 1:33 am

I used MeshMagick to transform ninja.mesh, but got some warnings. Like this.
Image
The version of OgreCommandLineTools is 1.6.3.
Is there somebody can help me out ?
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:

Re: Official MeshMagick thread - now licensed under MIT

Post by haffax » Fri Nov 05, 2010 10:26 am

Yes, the binary MeshMagick is too old for new Ogre mesh files. You'd need to compile it anew with the new Ogre in order to make it work with current mesh file versions.

Actually I have some time at hand this weekend, so I will fix the startup bug with new Ogre versions and compile a windows version.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

larnya
Gnoblar
Posts: 4
Joined: Tue Mar 09, 2010 2:53 pm

Re: Official MeshMagick thread - now licensed under MIT

Post by larnya » Sat Nov 06, 2010 2:04 am

haffax wrote:Yes, the binary MeshMagick is too old for new Ogre mesh files. You'd need to compile it anew with the new Ogre in order to make it work with current mesh file versions.

Actually I have some time at hand this weekend, so I will fix the startup bug with new Ogre versions and compile a windows version.
Thank you, haffax.
I download the ninja.mesh from Ogre v1.6.3, now it works. :D
0 x

User avatar
so0os
Bugbear
Posts: 833
Joined: Thu Apr 15, 2010 7:42 am
Location: Poznan, Poland

Re: Official MeshMagick thread - now licensed under MIT

Post by so0os » Wed Nov 24, 2010 1:32 pm

I just compiled MeshMagic for Cthuga and it seems to work just fine. You need to provide your own ogremain, it didn't fit in the attachment.
meshmagick.zip
MeshMagic for Ogre Cthuga 1.7.1
(98.71 KiB) Downloaded 1085 times
0 x
Sos Sosowski :)
http://www.sos.gd

User avatar
Beauty
OGRE Community Helper
OGRE Community Helper
Posts: 767
Joined: Wed Oct 10, 2007 2:36 pm
Location: Germany
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post by Beauty » Mon Dec 13, 2010 6:32 pm

I would be happy if somebody can upload a binary version (for Windows) related to Ogre 1.6.x.
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
so0os
Bugbear
Posts: 833
Joined: Thu Apr 15, 2010 7:42 am
Location: Poznan, Poland

Re: Official MeshMagick thread - now licensed under MIT

Post by so0os » Tue Dec 14, 2010 9:09 am

Beauty wrote:I would be happy if somebody can upload a binary version (for Windows) related to Ogre 1.6.x.
it's in the official package (MeshSerializer 1.40)
0 x
Sos Sosowski :)
http://www.sos.gd

FlorianGeorge
Halfling
Posts: 86
Joined: Tue Sep 01, 2009 7:15 pm
Location: Cologne, Germany

Re: [New Tool] Ogre MeshMagick - First official release

Post by FlorianGeorge » Tue May 10, 2011 10:13 pm

FlorianGeorge wrote:First of all, thanks for this tool, it was able to remove/merge double vertices I couldn't remove with Blender.

Second, while the tool is successful at remapping the indexes of the triangles, it seems that it doesn't touch the target vertice indexes of Poses, which of course need attention as well after such an operation.

I added a little remapPoses method, see the attached zip. It currently only affects the optimise operation, but maybe the same method could be used for e.g. the merge operations.
haffax wrote:Thank you very much for this Flo81. :)
I am currently heavily involved in my day job (crunchtime :( ) so I cannot take a deeper look at it right now. Next week things should go on at a slower pace and I will review the patch.
Didn't find the changes in the current version, recreated a patch for it.
Attachments
MeshMagic - remapPoses.patch
(3.29 KiB) Downloaded 219 times
0 x

jhooks1
Gnoblar
Posts: 12
Joined: Mon Jul 04, 2011 8:36 pm

Re: Official MeshMagick thread - now licensed under MIT

Post by jhooks1 » Mon Jul 04, 2011 8:42 pm

I have meshmagick compiled as meshmagick_lib.lib. I am trying to integrate this library into the openmw project, but I am having trouble. I added the library to our cmake setup, and I am getting linker errors in visual studio 2010.

I get the following linker errors in visual studio:

1>ogre_nif_loader.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall meshmagick::MeshMagick::~MeshMagick(void)" (__imp_??1MeshMagick@meshmagick@@QAE@XZ) referenced in function "public: virtual void __thiscall NIFLoader::loadResource(class Ogre::Resource *)" (?loadResource@NIFLoader@@UAEXPAVResource@Ogre@@@Z)
1>ogre_nif_loader.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall meshmagick::TransformTool::transform(class Ogre::MeshPtr,class Ogre::Matrix4,bool)" (__imp_?transform@TransformTool@meshmagick@@QAEXVMeshPtr@Ogre@@VMatrix4@4@_N@Z) referenced in function "public: virtual void __thiscall NIFLoader::loadResource(class Ogre::Resource *)" (?loadResource@NIFLoader@@UAEXPAVResource@Ogre@@@Z)
1>ogre_nif_loader.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class meshmagick::TransformTool * __thiscall meshmagick::MeshMagick::getTransformTool(void)" (__imp_?getTransformTool@MeshMagick@meshmagick@@QAEPAVTransformTool@2@XZ) referenced in function "public: virtual void __thiscall NIFLoader::loadResource(class Ogre::Resource *)" (?loadResource@NIFLoader@@UAEXPAVResource@Ogre@@@Z)
1>ogre_nif_loader.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall meshmagick::MeshMagick::MeshMagick(class Ogre::Log *)" (__imp_??0MeshMagick@meshmagick@@QAE@PAVLog@Ogre@@@Z) referenced in function "public: virtual void __thiscall NIFLoader::loadResource(class Ogre::Resource *)" (?loadResource@NIFLoader@@UAEXPAVResource@Ogre@@@Z)
1>C:\a\openmw\new5\Release\openmw.exe : fatal error LNK1120: 4 unresolved externals


My latest commit to github is here:
https://github.com/jhooks1/openmw/commi ... c13f16e224

Any ideas on what is going wrong?

Currently the openmw website is down, but you can checkout the forums here http://openmw.com/forum/index.php
0 x

JDX_John
Gnome
Posts: 397
Joined: Sat Nov 08, 2008 1:59 pm

Re: Official MeshMagick thread - now licensed under MIT

Post by JDX_John » Tue Aug 23, 2011 2:33 pm

so0os wrote:I just compiled MeshMagic for Cthuga and it seems to work just fine. You need to provide your own ogremain, it didn't fit in the attachment.
meshmagick.zip
Hmm, I have a 1.7.2 OgreMain DLL from the download page and it didn't work, I got:
---------------------------
MeshMagick.exe - Entry Point Not Found
---------------------------
The procedure entry point ?parseInt@StringConverter@Ogre@@SAHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z could not be located in the dynamic link library OgreMain.dll.
---------------------------
OK
---------------------------
Is there a pre-built binary for the latest 1.7 version of Ogre anywhere?
0 x

JDX_John
Gnome
Posts: 397
Joined: Sat Nov 08, 2008 1:59 pm

Re: Official MeshMagick thread - now licensed under MIT

Post by JDX_John » Sun Aug 28, 2011 10:48 am

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.
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post by spacegaier » Fri Oct 14, 2011 9:01 pm

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.
It is and was (I just uploaded anew version for Ogre 1.7.2).

BTW: Did anybody manage to get MeshMagick working with Ogre 1.8 = did anyone fix the compile errors?
0 x
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...

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post by jacmoe » Sat Oct 15, 2011 5:51 pm

spacegaier wrote:BTW: Did anybody manage to get MeshMagick working with Ogre 1.8 = did anyone fix the compile errors?
Not aware of any problems with MeshMagick in the Ogitor repository, using Ogre 1.8. :wink:
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post by spacegaier » Sat Oct 15, 2011 6:27 pm

jacmoe wrote:
spacegaier wrote:BTW: Did anybody manage to get MeshMagick working with Ogre 1.8 = did anyone fix the compile errors?
Not aware of any problems with MeshMagick in the Ogitor repository, using Ogre 1.8. :wink:
I think it is excluded in the Ogitor code right now. AFAIK I once wanted to give it a go (getting it working in Ogitor), but it did not even compile. I think I got the same errors back then as when I tried it yesterday.
0 x
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...

StormChild
Gnoblar
Posts: 9
Joined: Tue Mar 09, 2010 5:50 pm
Location: Dresden, Germany

Re: Official MeshMagick thread - now licensed under MIT

Post by StormChild » Mon Oct 17, 2011 10:41 am

Hi there,

I have a small problem with the library version. I compiled MeshMagick correctly (I think so...) as an application and as a library. When I used the standalone application, it works perfectly (I want to rescale some meshes).
If, however, I'm using the library version then just the bounding box seems to be scaled to the new value, but the geometry itself is not. I use the following code in the dotscene loader:

Code: Select all

        pEntity = mSceneMgr->createEntity(name, meshFile);
        pEntity->setCastShadows(castShadows);
        pParent->attachObject(pEntity);

	Ogre::MeshPtr mesh = static_cast<Ogre::MeshPtr>(Ogre::MeshManager::getSingleton().getByName(meshFile));

	Vector3 scale = Vector3(5.0f, 5.0f, 5.0f);

	meshmagick::MeshMagick mm;
	meshmagick::TransformTool* transformTool = mm.getTransformTool();
	transformTool->transform(mesh, Matrix4::getScale(scale), false);
Does anyone have a clue what I'm doing wrong? The order of generating the entity/loading the mesh seems to be irrelevant, if I'm loading the mesh via the MeshManager first, then do the rescale and create an entity afterwards the result is the same... :(
0 x

StormChild
Gnoblar
Posts: 9
Joined: Tue Mar 09, 2010 5:50 pm
Location: Dresden, Germany

Re: Official MeshMagick thread - now licensed under MIT

Post by StormChild » Wed Oct 19, 2011 11:43 pm

Is it even possible to use this library as I intend to do it? I want to scale a mesh after it is loaded, but I don't want to serialize and reload it in the process.

I'm asking because the process loading mesh -> scaling -> serializing -> reloading seems to work correctly...
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post by spacegaier » Thu Oct 20, 2011 7:09 am

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.
0 x
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...

klaudia12
Gnoblar
Posts: 1
Joined: Thu Oct 20, 2011 8:38 am

Re: Official MeshMagick thread - now licensed under MIT

Post by klaudia12 » Thu Oct 20, 2011 8:45 am

Thanks for letting me know about other good stuff about MeshMagic!
0 x

Post Reply