mac osx maya 2009 plugin

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
davegreenwood
Posts: 10
Joined: Wed Jul 22, 2009 5:06 pm

mac osx maya 2009 plugin

Post by davegreenwood »

Hi all, I wonder if anyone can help me compile the plugin for osx maya2009.
I'm on a intel mac with 10.5.5 xcode 3.0
I've downloaded 2.75rc6, and linked the files to my xcode maya plugin template.
I know this template works with much less complicated plugins....
I feel confident I've linked to all the correct source files and maya devkit files but I can't get past these errors:

Code: Select all

Undefined symbols:
  "rigidBodyNode::typeName", referenced from:
      __ZN13rigidBodyNode8typeNameE$non_lazy_ptr in affectsNode.bundle-i386-master.o
  "sliderConstraintNode::typeName", referenced from:
      __ZN20sliderConstraintNode8typeNameE$non_lazy_ptr in affectsNode.bundle-i386-master.o
  "collisionShapeNode::creator()", referenced from:
      __ZN18collisionShapeNode7creatorEv$non_lazy_ptr in affectsNode.bundle-i386-master.o
there are 62 similar errors. A bit of googling of '$non_lazy_ptr' reveals a few people with such errors, but not with any solutions to the dynamica plugin.

I've also tried the included makefile with even less success, quickly getting the error:

Code: Select all

make: *** No rule to make target `nailConstraintNode.h', needed by `pluginMain.o'.  Stop.
What would be great is a working xcode project (or makefile), known to work on a similar setup... I'd try a maya2008 project file and try changing that if there is one...
Many thanks in advance if anyone can help:)
Dave.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: mac osx maya 2009 plugin

Post by Erwin Coumans »

Some files have been added and removed to the MayaPlugin.
(Undefined symbols: "class::typeName", referenced from [...] means class.cpp is missing, if class is implemented in class.cpp)

Attached is an updated Makefile.mac

Code: Select all

make -f Makefile.mac
make -f Makefile.mac install
Can you try it out, and see if it helps?

Also, could you share the precompiled Maya 2009 plugin, by attaching the zipped version? Some people requested it.
Thanks a lot,
Erwin
Attachments
Makefile.mac.zip
(1.45 KiB) Downloaded 625 times
davegreenwood
Posts: 10
Joined: Wed Jul 22, 2009 5:06 pm

Re: mac osx maya 2009 plugin

Post by davegreenwood »

Hi Erwin, thanks for getting back so quickly.

Well, I feel I got somewhat closer... but no cigar yet.

the makefile didn't fly straight away, I had to make a few changes. Specifically, I changed the maya include line to an explicit directory:

Code: Select all

MAYA_INCLUDE=-I/Applications/Autodesk/maya2009/devkit/include
I also changed 2008 to 2009 and the plug path:

Code: Select all

MAYA_PLUG_IN_PATH=/Users/Shared/Autodesk/maya/plug-ins
After this there was some progress... all the .o files got built, but the make stopped when it couldn't find any libs...

I'd already built the demos and recalled seeing the libs in various folders, so I created a directory $(BULLET)/out/macosxx86/optimize/libs and put all the libs in there.

Now this is where I'm at... the libs are found EXCEPT for libxml, yet it is absolutely in the directory:

Code: Select all

Pro1-2:MayaPlugin davegreenwood$ cd /Bullet/out/macosxx86/optimize/libs 
Pro1-2:libs davegreenwood$ ls -a
.				libBulletCollision.a		libColladaDom.a			libIff.a
..				libBulletDynamics.a		libConvexDecomposition.a	libLinearMath.a
.DS_Store			libBulletMultiThreaded.a	libGIMPACTUtils.a		libOpenGLSupport.a
libBulletColladaConverter.a	libBulletSoftBody.a		libGLUI.a			libxml.a
Pro1-2:libs davegreenwood$ 
here's the error:

Code: Select all

Pro1-2:MayaPlugin davegreenwood$ make -f Makefile.mac
g++ pluginMain.o colladaExport.o rigidBodyNode.o rigidBodyArrayNode.o collisionShapeNode.o solver.o bt_solver.o dSolverNode.o dSolverCmd.o dRigidBodyCmd.o dRigidBodyArrayCmd.o pdbIO.o drawUtils.o constraint/dHingeConstraintCmd.o constraint/dSliderConstraintCmd.o constraint/hingeConstraintNode.o constraint/sixdofConstraintNode.o constraint/dNailConstraintCmd.o constraint/dsixdofConstraintCmd.o constraint/nailConstraintNode.o constraint/sliderConstraintNode.o -ldl -shared -L/Bullet/out/macosxx86/optimize/libs -L/Bullet/src -lBulletColladaConverter -lcolladadom -llibxml  -lGIMPACTUtils -lbulletdynamics -lbulletcollision -lbulletmath  -L/Applications/Autodesk/maya2009/Maya.app/Contents/MacOS -lOpenMaya -lFoundation -Wl,-executable_path,/Applications/Autodesk/maya2009/Maya.app/Contents/MacOS  -lOpenMayaUI -lOpenMayaFX -lOpenMaya -lFoundation -framework OpenGL -o dynamicaMayaPlugin.bundle
ld: library not found for -llibxml
collect2: ld returned 1 exit status
make: *** [dynamicaMayaPlugin.bundle] Error 1
I know it finds the other libs, because if I remove the -llibxml flag from the makefile, there is no complaint of libs not found, and the build continues, but of course fails with various xml errors...

I'm very happy to give this all I can, I know quite a few people are after an osx binary.
Anyway, I'm hoping you might be able to shed a little light... maybe someone might have an xcode project?

Thanks for your help so far.
Dave.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: mac osx maya 2009 plugin

Post by Erwin Coumans »

The MayaPlugin for Mac OSX assumes that the libraries are build using jam. Jam is included in the Bullet distribution, just change to the Bullet/jam-2.5 folder, call 'make' and 'sudo make install'. Then, once jam is available for your system, you just call './autogen.sh', './configure', 'jam'

Alternatively, you need to rename libxml.a to liblibxml.a (the build system already adds the 'lib' prefix to the name libxml).
linked the files to my xcode maya plugin template.
Can you share this maya plugin template?
maybe someone might have an xcode project?
CMake is becoming the main Bullet build system, but not all projects have been ported over to using it. CMake can generate XCode projectfiles. Perhaps we can try to generate the Maya plugin using CMake, based on your template?
Hope this helps,
Erwin
davegreenwood
Posts: 10
Joined: Wed Jul 22, 2009 5:06 pm

Re: mac osx maya 2009 plugin

Post by davegreenwood »

Hi Erwin, here's the xcode template I've been using for some simple plugins of my own. I can also compile the maya devkit plugins using this, but I'm not sure how well it will work on anyone else's system.
Maya Templates.zip
(18.56 KiB) Downloaded 670 times
Anyway, to install just expand the zip to /Developer/Library/Xcode/Project Templates.

I got past the libxml hurdle (by renaming to liblibxml), and ran straight into bulletmath. Now that's a lib I don't have here, I have linearMath.a which I tried substituting but doesn't work. So looks like I'm at a stop again. I have all the other libs in the makefile.

Are cmake files available for the maya plugin? I used that for the demos successfully, so I'm happy to give that a go.

Thanks again for your help
Dave.
davegreenwood
Posts: 10
Joined: Wed Jul 22, 2009 5:06 pm

Re: mac osx maya 2009 plugin

Post by davegreenwood »

Hi Erwin, some good news... I've managed to compile the maya plugin on my system, actually using my xcode template in the end.
The file is too big to attach here, so for a while I've put it here:
PLEASE SEE POST BELOW

I've not tested beyond loading the plug and clicking a few buttons, and there where a few warnings in the compile:

Code: Select all

/Users/davegreenwood/Documents/MayaPlugDev/bullet276/MayaPlugin/constraint/bt_sixdof_constraint.h:40: warning: unused variable 'sixdof'
/Users/davegreenwood/Documents/MayaPlugDev/bullet276/MayaPlugin/constraint/bt_sixdof_constraint.h: In member function 'virtual void bt_sixdof_constraint_t::set_AngLimit(float, float)':
/Users/davegreenwood/Documents/MayaPlugDev/bullet276/MayaPlugin/constraint/bt_sixdof_constraint.h:46: warning: unused variable 'sixdof'
all relating to sixdof, plus a few linking warnings:

Code: Select all

ld: warning std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)has different visibility (1) in /usr/lib/libstdc++-static.a(string-inst.o) and (2) in /Users/davegreenwood/Documents/MayaPlugDev/bullet276/MayaPlugin/build/bullet.build/Default/dynamicaMayaPlugin.build/Objects-normal/dynamicaMayaPlugin.bundle-i386-master.o
ld: warning std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)has different visibility (1) in /usr/lib/libstdc++-static.a(string-inst.o) and (2) in /Users/davegreenwood/Documents/MayaPlugDev/bullet276/MayaPlugin/build/bullet.build/Default/dynamicaMayaPlugin.build/Objects-normal/dynamicaMayaPlugin.bundle-i386-master.o
ld: warning __ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8_.eh has different visibility (1) in /usr/lib/libstdc++-static.a(string-inst.o) and (2) in /Users/davegreenwood/Documents/MayaPlugDev/bullet276/MayaPlugin/build/bullet.build/Default/dynamicaMayaPlugin.build/Objects-normal/dynamicaMayaPlugin.bundle-i386-master.o
ld: warning __ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_.eh has different visibility (1) in /usr/lib/libstdc++-static.a(string-inst.o) and (2) in /Users/davegreenwood/Documents/MayaPlugDev/bullet276/MayaPlugin/build/bullet.build/Default/dynamicaMayaPlugin.build/Objects-normal/dynamicaMayaPlugin.bundle-i386-master.o
ld: warning std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)has different visibility (2) in /Users/davegreenwood/Documents/MayaPlugDev/bullet276/Extras/BulletColladaConverter/Debug/libBulletColladaConverter.a(ColladaConverter.o) and (1) in /usr/lib/libstdc++-static.a(string-inst.o)
ld: warning __ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8_.eh has different visibility (2) in /Users/davegreenwood/Documents/MayaPlugDev/bullet276/Extras/BulletColladaConverter/Debug/libBulletColladaConverter.a(ColladaConverter.o) and (1) in /usr/lib/libstdc++-static.a(string-inst.o)
Anyway, if anyone would care to test it, please report your findings.

Thanks
Dave.

oops, I just noticed I named the zip incorrectly, the file contains 2.75 rc6 not 2.76 rc5, the link is fine though.
Last edited by davegreenwood on Fri Jul 24, 2009 5:06 pm, edited 1 time in total.
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

hey dave - crossposting from cgsociety

I ran the test scenes and I think there are some problems. The field ones seem to work . The peanut box and others that involve collisions don't work - there are no rigid body interactions so the peanuts and spheres just sail through the objects. here's the error output from the peanut box:

Code:

// Error: line 1: Plug-in, "dynamica.bundle", was not found on MAYA_PLUG_IN_PATH. // // Error: file: /Volumes/MYBACK/DOWNLOADS_MB/Dynamica276rc5ForMaya2009OSX/scenes/peanutBox.ma line 65: The dRigidBody 'dRigidBodyShape1' has no '.ac' attribute. // // Error: file: /Volumes/MYBACK/DOWNLOADS_MB/Dynamica276rc5ForMaya2009OSX/scenes/peanutBox.ma line 65: No object matches name: .ac // // Error: file: /Volumes/MYBACK/DOWNLOADS_MB/Dynamica276rc5ForMaya2009OSX/scenes/peanutBox.ma line 539: The dRigidBody 'dRigidBodyShape2' has no '.ac' attribute. // // Error: file: /Volumes/MYBACK/DOWNLOADS_MB/Dynamica276rc5ForMaya2009OSX/scenes/peanutBox.ma line 539: No object matches name: .ac // // File read in 0 seconds. // Warning: This file is from an older version of Maya. If saved, it will not be readable by previous versions. // // Error: Error reading file. // // Error: Error reading file. //



The peanut funnel doesn't show any peanuts - just a falling funnel. The 2008 plug-in wasn't stable but I remember it did get the RB collisions to work. And the speed was definitely better. the donuts scene is kind of funny to watch since it chugs along at .5 FPS and then doesn't collide when the cube reaches the donuts. This is on an 8-core Nehalem Mac Pro with 24GB of RAM. :P
davegreenwood
Posts: 10
Joined: Wed Jul 22, 2009 5:06 pm

Re: mac osx maya 2009 plugin

Post by davegreenwood »

I did:
listAttr dRigidBodyShape1;

Code: Select all

// Result: message caching isHistoricallyInteresting nodeState binMembership boundingBox boundingBoxMin boundingBoxMinX boundingBoxMinY boundingBoxMinZ boundingBoxMax boundingBoxMaxX boundingBoxMaxY boundingBoxMaxZ boundingBoxSize boundingBoxSizeX boundingBoxSizeY boundingBoxSizeZ center boundingBoxCenterX boundingBoxCenterY boundingBoxCenterZ matrix inverseMatrix worldMatrix worldInverseMatrix parentMatrix parentInverseMatrix visibility intermediateObject template ghosting instObjGroups instObjGroups.objectGroups instObjGroups.objectGroups.objectGrpCompList instObjGroups.objectGroups.objectGroupId instObjGroups.objectGroups.objectGrpColor useObjectColor objectColor drawOverride overrideDisplayType overrideLevelOfDetail overrideShading overrideTexturing overridePlayback overrideEnabled overrideVisibility overrideColor lodVisibility renderInfo identification layerRenderable layerOverrideColor renderLayerInfo renderLayerInfo.renderLayerId renderLayerInfo.renderLayerRenderable renderLayerInfo.renderLayerColor ghostingControl ghostCustomSteps ghostPreSteps ghostPostSteps ghostStepSize ghostFrames ghostRangeStart ghostRangeEnd ghostDriver renderType renderVolume visibleFraction motionBlur visibleInReflections visibleInRefractions castsShadows receiveShadows maxVisibilitySamplesOverride maxVisibilitySamples geometryAntialiasingOverride antialiasingLevel shadingSamplesOverride shadingSamples maxShadingSamples volumeSamplesOverride volumeSamples depthJitter ignoreSelfShadowing primaryVisibility referenceObject compInstObjGroups compInstObjGroups.compObjectGroups compInstObjGroups.compObjectGroups.compObjectGrpCompList compInstObjGroups.compObjectGroups.compObjectGroupId underWorldObject localPosition localPositionX localPositionY localPositionZ worldPosition worldPosition.worldPositionX worldPosition.worldPositionY worldPosition.worldPositionZ localScale localScaleX localScaleY localScaleZ inCollisionShape solver mass restitution friction linearDamping angularDamping initialPosition initialPositionX initialPositionY initialPositionZ initialRotation initialRotationX initialRotationY initialRotationZ initialVelocity initialVelocityX initialVelocityY initialVelocityZ initialSpin initialSpinX initialSpinY initialSpinZ ca_rigidBody ca_rigidBodyParam ca_solver // 
and you can see the dRigidBody no longer has those attributes, I checked the source, and there not there either. Maybe we can look at the latest version of the windows source, if that works properly?
Dave.
davegreenwood
Posts: 10
Joined: Wed Jul 22, 2009 5:06 pm

Re: mac osx maya 2009 plugin

Post by davegreenwood »

In the light of cgbeige pointing out the mismatched attr names, I compiled the plug with 2.73sp1

PLEASE SEE POST BELOW

I had no errors or warnings with compile, but my initial tests indicate it doesn't work:(

Anyway, have a go, see if we can shed some light on this.

I did wonder about the actual mel scripts, if they are making the right connections etc...

Dave.
Last edited by davegreenwood on Fri Jul 24, 2009 5:07 pm, edited 1 time in total.
davegreenwood
Posts: 10
Joined: Wed Jul 22, 2009 5:06 pm

Re: mac osx maya 2009 plugin

Post by davegreenwood »

Going back to the first compile I did... I didn't update the scripts...
get them here:

http://code.google.com/p/bullet/source/ ... in/scripts

Dave.
davegreenwood
Posts: 10
Joined: Wed Jul 22, 2009 5:06 pm

Re: mac osx maya 2009 plugin

Post by davegreenwood »

Hi all, I've had another look at the 275rc6 files.
This time I've managed to compile without errors or warnings. Please disregard the earlier files and try this one:

http://www.highend3d.com/maya/downloads ... -5901.html

I've also included the latest scripts.

Dave.
Last edited by davegreenwood on Wed Aug 12, 2009 9:11 am, edited 1 time in total.
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

great - setup of new scenes works. sphere, cube, mesh RB works fine and I had them run down some planes. Loading the included scenes produce the same results though (no collisions):

// Error: file: /Volumes/MYBACK/DOWNLOADS_MB/Dynamica275rc6ForMaya2009OSX/scenes/peanutBox.ma line 65: The dRigidBody 'dRigidBodyShape1' has no '.ac' attribute. //
// Error: file: /Volumes/MYBACK/DOWNLOADS_MB/Dynamica275rc6ForMaya2009OSX/scenes/peanutBox.ma line 65: No object matches name: .ac //
// Error: file: /Volumes/MYBACK/DOWNLOADS_MB/Dynamica275rc6ForMaya2009OSX/scenes/peanutBox.ma line 539: The dRigidBody 'dRigidBodyShape2' has no '.ac' attribute. //
// Error: file: /Volumes/MYBACK/DOWNLOADS_MB/Dynamica275rc6ForMaya2009OSX/scenes/peanutBox.ma line 539: No object matches name: .ac //
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

tried a voronoi mesh test:
http://www.3eige.com/ars/voronoibullet.mov

Not sure how to get the collisions to be a bit more realistic. Also, this still seems slow for bullet.
davegreenwood
Posts: 10
Joined: Wed Jul 22, 2009 5:06 pm

Re: mac osx maya 2009 plugin

Post by davegreenwood »

those included scenes are definitely not going to work now, as the later source code doesn't use those attribute names.
Keep testing;)
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

so the constraints work nicely. There are some odd behaviours with some of the meshes though:

http://www.3eige.com/cgtalk/voronoibullet2.mov

I think the speed is not a problem now since I realized it was because I was using mesh-based collisions it's faster when you use convex hull arrays.

anyway, this is all I can do for today. I have to get to work on this contract.
Post Reply