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
squishleheimer
Gnoblar
Posts: 4
Joined: Wed Sep 21, 2011 9:00 am
Location: Perth

Re: Official MeshMagick thread - now licensed under MIT

Post 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 343 times

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7153
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 523

Re: Official MeshMagick thread - now licensed under MIT

Post 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).

squishleheimer
Gnoblar
Posts: 4
Joined: Wed Sep 21, 2011 9:00 am
Location: Perth

Re: Official MeshMagick thread - now licensed under MIT

Post 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.

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

Re: Official MeshMagick thread - now licensed under MIT

Post by jacmoe »

MeshMagick has been updated for Ogre 1.10 and can be found in OgreAddons: https://bitbucket.org/ogreaddons/meshmagick :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

blubberUNR
Gnoblar
Posts: 1
Joined: Tue May 01, 2018 5:08 am

Re: Official MeshMagick thread - now licensed under MIT

Post 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?

paul424
Goblin
Posts: 221
Joined: Thu May 24, 2012 7:16 pm
x 5

Re: Official MeshMagick thread - now licensed under MIT

Post 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 ... ?

paroj
OGRE Team Member
OGRE Team Member
Posts: 1222
Joined: Sun Mar 30, 2014 2:51 pm
x 487
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post 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

paul424
Goblin
Posts: 221
Joined: Thu May 24, 2012 7:16 pm
x 5

Re: Official MeshMagick thread - now licensed under MIT

Post 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 !

loath
Platinum Sponsor
Platinum Sponsor
Posts: 178
Joined: Tue Jan 17, 2012 5:18 am
x 19

Re: Official MeshMagick thread - now licensed under MIT

Post 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?

paroj
OGRE Team Member
OGRE Team Member
Posts: 1222
Joined: Sun Mar 30, 2014 2:51 pm
x 487
Contact:

Re: Official MeshMagick thread - now licensed under MIT

Post 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.

loath
Platinum Sponsor
Platinum Sponsor
Posts: 178
Joined: Tue Jan 17, 2012 5:18 am
x 19

Re: Official MeshMagick thread - now licensed under MIT

Post 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!

loath
Platinum Sponsor
Platinum Sponsor
Posts: 178
Joined: Tue Jan 17, 2012 5:18 am
x 19

Re: Official MeshMagick thread - now licensed under MIT

Post 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.

Post Reply