Page 10 of 12

Re: Official MeshMagick thread - now licensed under MIT

Posted: Wed Mar 24, 2010 1:14 am
by cyrfer
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

Re: Official MeshMagick thread - now licensed under MIT

Posted: Sun Aug 22, 2010 5:07 pm
by Ripgiblet
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.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu Sep 02, 2010 3:26 pm
by hike1
I'm having trouble merging submeshes with this mesh,
I type meshmagick meshmerge ruins.mesh but the
submeshes are still there,making texturing impossible.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu Sep 02, 2010 3:31 pm
by hike1

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu Sep 02, 2010 4:04 pm
by haffax
That's not what meshmerge does. Meshmerge merges multiple mesh files into one. Merging submeshes is not yet possible with meshmagick.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Sun Oct 10, 2010 9:52 pm
by PolyVox
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?

Re: Official MeshMagick thread - now licensed under MIT

Posted: Mon Oct 11, 2010 10:41 am
by haffax
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.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Mon Oct 11, 2010 10:51 pm
by PolyVox
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

Re: Official MeshMagick thread - now licensed under MIT

Posted: Fri Nov 05, 2010 1:33 am
by larnya
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 ?

Re: Official MeshMagick thread - now licensed under MIT

Posted: Fri Nov 05, 2010 10:26 am
by haffax
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.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Sat Nov 06, 2010 2:04 am
by larnya
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

Re: Official MeshMagick thread - now licensed under MIT

Posted: Wed Nov 24, 2010 1:32 pm
by so0os
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 1270 times

Re: Official MeshMagick thread - now licensed under MIT

Posted: Mon Dec 13, 2010 6:32 pm
by Beauty
I would be happy if somebody can upload a binary version (for Windows) related to Ogre 1.6.x.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Tue Dec 14, 2010 9:09 am
by so0os
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)

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

Posted: Tue May 10, 2011 10:13 pm
by FlorianGeorge
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.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Mon Jul 04, 2011 8:42 pm
by jhooks1
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

Re: Official MeshMagick thread - now licensed under MIT

Posted: Tue Aug 23, 2011 2:33 pm
by JDX_John
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?

Re: Official MeshMagick thread - now licensed under MIT

Posted: Sun Aug 28, 2011 10:48 am
by JDX_John
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.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Fri Oct 14, 2011 9:01 pm
by spacegaier
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?

Re: Official MeshMagick thread - now licensed under MIT

Posted: Sat Oct 15, 2011 5:51 pm
by jacmoe
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:

Re: Official MeshMagick thread - now licensed under MIT

Posted: Sat Oct 15, 2011 6:27 pm
by spacegaier
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.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Mon Oct 17, 2011 10:41 am
by StormChild
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... :(

Re: Official MeshMagick thread - now licensed under MIT

Posted: Wed Oct 19, 2011 11:43 pm
by StormChild
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...

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu Oct 20, 2011 7:09 am
by spacegaier
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.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu Oct 20, 2011 8:45 am
by klaudia12
Thanks for letting me know about other good stuff about MeshMagic!