Jump to content

Releases


Jason

Recommended Posts

  • Replies 80
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Guest xionmark

my MSVCDir variable:

C:\PROGRA~1\MICROS~2.NET\Vc7

Relevants excerpts from my path env var:

C:\Program Files\Micros~2.NET\Vc7\bin;C:\cygwin\bin\

That's all I've ever needed to compile on windows. Vc8 can't be all that different can it?

Mark

Link to comment
Share on other sites

  • 2 weeks later...

I almost have everything setup and working for the bullet plug-in. I have two problems/questions that I hope someone can answer.

one- based on the open-source bullet physics RBD solver DOP setup

once you download Sim Solver Bullet I have the 0.11 you change the path.

I then open the houdini command line tool-> csh-> and paste that line in and run it

when compiling the dso that I will have to move I get the error.

LINK : fatal error LNK1181: cannot open input file 'LibBulletDynamics.obj'

I've done a search on my computer and I don't have that file. Then line that I paste in

is the following which is specific to my computer.

hcustom -g -i . -I C:/PROGRA~1/bullet-2.73/src -l LibBulletDynamics -l LibBulletCollision -l LibLinearMath -L C:/PROGRA~1/bullet-2.73/src/BulletDynamics/ -L C:/PROGRA~1/bullet-2.73/src/BulletCollision/ -L C:/PROGRA~1/bullet-2.73/src/LinearMath/ C:/PROGRA~1/SIM_SolverBullet-0.11/src/SIM_SolverBullet.cpp

two: Back at getting the HDK working I have it working and I was able to compile the example

SOP_Star which created a .o and a .dll. The .dll is found in the dso folder for houdini.

When I open houdini create an object and dive inside I should be able to create a Star

SOP but I don't have it as any option.

Any advice why would be helpful I think I'll need to know to get bullet working.

Thanks-

Link to comment
Share on other sites

I almost have everything setup and working for the bullet plug-in. I have two problems/questions that I hope someone can answer.

one- based on the open-source bullet physics RBD solver DOP setup

once you download Sim Solver Bullet I have the 0.11 you change the path.

I then open the houdini command line tool-> csh-> and paste that line in and run it

when compiling the dso that I will have to move I get the error.

LINK : fatal error LNK1181: cannot open input file 'LibBulletDynamics.obj'

I've done a search on my computer and I don't have that file. Then line that I paste in

is the following which is specific to my computer.

hcustom -g -i . -I C:/PROGRA~1/bullet-2.73/src -l LibBulletDynamics -l LibBulletCollision -l LibLinearMath -L C:/PROGRA~1/bullet-2.73/src/BulletDynamics/ -L C:/PROGRA~1/bullet-2.73/src/BulletCollision/ -L C:/PROGRA~1/bullet-2.73/src/LinearMath/ C:/PROGRA~1/SIM_SolverBullet-0.11/src/SIM_SolverBullet.cpp

From what I encountered, this is basically looking for the location of your compiled libraries that you made, the sort of way I got around it was giving it the specific file name with the extension to what it's looking for, so for LibBulletDynamics, I gave it, libulletdynamics.lib.

It should compile this way, tho I got some errors on another area which I've been fishing out.

Hope this helps!

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

may be it is useful to replace this code:

at line 196:

				            // Get the Bullet transform and update the DOPs subdata with it.
				            (bodyIt->second.bodyId)->getMotionState()->getWorldTransform(btrans);
				            // position
				            UT_Vector3 p = UT_Vector3(
					            btrans.getOrigin().getX(), btrans.getOrigin().getY(), btrans.getOrigin().getZ() );
				            rbdstate->setPosition( p );
				            // rotation    		
				            UT_Quaternion rot = UT_Quaternion( btrans.getRotation().getX(), btrans.getRotation().getY(),
					            btrans.getRotation().getZ(), btrans.getRotation().getW() );
				            rbdstate->setOrientation( rot );

				            // Calculate mass and inertia
				            btScalar mass = 1.0f;
				            if( currObject->getIsStatic() )
					            mass = 0;
				            else
				            {
					            mass = rbdstate->getMass();
					            //btVector3 fallInertia(0,0,0);
					            //(bodyIt->second.bodyId)->getCollisionShape()->calculateLocalInertia(mass,fallInertia);
					            //cerr<<"setting mass:"<<mass<<endl;
				            }

				if( !(bodyIt->second.bodyId)->isStaticObject() && (bodyIt->second.bodyId)->isActive() == 1 ) // if not tagged as Static
				{
					//Velocity
					btVector3 v;
					v = (bodyIt->second.bodyId)->getLinearVelocity(); 
					rbdstate->setVelocity( UT_Vector3( v.getX(), v.getY(), v.getZ() ) );
					//Angular Velocity
					btVector3 w;
					w = (bodyIt->second.bodyId)->getAngularVelocity(); 
					rbdstate->setAngularVelocity( UT_Vector3( w.getX(), w.getY(), w.getZ() ) );
				}
			}	

by this:

				if( !(bodyIt->second.bodyId)->isStaticObject() && (bodyIt->second.bodyId)->isActive() == 1 ) // if not tagged as Static
				{
				            // Get the Bullet transform and update the DOPs subdata with it.
				            (bodyIt->second.bodyId)->getMotionState()->getWorldTransform(btrans);
				            // position
				            UT_Vector3 p = UT_Vector3(
					            btrans.getOrigin().getX(), btrans.getOrigin().getY(), btrans.getOrigin().getZ() );
				            rbdstate->setPosition( p );
				            // rotation    		
				            UT_Quaternion rot = UT_Quaternion( btrans.getRotation().getX(), btrans.getRotation().getY(),
					            btrans.getRotation().getZ(), btrans.getRotation().getW() );
				            rbdstate->setOrientation( rot );

				            // Calculate mass and inertia
				            btScalar mass = 1.0f;
				            if( currObject->getIsStatic() )
					            mass = 0;
				            else
				            {
					            mass = rbdstate->getMass();
					            //btVector3 fallInertia(0,0,0);
					            //(bodyIt->second.bodyId)->getCollisionShape()->calculateLocalInertia(mass,fallInertia);
					            //cerr<<"setting mass:"<<mass<<endl;
				            }

//				if( !(bodyIt->second.bodyId)->isStaticObject() && (bodyIt->second.bodyId)->isActive() == 1 ) // if not tagged as Static
//				{
					//Velocity
					btVector3 v;
					v = (bodyIt->second.bodyId)->getLinearVelocity(); 
					rbdstate->setVelocity( UT_Vector3( v.getX(), v.getY(), v.getZ() ) );
					//Angular Velocity
					btVector3 w;
					w = (bodyIt->second.bodyId)->getAngularVelocity(); 
					rbdstate->setAngularVelocity( UT_Vector3( w.getX(), w.getY(), w.getZ() ) );
				}
			}	

because bullet solver change position and orient of objects outside group for solvers group

without this is hard to freeze some objects. may be error was in other, but correct results was with this edit.

this is example of effect that i make with this edit of source:

sorry my english

Edited by almatea
Link to comment
Share on other sites

i find a better solution than in previous message from me. i delete all my changes in source code.

to get static object need to change mass of object to 0. but solver check mass only for new object, then if you change mass in middle of simulation zero-mass object not will be a static. it is need to build new object instead old - with new objid. it possible with copy objects in dop and delete old objects - so solver get a new objects with zero mass ant it is now true static objects. and so this static state can be animate.

Edited by almatea
Link to comment
Share on other sites

thanks for link

if exist a simple way to use parallelism in this solver i shall try use it

=======

a test with bullet solver, over 1000 pieces, about 1 sec for frame in begin of simulation and faster to end with freeze:

it is many time (20-30 sec) for load fractures from sop to dop with fractured object dop - but it is 1 operation only once in begin of simulation

Edited by almatea
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Ahlo, whenever I try to compile I get this:

phuziun@xin9300:~/Desktop/SIM_SolverBullet-0.1/src$ ./compile_example.sh
Making debug version
Install directory = '.'
Linking with 'libLibBulletDynamics'
Linking with 'libLibBulletCollision'
Linking with 'libLibLinearMath'
Making SIM_SolverBullet.o and ./SIM_SolverBullet.so from SIM_SolverBullet.cpp
In file included from SIM_SolverBullet.cpp:9:
../../bullet-current/src/BulletCollision/Gimpact/btGImpactShape.h: In copy constructor ‘btGImpactCompoundShape::CompoundPrimitiveManager::CompoundPrimitiveManager(const btGImpactCompoundShape::CompoundPrimitiveManager&)’:
../../bullet-current/src/BulletCollision/Gimpact/btGImpactShape.h:309: warning: base class ‘class btPrimitiveManagerBase’ should be explicitly initialized in the copy constructor
../../bullet-current/src/BulletCollision/Gimpact/btGImpactShape.h: In copy constructor ‘btGImpactMeshShapePart::TrimeshPrimitiveManager::TrimeshPrimitiveManager(const btGImpactMeshShapePart::TrimeshPrimitiveManager&)’:
../../bullet-current/src/BulletCollision/Gimpact/btGImpactShape.h:553: warning: base class ‘class btPrimitiveManagerBase’ should be explicitly initialized in the copy constructor
In file included from SIM_SolverBullet.cpp:43:
SIM_SolverBullet.h: At global scope:
SIM_SolverBullet.h:144: error: extra qualification ‘SIM_SolverBullet::’ on member ‘addBulletBody’
SIM_SolverBullet.h:145: error: extra qualification ‘SIM_SolverBullet::’ on member ‘removeDeadBodies’
SIM_SolverBullet.h:146: error: extra qualification ‘SIM_SolverBullet::’ on member ‘processSubData’
SIM_SolverBullet.cpp: In member function ‘virtual SIM_Solver::SIM_Result SIM_SolverBullet::solveObjectsSubclass(SIM_Engine&, SIM_ObjectArray&, SIM_ObjectArray&, SIM_ObjectArray&, const SIM_Time&)’:
SIM_SolverBullet.cpp:135: warning: unused variable ‘bulletstate’
SIM_SolverBullet.cpp:174: warning: unused variable ‘bulletstate’
SIM_SolverBullet.cpp: In member function ‘virtual std::_Rb_tree_iterator<std::pair<const int, bulletBodystr> > SIM_SolverBullet::addBulletBody(SIM_Object*)’:
SIM_SolverBullet.cpp:320: error: no matching function for call to ‘btMultiSphereShape::btMultiSphereShape(btVector3&, btVector3*&, btScalar*&, int&)’
../../bullet-current/src/BulletCollision/CollisionShapes/btMultiSphereShape.h:33: note: candidates are: btMultiSphereShape::btMultiSphereShape(const btVector3*, const btScalar*, int)
../../bullet-current/src/BulletCollision/CollisionShapes/btMultiSphereShape.h:27: note: btMultiSphereShape::btMultiSphereShape(const btMultiSphereShape&)
SIM_SolverBullet.cpp:234: warning: unused variable ‘bulletstate’
Compile failed

SIM_SolverBullet.cpp:320: error: no matching function for call to ‘btMultiSphereShape::btMultiSphereShape(btVector3&, btVector3*&, btScalar*&, int&)’

I'm assuming that is the culprit.

I'm running Ubuntu 8.04.1 x86_64.

Any ideas? Thanks a bunch either way!

Edited by David Hale
Link to comment
Share on other sites

SIM_SolverBullet.cpp:320: error: no matching function for call to ‘btMultiSphereShape::btMultiSphereShape(btVector3&, btVector3*&, btScalar*&, int&)’

I'm assuming that is the culprit.

I'm running Ubuntu 8.04.1 x86_64.

Any ideas? Thanks a bunch either way!

I think your assumption is right, the btMultiSphereShape::btMultiSphereShape() interface changed in one of the newer updates. You can get rid of the first btVector3.

Link to comment
Share on other sites

  • 1 month later...

I am on a Mac OSX 10.6 and I don't have the houdini sdk installed because it is not an option on the mac install.

I my be out of luck.

bullet is installed and I have compiled and ran the demos so that seems to be ok. I edited the shell script so it would get as far as it is now

I had an error like that above

In file included from SIM_SolverBullet.cpp:43:
SIM_SolverBullet.h: At global scope:
SIM_SolverBullet.h:151: error: extra qualification 'SIM_SolverBullet::' on member 'addBulletBody'
SIM_SolverBullet.h:152: error: extra qualification 'SIM_SolverBullet::' on member 'removeDeadBodies'
SIM_SolverBullet.h:153: error: extra qualification 'SIM_SolverBullet::' on member 'processSubData'
SIM_SolverBullet.cpp: In member function 'virtual std::_Rb_tree_iterator<std::pair<const int, bulletBodystr> > SIM_SolverBullet::addBulletBody(SIM_Object*)':
SIM_SolverBullet.cpp:380: error: no matching function for call to 'btMultiSphereShape::btMultiSphereShape(btVector3&, btVector3*&, btScalar*&, int&)'
../../bullet-trunk/src/BulletCollision/CollisionShapes/btMultiSphereShape.h:33: note: candidates are: btMultiSphereShape::btMultiSphereShape(const btVector3*, const btScalar*, int)
../../bullet-trunk/src/BulletCollision/CollisionShapes/btMultiSphereShape.h:27: note:                 btMultiSphereShape::btMultiSphereShape(const btMultiSphereShape&)
SIM_SolverBullet.cpp:397: error: call of overloaded 'abs(fpreal)' is ambiguous

so the impression i got from that advice was to edit the SIM_SolverBullet.cpp file and around the line 375 it was like this

fallShape = new btMultiSphereShape(
	inertiaHalfExtents,
	sphereCentres,
	sphereRadii,
	nspheres);

to look like this.

fallShape = new btMultiSphereShape(
	sphereCentres,
	sphereRadii,
	nspheres);

after that my compile output was.

$ ./compile_example.sh 
Making debug version
Install directory = '.'
Linking with 'libLibBulletDynamics'
Linking with 'libLibBulletCollision'
Linking with 'libLibLinearMath'
Making SIM_SolverBullet.o and ./SIM_SolverBullet.dylib from SIM_SolverBullet.cpp
cc1plus: warning: command line option "-fobjc-gc-only" is valid for ObjC/ObjC++ but not for C++
In file included from SIM_SolverBullet.cpp:9:
../../bullet-trunk/src/BulletCollision/Gimpact/btGImpactShape.h: In copy constructor 'btGImpactCompoundShape::CompoundPrimitiveManager::CompoundPrimitiveManager(const btGImpactCompoundShape::CompoundPrimitiveManager&)':
../../bullet-trunk/src/BulletCollision/Gimpact/btGImpactShape.h:309: warning: base class 'class btPrimitiveManagerBase' should be explicitly initialized in the copy constructor
../../bullet-trunk/src/BulletCollision/Gimpact/btGImpactShape.h: In copy constructor 'btGImpactMeshShapePart::TrimeshPrimitiveManager::TrimeshPrimitiveManager(const btGImpactMeshShapePart::TrimeshPrimitiveManager&)':
../../bullet-trunk/src/BulletCollision/Gimpact/btGImpactShape.h:553: warning: base class 'class btPrimitiveManagerBase' should be explicitly initialized in the copy constructor
In file included from SIM_SolverBullet.cpp:43:
SIM_SolverBullet.h: At global scope:
SIM_SolverBullet.h:151: error: extra qualification 'SIM_SolverBullet::' on member 'addBulletBody'
SIM_SolverBullet.h:152: error: extra qualification 'SIM_SolverBullet::' on member 'removeDeadBodies'
SIM_SolverBullet.h:153: error: extra qualification 'SIM_SolverBullet::' on member 'processSubData'
SIM_SolverBullet.cpp: In member function 'virtual std::_Rb_tree_iterator<std::pair<const int, bulletBodystr> > SIM_SolverBullet::addBulletBody(SIM_Object*)':
SIM_SolverBullet.cpp:396: error: call of overloaded 'abs(fpreal)' is ambiguous
/usr/include/stdlib.h:146: note: candidates are: int abs(int)
/usr/include/c++/4.2.1/cstdlib:174: note:                 long long int __gnu_cxx::abs(long long int)
/usr/include/c++/4.2.1/cstdlib:143: note:                 long int std::abs(long int)
SIM_SolverBullet.cpp:411: error: call of overloaded 'abs(fpreal)' is ambiguous
/usr/include/stdlib.h:146: note: candidates are: int abs(int)
/usr/include/c++/4.2.1/cstdlib:174: note:                 long long int __gnu_cxx::abs(long long int)
/usr/include/c++/4.2.1/cstdlib:143: note:                 long int std::abs(long int)
SIM_SolverBullet.cpp:412: error: call of overloaded 'abs(fpreal)' is ambiguous
/usr/include/stdlib.h:146: note: candidates are: int abs(int)
/usr/include/c++/4.2.1/cstdlib:174: note:                 long long int __gnu_cxx::abs(long long int)
/usr/include/c++/4.2.1/cstdlib:143: note:                 long int std::abs(long int)
Compile failed

i am using the Dec 23 trunk of Bullet

I am a bit out of my depth and fear I will have to take the time to understand the code before I can compile it.

Edited by meshsmooth
Link to comment
Share on other sites

I have taken the liberty of moving the Bullet Physics Solver to a repository so that there is a central place for keeping track of code changes and all that.

The source can be obtained from the git repository: http://gitorious.org/bullet-physics-solver/bullet-physics-solver

I have attached the current source to this post. The latest source code compiles against Bullet 2.75 on Linux (tested with Ubuntu 9.04 x64, Houdini 10.0.469 and GCC 4.1.3)

I have also managed to statically link the Bullet libraries into the Bullet Solver. The unresolved references was caused by a problem was in the linking order. The LinearMath library had to be specified at the end.

I have attached my compiled DSO (Houdini 10.0.465 x64) for anyone that wants to try a binary. No need to even install Bullet on your system! Yay! The original sample scene is included in the source. If you have problems, start a new thread.

If there are any contributions out there, feel free to throw them this way so that we can get it into the repository.

I think that's about it. I'll amend here if there is anything that I forgot.

CheerZ,

Van Aarde.

bullet-physics-solver-0.12.tar.gz

bullet_solver_dso-0.12.tar.gz

Edited by nanocell
Link to comment
Share on other sites

  • 4 weeks later...

I've managed to add support for pin and hinge but I'm having a problem updating the fractured/glue objects. It seems the parent object is always affecting the children. Does anyone have any thoughts on this?

Cheers,

Ron

Link to comment
Share on other sites

  • 2 weeks later...

uh....for those of us not in the know of any programming beyond a little python (i.e. myself :lol: ) could anybody explain me how to install the latest distro nanocell posted above?

By the way, will it work in Win64 platform or is it just Linux?

EDIT: ok, I found another thread below where the dll was posted. Nevermind :)

Edited by Netvudu
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...