Search found 24 matches

by z8000
Sun Aug 24, 2008 6:53 am
Forum: Applications, Games, Demos or Movies using Bullet
Topic: *beginners* - Boiled Down 'HelloWorld' demo with OpenGL
Replies: 16
Views: 30710

Re: *beginners* - Boiled Down 'HelloWorld' demo with OpenGL

abaraba wrote: comes with even more memory leaks,
What a great feature! ;-)

Cheers
by z8000
Fri Aug 22, 2008 6:28 pm
Forum: Applications, Games, Demos or Movies using Bullet
Topic: *beginners* - Boiled Down 'HelloWorld' demo with OpenGL
Replies: 16
Views: 30710

Re: *beginners* - Boiled Down 'HelloWorld' demo with OpenGL

When you do not retain a pointer to a dynamically allocated object, and pass that object off to some other object or function that does not claim ownership of the dynamically allocated object, you have a memory leak. Yes, this was a trivial example and yes, the OS will reclaim the memory on exit. Ho...
by z8000
Thu Aug 21, 2008 5:48 pm
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Re: Using meters vs centimeters causes tunneling and stuck objs

Maybe ... I don't want to have to scale anything up but if I have to it's good to understand the repercussions. I am still evaluating using Bullet for a pool game. I am not too sure yet how use different friction values for the playing area - ball contacts and ball - ball contacts, etc.
by z8000
Thu Aug 21, 2008 4:40 pm
Forum: General Bullet Physics Support and Feedback
Topic: Scaling strategies.
Replies: 3
Views: 4259

Re: Scaling strategies.

What was the resolution here? Man, I read so many threads that catch my interest that go nowhere! :)
by z8000
Thu Aug 21, 2008 4:11 pm
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Re: Using meters vs centimeters causes tunneling and stuck objs

To summarize what I've learned thus far: - Bullet does not work well with small bodies where "small" is < ~ 0.15 units - To compensate for this, you can upscale bodies. However, this of course requires you to upscale forces (e.g. gravity), impulses, and torques. - E.g. if you upscale meter...
by z8000
Thu Aug 21, 2008 4:01 pm
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Re: Using meters vs centimeters causes tunneling and stuck objs

There is currently a bug with linear/angular damping I applied the patch from that issue report. Now things look quite close to each other. I applied the same linear and angular velocity in the m and cm versions. Here are the movies before patching applyDamping: http://brianhammond.com/mov/cm.mov h...
by z8000
Thu Aug 21, 2008 3:22 pm
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Re: Using meters vs centimeters causes tunneling and stuck objs

Ah, excellent. Yes, that makes the cm and m versions behave identically, as long as there's no linear or angular damping applied. Updated the movies.
by z8000
Thu Aug 21, 2008 1:06 pm
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Re: Using meters vs centimeters causes tunneling and stuck objs

damping is the proportion of velocity lost in 1 second so shouldn't need upscaling i think you need to increase the torque with the size because the intertia increases. Makes sense. But, I tried that. I scaled the torque vector by 100 in the cm case. Still, different behavior as seen in the videos.
by z8000
Thu Aug 21, 2008 6:34 am
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Re: Using meters vs centimeters causes tunneling and stuck objs

So the cm version and the m version are different because of damping. I don't fully comprehend how to control linear/angular damping to be equivalent given upscaling however.
by z8000
Thu Aug 21, 2008 4:01 am
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Re: Using meters vs centimeters causes tunneling and stuck objs

sparkprime wrote:the centimetre one seems to be ok...
What do you mean by "ok"? Any idea why they'd be different?
by z8000
Thu Aug 21, 2008 3:36 am
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Re: Using meters vs centimeters causes tunneling and stuck objs

Well I tried upscaling to cm from m. It acts weirdly. http://brianhammond.com/mov/m.mov http://brianhammond.com/mov/cm.mov float ballDiameter = 0.0572; // m #ifdef USE_METERS float ballRadius = ballDiameter/2.f; // m float boxExtent = 0.5; // m float ballMass = 0.260; // kg btVector3 g(0, -9.81, 0);...
by z8000
Thu Aug 21, 2008 1:38 am
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Re: Using meters vs centimeters causes tunneling and stuck objs

I thought I read somewhere [EDIT: yes, see below] that if you do upscale you also need to upscale your object's mass. For a sphere I read that the mass should be upscaled by the cube, not linearly. So if I use centimeters instead of meters I'd upscale radius by a factor of 100 but would need to also...
by z8000
Thu Aug 21, 2008 1:09 am
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Re: Using meters vs centimeters causes tunneling and stuck objs

Collecting some relevant links here as it seems I'm not the only one experiencing this small-scale issue. http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2469 http://code.google.com/p/bullet/issues/detail?id=45 http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=109...
by z8000
Wed Aug 20, 2008 9:05 pm
Forum: General Bullet Physics Support and Feedback
Topic: Using meters vs centimeters causes tunneling and stuck objs
Replies: 17
Views: 16549

Using meters vs centimeters causes tunneling and stuck objs

I'm experimenting with Bullet. I'm interested in modeling billiard balls and related things. I decided to create a bare-bones GLUT app that does some simple simulation to experiment with friction between the balls, balls and table, balls and cushion, etc. In my first attempt, I decided to use realis...
by z8000
Wed Aug 20, 2008 4:16 pm
Forum: Applications, Games, Demos or Movies using Bullet
Topic: *beginners* - Boiled Down 'HelloWorld' demo with OpenGL
Replies: 16
Views: 30710

Re: *beginners* - Boiled Down 'HelloWorld' demo with OpenGL

Note that this example leaks memory. You are reusing the same symbols, 'shape' and 'motionState', to refer to two different dynamically allocated objects. You need to use 2 shapes, and 2 motion states. Then at cleanup time, delete all 4. I think the rule with Bullet with respect to memory is "i...