chenynCV / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

Fix and Extend BulletMayaPlugin #221

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Nail Constraint does not work.

What is the expected output? What do you see instead?
You will see the constraint working again

What version of the product are you using? On what operating system?
Maya in XP

Thanks,
Herbert

Original issue reported on code.google.com by herbert....@gmail.com on 21 Apr 2009 at 11:43

GoogleCodeExporter commented 9 years ago
Attached a svn .patch file

1. Fix Nail Constraint
2. Add new Hinge Constraint
3. Add new Slider Constraint
4. Add new 6Dof Constraint
5. Modified btSliderConstraint.h btSliderConstraint.cpp and btHingeConstraint.h 
to 
make this work.
6. Need help on making new icons for Hinge Constraint, Slider Constraint, 6Dof 
Constraint.

Tested in Maya2008 in WinXP.

Thanks,
Herbert

Original comment by herbert....@gmail.com on 21 Apr 2009 at 11:47

Attachments:

GoogleCodeExporter commented 9 years ago

Great, thanks a lot for the patch.

We are preparing for a new release, and will check out / include this patch.

Original comment by erwin.coumans on 5 May 2009 at 10:49

GoogleCodeExporter commented 9 years ago
Applied the patch, and constraints seem to work, apart from some remaining 
issues:
http://code.google.com/p/bullet/source/detail?r=1651

+ Can you check the hinge constraint? It seems to have issues both for 
single-object 
(against fixed world) and when using 2 objects.
+ We need to look into Linux and Mac OSX build
+ Add some documentation and test files (I added 2 test files already)

Original comment by erwin.coumans on 6 May 2009 at 7:56

GoogleCodeExporter commented 9 years ago
Fix a bug for hinge constraints.
The hinge axis was (0, 0, 0), which is not a valid axis.
The hinge axis will be default to (0, 0, 1), Z-positive.

Original comment by herbert....@gmail.com on 12 May 2009 at 5:00

Attachments:

GoogleCodeExporter commented 9 years ago
Here is a very short User Manual
User Manual For Bullet Maya Plugin

Rigid Body
   TBD

Constraint
1. Nail Constraint
   - When you update the constraint transform, you update the constraint of object to 
world
2. Hinge Constraint
   - When you update the constraint transform, you update the constraint of object to 
world
   - "Lower Limit", default to -1.570 in radian
   - "Upper Limit", default to 1.570 in radian
   - When "Upper Limit" value is lower than "Lower Limit" value, the limit is 
disabled. 
   - Hinge Axis default to +z-axis, You can change the axis vector on "Hing Axis"
   - Click check box "Enable Angular Motor" to enable motor
   - "Motor Target Velocity", default to 1.00 set the velocity
   - "Max Motor Impulse", default to 1.00 set the motor impulse
3. Slider Constraint
   - When you update the constraint transform, it doesn't do anything
   - Must Select 2 Rigid Bodies to create a slider constraint between them
   - Constraint is default to no Lin and Ang Limit
   - When "Upper Lin Limit" value is lower than "Lower Lin Limit" value , the limit 
is disabled
   - When "Upper Ang Limit" value is lower than "Lower Ang Limit" value , the limit 
is disabled
4. 6Dof Constraint
   - When you update the constraint transform, it doesn't do anything
   - Must Select 2 Rigid Bodies to create a 6Dof constraint between them
   - Constraint is default to no Lin and Ang Limit
   - When "Upper Lin Limit" value is lower than "Lower Lin Limit" value , the limit 
is disabled
   - When "Upper Ang Limit" value is lower than "Lower Ang Limit" value , the limit 
is disabled

Original comment by herbert....@gmail.com on 12 May 2009 at 6:03

GoogleCodeExporter commented 9 years ago
Thanks for the update.

There are still several issues:

1) When you create a nail constraint, while 2 dynamic/active rigid objects are 
selected, it creates 2 nail constraints. It should create a single nail 
constraint, 
conneting the 2 objects.

2) when you create a nail constraint, on a single rigid body, and move the 
rigid 
body, then the nail constraint should automatically move with the (first) body. 
Currently, the nail constraint doesn't move with the body. This should be the 
same 
for all constraints: when the first (reference A) body moves, the attached 
constraint 
should move too.

3) hinge doesn't work, when connecting two bodies.

slider, 6dof have similar issues.

Can you double check above, and provide sample .ma files for each constraint?

Thanks a lot,
Erwin

Original comment by erwin.coumans on 12 May 2009 at 8:38

GoogleCodeExporter commented 9 years ago

Original comment by erwin.coumans on 3 Nov 2009 at 3:06

GoogleCodeExporter commented 9 years ago

Original comment by rpo...@gmail.com on 5 Nov 2009 at 6:43

GoogleCodeExporter commented 9 years ago
Worked with Bullet 2.74 64 bits. 
Day after I can not open the file anymore cause Maya gives fatal error at start 
up. 

At the day of creation I had not problems with saving at all.

Original comment by rdtreynh...@gmail.com on 7 Jan 2010 at 3:52

GoogleCodeExporter commented 9 years ago
@reinier_reynhout

What platform? What version of Maya? Are you saving a .mb or .ma file? Can you 
a 
small example file that crashes?

Thanks a lot,
Erwin

Original comment by erwin.coumans on 7 Jan 2010 at 9:56

GoogleCodeExporter commented 9 years ago
What version of the plugin do you use?

I made some changes in the nail constraint node, so new plugin (built from 
sources 
after r1872 Dec 24, 2009) could have problems with loading old files.

Does it crashes when you use the old plugin?

Thanks,
Roman

Original comment by rpo...@gmail.com on 7 Jan 2010 at 11:55

GoogleCodeExporter commented 9 years ago
Hi great work guys, looking forward to helping make this better, 

I have a few problems:  

#1 Creating convex hull RBD objects make  geometry that "flattens out"  weirdly 
and keeps expanding the shape each time you click on the  geometry in the  
outliner. 

#2  When creating  RBD mesh objects the  simulation does not work. 

steps:
make a sphere above ground plane.   create a mesh based rbd object, make a 
passive
plane.   run simulation and  sphere will react wrong,  either falling thru the 
plane,
or  not moving at all..   

Also tried  making  cones  in a  mesh array  and  they collided improperly but 
at
least did collide.   it seemed to only collide based on the  center of the 
object not
the actual mesh 

#3
create  an array  RBD object as cubes.   in attribute editor,  switch to spheres
shape will change.   try to switch it again,  and it will not  change a second 
time. 

What version of the product are you using? On what operating system?
I'm using MAYA 2009 on  Linux 64bit. 

It took a bit of work to change and update the linux make file for this to work 
as
well. but I finally got it working.  let me know if you'd like the patched up 
file
and I can send it to you 

thanks 

John
Luma Pictures
RedPawFX

Original comment by redpa...@gmail.com on 8 Jan 2010 at 11:12

GoogleCodeExporter commented 9 years ago
Here is the current version of the task list:

Fixing bugs :
    initial position
    loading/saving
    crash while working with meshes
    RBD script issues
    ...
-------
Solver node:

Add attributes:
    - Broadphase type
    - Constraint solver parameters (type, number of iterations, etc)

-------

Body Node

1. Reset activationState at playback start time
2.Add attributes for:
    - collisonFlags
    - activationState
    - deactivationTime
3. Add more types (e.g. cylinder, composite), remove dynamic plane

-------

Nail Constraint Node

1. Add attribute to connect the second body (static or dynamic)
2. Change pivot location at creation time (origin of the body transform rather 
then 
world origin)
3. Add attribute for impulseClamp 

-------

Hinge Constraint Node

1. Add attribute to connect the second body 
2. Change frame location at creation time (origin of the body transform rather 
then 
world origin)
3. Use the Z axis of transform of the node locator as hinge axis, allow to 
modify 
constraint frame using move/rotate tools
4. Add debug drawing 

-------

Slider Constraint Node

1. Allow to connect the constraint to just one object
2. Change frame location at creation time (origin of the body transform rather 
then 
world origin)
3. Use the X axis of transform of the node locator as slider axis, allow to 
modify 
constraint frame using move/rotate tools
4. Add attributes for bounce, motors, etc.
5. Add debug drawing 

-------

6DOF Constraint Node

1. Allow to connect the constraint to just one object
2. Change frame location at creation time (origin of the body transform rather 
then 
world origin)
3. Use the transform of the node locator as constraint frame, allow to modify 
it 
using move/rotate tools
4. Use vectors for linear and angular limits
5. Add attributes for bounce, motors, etc.
6. Add debug drawing 

-------

Add demo scenes

-------

Possible future work

Add more constraint types (that is mostly copy/paste job)
Add more object types (e.g. ragdoll)
Add boolean attribute to make object Kinematic or dynamic, make it keyable to 
allow 
switching at playback time
Integrate RBD scripts into plugin

Original comment by rpo...@gmail.com on 9 Jan 2010 at 12:44

GoogleCodeExporter commented 9 years ago
>> John, RedPawFX
>> 
>> It took a bit of work to change and update the linux make file for this to 
work as
>> well. but I finally got it working.  let me know if you'd like the patched 
up file
>> and I can send it to you 

Yes please, can you attach a patch/updated Makefile?

Thanks!
Erwin

Original comment by erwin.coumans on 9 Jan 2010 at 6:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hey Erwin, So here's what I  did to get it working   after compiling  bullet 
with
extras  I installed it to an  "out" directory in the  trunk directory  

Then  in that  "out" install dir  I made links  like so:

libBulletColladaConverter.so ->
../../Extras/BulletColladaConverter/libBulletColladaConverter.so
libColladaDom.so -> ../../Extras/COLLADA_DOM/libColladaDom.so
libGIMPACTUtils.so -> ../../Extras/GIMPACTUtils/libGIMPACTUtils.so
liblibxml.so -> ../../Extras/LibXML/libXML.so
libxml.so -> ../../Extras/LibXML/libXML.so

Then modified the makeFile  re-organizing  etc.. 

.... 

BULLET_INCLUDE=-I$(BULLET)/src
BULLET_LIB=-L$(BULLET)/out/lib -L$(BULLET)/src \
               -lBulletColladaConverter -lcolladadom -llibxml -lGIMPACTUtils
-lbulletdynamics \
                 -lbulletcollision -lLinearMath

GL_LIB=-lGL -lGLU 

MAYA_INCLUDE=-I$(MAYA)/include
MAYA_LIB=-L$(MAYA)/lib -lOpenMaya -lFoundation -lOpenMayaUI -lOpenMayaFX

SOURCES =   ./constraint/dNailConstraintCmd.cpp \
            ./constraint/nailConstraintNode.cpp \
            ./constraint/dHingeConstraintCmd.cpp \
            ./constraint/dsixdofConstraintCmd.cpp \
            ./constraint/dSliderConstraintCmd.cpp \
            ./constraint/hingeConstraintNode.cpp \
            ./constraint/sixdofConstraintNode.cpp \
            ./constraint/sliderConstraintNode.cpp \
            bt_solver.cpp \
            dRigidBodyArrayCmd.cpp \
            pdbIO.cpp \
            colladaExport.cpp \
            dRigidBodyCmd.cpp \
            pluginMain.cpp \
            collisionShapeNode.cpp \
            dSolverCmd.cpp \
            rigidBodyArrayNode.cpp \
            dSolverNode.cpp \
            rigidBodyNode.cpp \
            drawUtils.cpp \
            solver.cpp

HEADERS =   ./constraint/nail_constraint.h \
            ./constraint/constraint.h \
            ./constraint/nail_constraint_impl.h \
            ./constraint/bt_constraint.h \
            ./constraint/dNailConstraintCmd.h \
            ./constraint/bt_hinge_constraint.h \
            ./constraint/bt_sixdof_constraint.h \
            ./constraint/bt_slider_constraint.h \
            ./constraint/constraint_impl.h \
            ./constraint/dHingeConstraintCmd.h \
            ./constraint/dsixdofConstraintCmd.h \
            ./constraint/dSliderConstraintCmd.h \
            ./constraint/hinge_constraint.h \
            ./constraint/hinge_constraint_impl.h \
            ./constraint/hingeConstraintNode.h \
            ./constraint/nailConstraintNode.h \
            ./constraint/sixdof_constraint.h \
            ./constraint/sixdof_constraint_impl.h \
            ./constraint/sixdofConstraintNode.h \
            ./constraint/slider_constraint.h \
            ./constraint/slider_constraint_impl.h \
            ./constraint/sliderConstraintNode.h \
            ./constraint/bt_nail_constraint.h \
            box_shape.h \
            collisionShapeNode.h \
            box_shape_impl.h \
            bt_box_shape.h \
            bt_collision_shape.h \
            convex_hull_shape.h \
            pdbIO.h \
            convex_hull_shape_impl.h \
            plane_shape.h \
            bt_convex_hull_shape.h \
            plane_shape_impl.h \
            bt_mesh_shape.h \
            drawUtils.h \
            rigidBodyArrayNode.h \
            dRigidBodyArrayCmd.h \
            rigid_body.h \
            bt_plane_shape.h \
            dRigidBodyCmd.h \
            rigid_body_impl.h \
            bt_rigid_body.h \
            dSolverCmd.h \
            rigidBodyNode.h \
            bt_solver.h \
            dSolverNode.h \
            shared_ptr.h \
            bt_sphere_shape.h \
            mathUtils.h \
            solver.h \
            colladaExport.h \
            mayaUtils.h \
            solver_impl.h \
            collision_shape.h \
            mesh_shape.h \
            sphere_shape.h \
            collision_shape_impl.h \
            mesh_shape_impl.h \
            sphere_shape_impl.h

...... 

and then  I tried  compiling it and  made changes to each file that had  the 
wrong
pointer to   constraint files as they are in the  "constraints" folder now 

got it compiled and working,  but again,  have the same  problems as  stated in 
the
previous comment above .  

I had a look thru the  Bullet code, and tried to  revert all the convexMesh 
stuff
back to not using the "caching" type  that was  added since  version 2.74, but 
that
didn't seem to help..  I'm honestly not sure if its  something in the bullet 
base or
the maya code that is causing the  issues I described earlier... 

anyway. hope this helps. 

let me know if you guys  get some new stuff up on svn and I'd love to give it a 
shot
and help you  track issues. 

thanks 
-johnc
Luma Pictures
redpawFX 

Original comment by redpa...@gmail.com on 11 Jan 2010 at 11:34

GoogleCodeExporter commented 9 years ago
>> after compiling  bullet with extras 

Just to be sure, how did you compile Bullet? Using cmake, jam or autotools/make?

>> #1 Creating convex hull RBD objects make  geometry that "flattens out"  
weirdly 
>> #2  When creating  RBD mesh objects the  simulation does not work. 

Could you share Maya .ma and .mb files for those problematic RBD objects/mesh 
objects 
(attach file).

Thanks a lot,
Erwin

Original comment by erwin.coumans on 12 Jan 2010 at 4:35

GoogleCodeExporter commented 9 years ago
Hey Erwin,   I used cmake  then make  to build bullet. 
and used Make  to build  the maya plugin 

to reproduce the problems I described,  its realy simple,  and  unfortunately 
our
firewall won't allow attachments to be sent, sorry.   

make a passive RBD  ground plane
make  a maya geometry  sphere,box,cone,whatever 
select it and make it a convex hull rbd object  or  rbd mesh object 
move it above the ground plane, and hit play to simulate, 
things will begin to freak out as described,  if they don't for you, 
then there may be something that is not compiling properly on my end. 
There are a few  warnings I'm getting with the bullet and maya compile
but  nothing  worse than variable type errors   float to int or something like 
that. 

I'm compiling this on  redhat/fedora  Linux X64 
there was a thread on cgTalk saying that  x64 compiles were buggy compared to  
x32? 
I wonder if that could be the case here too... 

let me know
thanks 

-johnc
Luma-pictures
redpawFX

Original comment by redpa...@gmail.com on 12 Jan 2010 at 5:04

GoogleCodeExporter commented 9 years ago
Hi, 

I've been able to replicate this problem following the steps johnc gave in the
previous comment. I'm using linux 64 bits and Maya 2008 64 bits. I attach a 
file with
a Maya scene showing this problem. My maya scene has a passive RBD ground plane 
and a
convex hull rbd created from a polygonal cone. 

I've found something interesting: originally, the cone's bounding box is (-1, 
-1, -1)
x (1, 1, 1), but after I select the cone and make it a convex hull, the 
bounding box
becomes (0, 0, 0) x (0, 0, 0) ???

Cheers, 

Taz

Original comment by tasi...@gmail.com on 13 Jan 2010 at 10:38

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi,  I just gave the maya plugin for  
Latest Build  bullet-2.76-alpha-r1925

a test compile,  got it compiled, 

had to add the serializer libraries to the lib paths in the makefile 

Still gives the same problem with  the weirdly expanding  convex hull and  geom 
mesh
type rigid body objects. 

just FYI 

-johnc 
LumaPictures
redpawFX

Original comment by redpa...@gmail.com on 28 Jan 2010 at 8:21

GoogleCodeExporter commented 9 years ago
it was a scaling issue in the btCompoundShape (used to orient Hull objects 
along the 
principal axis of inertia).

Please check latest trunk,it should be fixed.

Thanks for the reports!

Original comment by erwin.coumans on 29 Jan 2010 at 6:34

GoogleCodeExporter commented 9 years ago
With r1933, trying to build on OS X 10.6.1, Maya 2010,  gives this error:

constraint/hingeConstraintNode.cpp: In member function ‘virtual void 
hingeConstraintNode::draw(M3dView&, const MDagPath&, M3dView::DisplayStyle, 
M3dView::DisplayStatus)’:
constraint/hingeConstraintNode.cpp:344: error: no matching function for call to 
‘hinge_constraint_t::worldFromB(vec3f, vec3f&)’
./constraint/hinge_constraint.h:69: note: candidates are: void 
hinge_constraint_t::worldFromB(vec3f&, vec3f&) const
constraint/hingeConstraintNode.cpp:373: error: no matching function for call to 
‘hinge_constraint_t::worldFromB(vec3f, vec3f&)’
./constraint/hinge_constraint.h:69: note: candidates are: void 
hinge_constraint_t::worldFromB(vec3f&, vec3f&) const
constraint/hingeConstraintNode.cpp:375: error: no matching function for call to 
‘hinge_constraint_t::worldFromB(vec3f, vec3f&)’
./constraint/hinge_constraint.h:69: note: candidates are: void 
hinge_constraint_t::worldFromB(vec3f&, vec3f&) const
constraint/hingeConstraintNode.cpp:379: error: no matching function for call to 
‘hinge_constraint_t::worldFromB(vec3f, vec3f&)’
./constraint/hinge_constraint.h:69: note: candidates are: void 
hinge_constraint_t::worldFromB(vec3f&, vec3f&) const
constraint/hingeConstraintNode.cpp:381: error: no matching function for call to 
‘hinge_constraint_t::worldFromB(vec3f, vec3f&)’
./constraint/hinge_constraint.h:69: note: candidates are: void 
hinge_constraint_t::worldFromB(vec3f&, vec3f&) const
constraint/hingeConstraintNode.cpp:385: error: no matching function for call to 
‘hinge_constraint_t::worldFromB(vec3f, vec3f&)’
./constraint/hinge_constraint.h:69: note: candidates are: void 
hinge_constraint_t::worldFromB(vec3f&, vec3f&) const
constraint/hingeConstraintNode.cpp:387: error: no matching function for call to 
‘hinge_constraint_t::worldFromB(vec3f, vec3f&)’
./constraint/hinge_constraint.h:69: note: candidates are: void 
hinge_constraint_t::worldFromB(vec3f&, vec3f&) const

Original comment by cryda...@gmail.com on 30 Jan 2010 at 7:12

GoogleCodeExporter commented 9 years ago
@crydalch

It is fixed in the latest SVN trunk revision 1942, thanks for the report!

Original comment by erwin.coumans on 31 Jan 2010 at 4:47

GoogleCodeExporter commented 9 years ago

By the way, compiling on Mac and Linux is difficult. We should provide cmake 
support (and possibly autotools).

(now that Jam support has been dropped from Bullet the libraries are not in the 
right location)

Original comment by erwin.coumans on 31 Jan 2010 at 4:59

GoogleCodeExporter commented 9 years ago
Basic cmake support to build the Maya plugin is now added, only tested for 
Windows.
Maya detection is very basic, we might need to use a FindMaya script, like 
attached 
(from RubyMel project)

Original comment by erwin.coumans on 31 Jan 2010 at 7:27

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for patching the hingeNode file. I can compile now, but I get a bunch of 
'wrong architecture' errors in the terminal (see below), and when I try to load 
the 
.bundle plugin in maya.

(terminal errors)
ld: warning: in pluginMain.o, file is not of required architecture
ld: warning: in rigidBodyNode.o, file is not of required architecture
ld: warning: in rigidBodyArrayNode.o, file is not of required architecture
ld: warning: in collisionShapeNode.o, file is not of required architecture
ld: warning: in solver.o, file is not of required architecture
ld: warning: in bt_solver.o, file is not of required architecture
ld: warning: in dSolverNode.o, file is not of required architecture
ld: warning: in dSolverCmd.o, file is not of required architecture
ld: warning: in dRigidBodyCmd.o, file is not of required architecture
ld: warning: in dRigidBodyArrayCmd.o, file is not of required architecture
ld: warning: in pdbIO.o, file is not of required architecture
ld: warning: in drawUtils.o, file is not of required architecture
ld: warning: in ./constraint/dHingeConstraintCmd.o, file is not of required 
architecture
ld: warning: in ./constraint/dSliderConstraintCmd.o, file is not of required 
architecture
ld: warning: in ./constraint/hingeConstraintNode.o, file is not of required 
architecture
ld: warning: in ./constraint/sixdofConstraintNode.o, file is not of required 
architecture
ld: warning: in ./constraint/dNailConstraintCmd.o, file is not of required 
architecture
ld: warning: in ./constraint/dsixdofConstraintCmd.o, file is not of required 
architecture
ld: warning: in ./constraint/nailConstraintNode.o, file is not of required 
architecture
ld: warning: in ./constraint/sliderConstraintNode.o, file is not of required 
architecture
ld: warning: in 
/Applications/Autodesk/maya2010/Maya.app/Contents/MacOS/libOpenMaya.dylib, 
file is not of required architecture
ld: warning: in 
/Applications/Autodesk/maya2010/Maya.app/Contents/MacOS/libFoundation.dylib, 
file is not of required architecture
ld: warning: in 
/Applications/Autodesk/maya2010/Maya.app/Contents/MacOS/libOpenMayaUI.dylib
, file is not of required architecture
ld: warning: in 
/Applications/Autodesk/maya2010/Maya.app/Contents/MacOS/libOpenMayaFX.dylib
, file is not of required architecture

I've been using cmake to generate makefiles to build both bullet and dynamica. 
To 
get dynamica to build, I modified my Makefile.mac to the one I've attached. Is 
there 
something I'm missing, that's making these files for the wrong architecture?

Original comment by cryda...@gmail.com on 1 Feb 2010 at 1:13

Attachments:

GoogleCodeExporter commented 9 years ago
Xcode 2.4.1 refuses to install on Snow Leopard. I don't have access to a 
computer with 
both Maya 2010 and 10.4 or 10.5, so I can't build dynamica for Maya 2010. 
Anyone 
with Xcode 2.4.1 and Maya 2010 interested in doing the build?

Original comment by cryda...@gmail.com on 2 Feb 2010 at 2:20

GoogleCodeExporter commented 9 years ago
Hey Erwin, firstly thanks for the updates.. its working great now. 

Secondly   I'm no expert in cmake at all..  so I still wasn't able to get the  
cmake
stuff for the maya plugin to work properly.  
For you to analyze and anybody else  who wants to get this working on linux.   I
submit my  compiling process.. 

add in the following to the CMakeLists.txt file  in the Extras folder 

Serialize ConvexDecomposition GIMPACTUtils glui iff  LibXML 

then you can,  

cmake -DBUILD_SHARED_LIBS=ON -DBUILD_EXTRAS=ON 
      -DCMAKE_INSTALL_PREFIX=/PATH/To/currentBulletDir/out
make 
make install

will put things in the "out" directory  you have to make in the  current
 bullet folder

there are a few things missing in the  out/lib folder.. 

need to link in all the  "extras"  out directories  stuff

ln -s ../../Extras/Serialize/BulletFileLoader/libBulletFileLoader.so 
libBulletFileLoader.so
ln -s ../../Extras/Serialize/BulletWorldImporter/libBulletWorldImporter.so
libBulletWorldImporter.so
ln -s ../../Extras/GIMPACTUtils/libGIMPACTUtils.so libGIMPACTUtils.so
ln -s ../../Extras/LibXML/libXML.so libXML.so

update make file  (attached)  

and 'make' in  the  mayaPlugin directory  (not using cmake) 

update the mel files if need be as well. 

Then when you want to run  the  plugin  
you need to  add the path to the  $BULLET/out/lib    dir to  LD_LIBRARY_PATH

should be good. 
hope this helps us all sort out the linux side of things.. 

-j

Original comment by redpa...@gmail.com on 3 Feb 2010 at 1:29

Attachments:

GoogleCodeExporter commented 9 years ago
Hi redpawfx,

have you tried the latest Makefile in Extras/Mayaplugin on Linux?

I added all files from Bullet directly, so no need to link against Bullet 
libraries.
Does it work?

A 64bit precompiled Linux Dynamica Plugin binary would be welcome!

Thanks,
Erwin

Original comment by erwin.coumans on 3 Feb 2010 at 5:52

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hey Erwin, I'll have to try to grab the latest and greatest  SVN version.  My 
latest
sucess was with the  1945  version that  was put online yesterday. 

the makefile in that seemed to still be missing a few things 
and included the collada stuff which it seems is not necessarry any more.

as soon as I can get a real svn  repo set up on my side  so I can update things
properly from  google code,  I'll give it a shot again. 

attached is the  binary  .so built  from  the 1945 version.
Maya 2009 Linux 64 bit (we don't have 2010, sorry)  

glad I can help :-) 
-johnc. 

Original comment by redpa...@gmail.com on 3 Feb 2010 at 5:23

Attachments:

GoogleCodeExporter commented 9 years ago

Can you provide an updated Makefile based on latest SVN, so without Bullet 
libraries?

Thanks for the .so!

Original comment by erwin.coumans on 3 Feb 2010 at 7:39

GoogleCodeExporter commented 9 years ago

redpawfx, should your "bulletPhysics.so " work with all 64 bit linux 
distributions that 
run Maya 2009, or only Fedora 8?

Or are there certain version requirements (glibc etc)?

Original comment by erwin.coumans on 3 Feb 2010 at 7:41

GoogleCodeExporter commented 9 years ago
Hey Erwin,  we are using  Maya 2009 x64 on Fedora 10,  which should be backward
compatible with any version of fedora, running  64 bit maya 2009, yes.  

For Linux plugins  you have to compile with the same version of gcc that maya is
compiled against.   which for 2009, is gcc 4.1.2. 

I don't have any experience compiling on anything other than redhat linux
(including: fedora, centos, Enterprise)   but  as far as I know things should 
work ok
across any modern redhat product and maybe  even other linuxes.  

It may take a couple days to get the latest svn  version working, but I'll give 
it a
shot asap. 

-johnc 

Original comment by redpa...@gmail.com on 3 Feb 2010 at 8:22

GoogleCodeExporter commented 9 years ago
Hey Erwin,  just grabbed the latest from the  site  r1963 and  tried a default  
cmake
compile  

cmake -DBUILD_SHARED_LIBS=ON -DBUILD_EXTRAS=ON
-DCMAKE_INSTALL_PREFIX=/home/johnc/dev/bullet/bullet-2.76-beta-r1963/out
-DUSE_GLUT=ON -DBUILD_BULLET_MAYA_DYNAMICA_PLUGIN=ON

make...

I'm getting this error.  

In file included from 
/usr/autodesk/maya2008-x64/include/maya/MPxLocatorNode.h:70,
                 from
/Volumes/home/johnc/dev/bullet/bullet-2.76-beta-r1963/Extras/MayaPlugin/rigidBod
yNode.h:33,
                 from
/Volumes/home/johnc/dev/bullet/bullet-2.76-beta-r1963/Extras/MayaPlugin/pluginMa
in.cpp:33:
/usr/autodesk/maya2008-x64/include/maya/M3dView.h:103:2: error: #error Unknown 
OS
/usr/autodesk/maya2008-x64/include/maya/M3dView.h:132:2: error: #error Unknown 
OS
/usr/autodesk/maya2008-x64/include/maya/M3dView.h:322:2: error: #error Unknown 
OS
.... (more  stuff errors after this fails) 

In the make file there is some  hard coded  stuff to set the paths to  maya2008 
and
windows paths etc..  I think it would work better if this was  set to   the
environment variable $(MAYA_LOCATION),  

Secondly  the unknown OS error  I think is being  caused by  the lack of a  
-DLINUX 
in the  makefile.   the maya source looks for  the OS type to deal with the 
open GL
stuff in the M3dView file 

Maybe there is  a way to pass this to  cmake?  or does this have to go into the 
cmake
config file for the  maya plugin? 

anyway,  I'll keep screwing around with it a bit to see   if there's anything 
else I
can do/break :-) 

-johnc.

Original comment by redpaw...@gmail.com on 4 Feb 2010 at 6:06

GoogleCodeExporter commented 9 years ago
AH, ok here we go.  

updated the CMakeLists.txt file in the MayaPlugin directory like so.. 

changed these lines to:

SET(MAYA_INC_DIR /usr/autodesk/maya2009-x64/include/)
SET(MAYA_LIB_DIR /usr/autodesk/maya2009-x64/lib/)

commented out all the FIND_PATH stuff above it. 

Then all I added was  one more  line:

ADD_DEFINITIONS(-DLINUX)

and it seemed to be all happy.  

there  must be a smarter way to use  an environment variable instead of putting 
the
direct path to maya  into the include directories  but  I tried, and it didn't 
work..
I don't understand cmake well enough to know how to change it tho. 

Otherwise I think this works  perfectly  all within the cmake framework now with
these two simple changes 

Awesome! 
-johnc

Original comment by redpa...@gmail.com on 4 Feb 2010 at 6:43

GoogleCodeExporter commented 9 years ago

redpawfx,thanks for the feedback.

With a bit of luck the latest trunk builds on Linux (definition and directory 
added)

Can you try it?

Original comment by erwin.coumans on 16 Feb 2010 at 4:33

GoogleCodeExporter commented 9 years ago
The dynamica plugin is moved to its own repository:

http://dynamica.googlecode.com

CMake support works for Windows (visual studio project files) and Linux (Unix 
Makefiles).

Original comment by erwin.coumans on 22 Apr 2010 at 7:12