Page 1 of 2
Bugs (Applies to 2.42 preview27)
Posted: Mon Nov 07, 2005 8:39 pm
by goldentaiji
On your suggestion Erwin I moved the things over here.
1. Cannot set postion of constrainted objects (using owner.setPosition() ). Not sure if it's a bug, but that option would really be nice.
2. Motion Actuator (clicking "add" is supposed to add the motion to the current motion). Does not function properly when using LinearVelocity. Add and no Add has no difference.
3. Child objects parented to an object in layers other than 1, when added using Add Object, only the parent object is added while the children are not. Children would be added along with parent in sumo.
Was making something like Armadillo run and then I came upon this bug. I need it to work so that I can place the ojbects and then initialize the constraints. Because you cannot set the position of an object that has a constraint. Also because one would not want dynamic objects to be interacting or moving around say if placing the object went through it or over it.
Jason Lin
Posted: Fri Nov 11, 2005 5:32 am
by Erwin Coumans
Some of the issues on the list should be fixed now, please try out this new binary (win32):
http://www.continuousphysics.com/ftp/pu ... sensor.zip
erwin (Erwin Coumans) 2005/11/11 06:02:14 CET
Modified files:
blender/source/blender/src buttons_shading.c
blender/source/gameengine/Ketsji KX_RaySensor.cpp
blender/source/gameengine/Physics/Bullet
CcdPhysicsController.cpp
Log:
fixed raysensor, hooked up a few more bullet method: force, torque etc, + 'local'. cosmetic change in physics-engine menu.
Posted: Fri Nov 11, 2005 9:02 am
by thinkofwhy
Erwin Coumans wrote:Some of the issues on the list should be fixed now, please try out this new binary (win32):
http://www.continuousphysics.com/ftp/pu ... sensor.zip
erwin (Erwin Coumans) 2005/11/11 06:02:14 CET
Modified files:
blender/source/blender/src buttons_shading.c
blender/source/gameengine/Ketsji KX_RaySensor.cpp
blender/source/gameengine/Physics/Bullet
CcdPhysicsController.cpp
Log:
fixed raysensor, hooked up a few more bullet method: force, torque etc, + 'local'. cosmetic change in physics-engine menu.

Erwin, you must be reading my mind

. Your point2point blend demo illustrates the kind of constraint I was trying to figure out. Except I wanted to pivot on an edge. But two point pivots should do the same.
And your raysensor impulse action in the jenga7 blend demo just might work in place of the still non-functioning Force/Torque functions of the Motion Actuator

. In fact, for my purposes, your p2p and impulse techniques just might be better than Force/Torque, since they enable control of the exact point and direction of the impulse and pivot locations. I'm trying to tip objects over on an edge, and maintain precise positioning, like polyhedronal pieces on a game board grid.
And I also noticed that interacting objects don't make complete contact. There's a small gap between them. I added material and tried setting fh Dist = 0, but it didn't help. Curious.

Posted: Sat Nov 12, 2005 3:53 pm
by pildanovak
has anybody tested this demo I made for p2p constraints?
http://www.ffa.vutbr.cz/~novak/dwnflz/p2p2.blend
It showed some weird things with the freezing.
EDIT:
I tested with the new version - there's a network of p2p constraints "getting nervous"(just look at it

)
Also, test with clicking on the balls with mouse, there are strong impulses applied
Posted: Sat Nov 12, 2005 5:14 pm
by Erwin Coumans
Thanks for the cool demo!
There are lots of ways to improve stability in a physics engine, probably a faq would be best.
But in the meanwhile, some notes:
- Object that are in a constraint hierarchy (like connected by point 2 point constraints) can become instable when colliding with neighbours. Consider turning off collision detection, or make the collisionshapes small enough to give some tolerance.
- Object deactivation/sleeping can be controlled:
Code: Select all
#after how many seconds to put objects to sleep
PhysicsConstraints.setDeactivationTime(6)
- Number of iterations influences quality.
Code: Select all
#for all iterative solvers, quality versus performance...
PhysicsConstraints.setNumIterations(20)
- Solver method
Code: Select all
## expirimental
#0 == ode quickstep
#1 == bullet pairwise solver method
#PhysicsConstraints.setSolverType(0)
You can access those tweakable parameters through the PhysicsConstraints module, see this gameblender python script:
http://www.continuousphysics.com/ftp/pu ... tconfig.py
Erwin
Posted: Sat Nov 12, 2005 5:58 pm
by pildanovak
thanks for explaining.
If you like the demo, it can be put to other testing demos.
Posted: Sat Nov 19, 2005 5:25 pm
by goldentaiji

Great work on adding in local motion.
Umm... however, are you sure the ray sensor is fixed? I still can't seem to be able to detect the object with the ray sensor. Did a simple setup, cube1 with property "cube", and another cube2 with ray sensor applied, once it detects the property cube, a property in cube2 would be set to true. Doesn't seem to be working with the new build. Ran the same setup in 2.37a and it detected ok.
Also, the objects seem kinda sticky. For example in my jenga demo I want to apply a motion to a single block say in the middle of the whole stack. When the motion is applied, it brings part of the bottom and all of the top stack down with it. I've tried playing around with the friction settings with no luck, any way to make it so that the block would slide out? Or currently not possible yet.
Update bug list thing on top.
Jason Lin
Posted: Sun Nov 20, 2005 10:29 pm
by fobsta
Pildanovak
Great demo. Have you posted this on Elysiun or Blender.org?
Posted: Mon Nov 21, 2005 4:14 pm
by pildanovak
no, i haven't, I thought about it as an addition to the testing files. maybe I should, but I'm updating my site now, so I'll add it soon there and will post a link to there.
PhysicsConstraints
Posted: Tue Nov 22, 2005 6:02 am
by thinkofwhy
The p2p.blend demo works okay as is, but when I uncommented the line that is supposed to remove the constraint, it generates a type error.

. Can't get it to work.
But hey

, I checked out the Blender CVS and implemented the Force and Torque methods ( two lines of code

). They work fine now, but setPosition() doesn't, and getOrientation() always returns the identity matrix.
Also, I'm puzzled as to why there is no getPosition() method defined in the KX_IPhysicsController.h file. I'm just beginning to get my head around the GameEngine code, and since there is virtually no internal documentation (or external) it's gonna be a while

.
UPDATE:

I fixed the PhysicsConstraints.removeConstraint() implementation. I can now create and remove constraints !!

Turns out the constraint id returned by createConstraint() was coded: return 0;, no wonder it was always zero. So I changed it to: return int(p2p), which will return the p2p pointer cast to an int. Of course, this is in my CVS checkout, so nobody else will enjoy this update

I'll get a patch to you erwin, if you want, but the changes I've made so far are literally only 3 lines of code, which you can easily fix when you get around to it. The other problems, like setPosition() and getOriention(), might take a little longer

Hey, this is fun

.
fixed Position() and Orientation() methods
Posted: Tue Nov 29, 2005 7:55 am
by thinkofwhy

Ok. I fixed the get/setPosition() and get/setOrientation() methods. So far they appear to work properly, but I'm still testing the code. I'll put up a link to the build as soon as testing is complete so you guys can try it out.
Update: Here's the link to my fixed build of Erwin's Bullet Blender 2.4 Alpha build
http://www3.telus.net/BulletBlender/. Enjoy
UPDATE: That links to a flawed build as noted below. However, the fixes I've made to the constraint id and get/setOrientation() seems to be okay.
Posted: Fri Dec 23, 2005 4:17 am
by goldentaiji
Well with the official release of 2.4 I updated the bug list and added 1 more bug I found. Well all that applies to the official build now. thinkofwhy might have fixed some things, and if he did (I haven't checked cause I lost the other build), it should be incorporated into the official build as patches.
Erwin I must say bullet physics is extremely great and I love what it can do. There's just some of those bugs mentioned above that need some fixing. It's hindering games that are just itching to use bullet as the base physics engine.
Jason Lin
another bug
Posted: Sat Dec 24, 2005 6:36 am
by strangeland
Also, objects added with the add object actuator do not have physics applied to them.
My set/getPosition() fixes
Posted: Sat Dec 24, 2005 7:09 pm
by thinkofwhy
Posted: Tue Jan 03, 2006 3:46 am
by goldentaiji
Updated bug list and removed the ones that were fixed after Erwins newest bug fix update.
I've noticed that the getPosition() function that I had implemented in Erwin's build is NOT updated by the realtime physics.
It works properly now in Erwins newest bug fix.
Also, objects added with the add object actuator do not have physics applied to them.
Erwin's newest bug fix also has this fixed.
Jason Lin