Page 12 of 12

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu Apr 24, 2014 3:57 am
by squishleheimer
Hi guys,

I've made the code changes listed above to get the build to work using OGRE v1.9 source (minus the #include OgreProgressiveMesh which is no longer valid) and created the svn patch. I will investigate the process to get it submitted but in the meantime I've attached it here for the convenience of others. You would just right-click on the meshmagick directory and use the apply patch option in the svn context menu.
update_to_v1.9.patch
(2.75 KiB) Downloaded 346 times

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu Apr 24, 2014 4:44 am
by Kojack
spacegaier wrote:
masterfalcon wrote:Who manages that repo though? Do we?
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.
According to source forge's docs, there's no fine grain (path) permissions, it's either you can write to the entire repository or you can't.
So in theory any of us with addons access should have full access. I've never tried writing to any addon besides the sketchup exporter though. I should try it on a readme or something harmless.

A lot of the addons are a little out of date. Other than dotscene, none of them have been touched for at least 3 years (10 years in some cases).

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu Apr 24, 2014 9:50 am
by squishleheimer
Kojack wrote:A lot of the addons are a little out of date. Other than dotscene, none of them have been touched for at least 3 years (10 years in some cases).
Yeah, it's a little frustrating but hey, whaddayagonnado? I've been working off the OgreBullet addon and have had to make the various changes to get that to work too. I wouldn't mind taking the torch (on OgreBullet) but would rather work with git and pull requests. Amusingly, to me at least, the last changeset on OgreBullet was adding a bunch of superfluous semicolons and whitespace as matter of personal taste.

Anyway, I think it would be preferable if each of the addon's had their own separate repository. It would make collaboration a bit easier than the old monolithic svn repo that should be put out to pasture. Small prohibitive factors, e.g. massive amounts of data that must be downloaded but are unneeded; opaque and inconsistent processes of checking-in and contributing, conspire to cause code atrophy. In theory, projects would be less likely to be abandoned and get out of date if the each were on github, bitbucket or sourceforge and you could submit pull requests.

I'm probably not saying anything that hasn't already been said so maybe I should just create a branch and see if it gets some traction. I just hate the fact that there is duplication making it more difficult for folks to know which repository to use. Also, as yet I haven't bothered to see if my changes work cross-platform.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Tue Feb 10, 2015 3:36 pm
by jacmoe
MeshMagick has been updated for Ogre 1.10 and can be found in OgreAddons: https://bitbucket.org/ogreaddons/meshmagick :)

Re: Official MeshMagick thread - now licensed under MIT

Posted: Tue May 01, 2018 5:11 am
by blubberUNR
Hi,

I'm trying to use MeshMagick to do some transformations on a .mesh that I exported from Blender, but I don't know how to install from the bitbucket source. I'm on Ubuntu 16.04 Linux. I downloaded the ZIP file of the source code, but that's as far as I got. What do I do to install the source to be able to use the command line "MeshMagick ..." command?

Re: Official MeshMagick thread - now licensed under MIT

Posted: Wed Feb 05, 2020 1:59 pm
by paul424
system: OpenSuse 15.1 x64
ogreversion : Ogre 12 2 0
graphic : nvidia 750gtx, NVIDIA Driver Version: 435.21
shaders: RTShader System

tom@Zyxel:~/Downloads/meshmagick-master> ./meshmagick -verbose transform -rotate=180/0/0/1 ~/Opendungeons/OpenDungeons/models/Cannon.mesh
Loading mesh /home/tom/Opendungeons/OpenDungeons/models/Cannon.mesh...
Processing mesh...
Calculating transformation...
Apply rotation (quat.) -4.37114e-08 0 0 1
final transform -1 8.74228e-08 0 0 -8.74228e-08 -1 0 0 0 0 1 0 0 0 0 1
Mesh saved as /home/tom/Opendungeons/OpenDungeons/models/Cannon.mesh.

That would be all, except the material files do not work anymore -- I get white texture model .... what might be wrong ... ?

Re: Official MeshMagick thread - now licensed under MIT

Posted: Wed Feb 05, 2020 7:36 pm
by paroj
paul424 wrote:
Wed Feb 05, 2020 1:59 pm
system: OpenSuse 15.1 x64
ogreversion : Ogre 12 2 0
graphic : nvidia 750gtx, NVIDIA Driver Version: 435.21
shaders: RTShader System

tom@Zyxel:~/Downloads/meshmagick-master> ./meshmagick -verbose transform -rotate=180/0/0/1 ~/Opendungeons/OpenDungeons/models/Cannon.mesh
Loading mesh /home/tom/Opendungeons/OpenDungeons/models/Cannon.mesh...
Processing mesh...
Calculating transformation...
Apply rotation (quat.) -4.37114e-08 0 0 1
final transform -1 8.74228e-08 0 0 -8.74228e-08 -1 0 0 0 0 1 0 0 0 0 1
Mesh saved as /home/tom/Opendungeons/OpenDungeons/models/Cannon.mesh.

That would be all, except the material files do not work anymore -- I get white texture model .... what might be wrong ... ?
use this version: https://github.com/OGRECave/meshmagick

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu Feb 06, 2020 11:34 am
by paul424
Oki -dokey , I compiled it with some code ammendments ( namely I had to have modify

Code: Select all

 .getByName(name);
to

Code: Select all

.getByName(name,ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
probably because my Ogre lib is compiled as more >>conservative<< ). It works. Many thanks !

Re: Official MeshMagick thread - now licensed under MIT

Posted: Wed May 27, 2020 11:59 pm
by loath
meshmagick doesn't seem to compile without using deprecated APIs on 1.12...

what's the min c++ version for ogre and tools? c++ 98?

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu May 28, 2020 12:47 am
by paroj
loath wrote:
Wed May 27, 2020 11:59 pm
meshmagick doesn't seem to compile without using deprecated APIs on 1.12...
yeah, most addons still use deprecated API as it is too much work porting them all. In fact I use them to test which API is safe to drop and which should be kept as deprecated.
Everything should still compile though.
loath wrote:
Wed May 27, 2020 11:59 pm
what's the min c++ version for ogre and tools? c++ 98?
for ogre 1.12 it is C++11 as supported my VS2013.

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu May 28, 2020 4:08 am
by loath
awesome. i started fixing the deprecated calls and i forgot how tedious c++ 98 is. i'll use c++ 11 before submitting the patch.

the main issue is this:

Code: Select all

void TransformTool::processPose(Pose* pose)
    {
        Matrix3 m3x3;
        mTransform.extract3x3Matrix(m3x3);

        Pose::VertexOffsetIterator it = pose->getVertexOffsetIterator();
        while (it.hasMoreElements())
        {
            Vector3 offset = it.peekNextValue();
            Vector3 newOffset = m3x3 * offset;
            *it.peekNextValuePtr() = newOffset; // <---- HERE
            it.moveNext();
        }
    }
there isn't a way that i see to convert this to the new interface which returns a constant reference.

i used const_cast but it's ugly. any suggestions / preference on how to fix this? i need to mimic some of this code in my project so i need to figure this out one way or the other. are you removing the non-const functions so we can eventually refactor / modernize the internal data structures?

Code: Select all

void TransformTool::processPose(Pose* pose)
    {
        Matrix3 m3x3 = mTransform.linear ();

        for (const auto& it : pose->getVertexOffsets())
        {
            auto offset = it.second;
            auto newOffset = m3x3 * offset;
            // ugly const_cast because 'it' is const
            *const_cast<Vector3*>(&it.second) = newOffset;
        }
    }
thanks!

Re: Official MeshMagick thread - now licensed under MIT

Posted: Thu May 28, 2020 6:55 am
by loath
replaced the deprecated calls and fixed a few bugs where the output skeleton overwrites the input skeleton. tested each of the scenarios by comparing against the previous code compiled with the deprecations. the only remaining issue is the ugly const_cast. sent a pull request in case paroj has any ideas.