Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (532)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3 4 ... 6
  ignore  |  Print  
  Java port of Bullet Physics Library  (Read 100048 times)
0 Members and 1 Guest are viewing this topic.
Offline jezek2
« Reply #30 - Posted 2008-01-27 12:53:43 »

just for a note: the next version of Java3d (and vecmath) will also have GPLv2+CP ex as license (1.5.2). The 1.6 release is planed to be the "big changes" release but I am pretty sure that this release won't happen this year.
1.6 is probably the release with the best chance to get a contribution approved.

Good to hear Smiley
Offline Marcel

Senior Newbie





« Reply #31 - Posted 2008-01-27 13:37:41 »

Hello jezek,

i know Bullet from Blender and it is fantastic to hear that you ported this library to java.
For me it would be very interesting to hear if i could use jBullet also in Jogl.
If this is possible could you please post an example how to realize this.

Anyway, keep on with this good work and thank you for making this public available!

With kind regards
Marcel
Offline jezek2
« Reply #32 - Posted 2008-01-29 01:37:54 »

For me it would be very interesting to hear if i could use jBullet also in Jogl.
If this is possible could you please post an example how to realize this.

JBullet is fully independent of any 3D engine or graphics library/binding. You can use it with JOGL just fine. I don't use JOGL so I have no plan to create any JOGL examples. But as both LWJGL and JOGL are OpenGL bindings, it should be pretty similar.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Marcel

Senior Newbie





« Reply #33 - Posted 2008-01-29 15:14:15 »

That sounds really good.

But maybe you can help me a little bit with an example to start.

If i have constructed a world (extended to 1000 units) with a plane in my OpenGL display method how can i create
gravity for the world and a sphere which is affected by this gravity settings falling on a plane in this world:

(assuming a constant frame rate)

display(GLAutoDrawable drawable){
gl = drawable.getGL();
........
gl.drawSphere();
.....
gl.drawPlane();

}

Any help or a code snippet is really appreciated!
Offline lhkbob

JGO Knight


Medals: 32



« Reply #34 - Posted 2008-01-29 16:07:42 »

I would get the source code since I believe it contains the sources for all of jezek's demos, which should give you an idea on how to set up the physics and run the simulation.  If that doesn't give you what you want, visit the bullet webpage and read bullet's user guide. 

Offline kaffiene
« Reply #35 - Posted 2008-01-31 04:52:28 »

I've just compared the ragdoll demo in the Java port and the original Bullet SDK (v2.66).  The Java version is WAAAY faster.  What gives?
Offline lhkbob

JGO Knight


Medals: 32



« Reply #36 - Posted 2008-01-31 14:44:36 »

I've been looking at both Bullet's and jezek's code fairly heavily and my first guess would be because jezek uses object pools while a lot of the functions for Bullet create unnecessary new objects.

Offline kaffiene
« Reply #37 - Posted 2008-01-31 20:36:43 »

hmmm: I spoke too soon.  I built Bullet on my work computer using Visual Studio 2008 express edition - that's where it ran slowly.  I build it at home using Visual Studio 2005 express edition and that ran much better - a little better than the Java port, particularly under high load.

It might be something about the project conversion to 2008 that stuffed it up?  Who knows  Smiley

At any rate, this port is pretty impressive for only being a few days work so far.  Really looking forward to seeing a website for this project and seeing what we can do with this puppy!

Great work, jezek!
Offline jezek2
« Reply #38 - Posted 2008-02-07 00:06:22 »

New version available on JBullet homepage.

Changes in release 20080206:
- Memory optimalizations
- Added heap info
- Implemented HeapSort
- Added optional support for GNU Trove
- Added BspDemo and fixed ConvexHullShape
- Added ConcaveDemo and it's supporting classes
- Abstracted OpenGL rendering
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11


Game Engineer


« Reply #39 - Posted 2008-02-08 02:41:37 »

Oooh, I may just have to use this. Awesome! Cheesy

See my work:
OTC Software
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline BBjam

Junior Newbie





« Reply #40 - Posted 2008-02-21 21:23:49 »

This is the coolest thing since javax.home.SlicedBread !
I will probably use this in my game (If I ever get around to starting!)
Offline jezek2
« Reply #41 - Posted 2008-03-03 15:12:31 »

New version available on JBullet homepage.

Changes in release 20080303:
- Refactored enums
- Fixed bug that caused occasional jitter
- Added ConvexConcaveCollisionAlgorithm
- Memory optimalizations
- Implemented quantized BVH nodes
- Made ConcaveDemo working
Offline Marcel

Senior Newbie





« Reply #42 - Posted 2008-03-04 16:04:03 »

It took some time for me to understand
the general concepts of Bullet but it works fine
with Jogl, too.


Offline GKW

Senior Member




Revenge is mine!


« Reply #43 - Posted 2008-03-04 18:12:29 »

It would be nice if you would decoupled the lwjgl demos from the bullet library.  Are you working on supporting the multithreaded portion of the library?
Offline jezek2
« Reply #44 - Posted 2008-03-04 21:40:53 »

It would be nice if you would decoupled the lwjgl demos from the bullet library.

I will enhance the package by generating multiple JARs and actually include them in distribution package.

Are you working on supporting the multithreaded portion of the library?

No, and it's low priority for me, at least for now. The ongoing work from my side is towards complete support of base features and synchronizing with newer releases of Bullet.
Offline jezek2
« Reply #45 - Posted 2008-03-08 12:20:31 »

I've created applet version of JBullet demos that uses software rendering.

You can see it in action here:
http://jbullet.advel.cz/applet
Offline CommanderKeith
« Reply #46 - Posted 2008-03-08 12:43:59 »

Really great work, the vehicle demo is excellent. How did you do 3d in software? Did you use jpct?

It would be cool if you showed performance by displaying the FPS.

Offline jezek2
« Reply #47 - Posted 2008-03-08 13:10:57 »

Really great work, the vehicle demo is excellent. How did you do 3d in software? Did you use jpct?

Thanks Smiley I've created my own OpenGL-like software renderer. I've found jPCT unusable for that task, because it doesn't use the same projection and lighting as OpenGL, and the rasterizer alone is not publicly available (documented) through API, also I couldn't extract it as it's not opensource library.

It would be cool if you showed performance by displaying the FPS.

I will add it.
Offline jezek2
« Reply #48 - Posted 2008-03-11 12:38:07 »

New version available on JBullet homepage.

Changes in release 20080311:
- Added some JavaDoc documentation
- Added RaycastVehicle and VehicleDemo
- Refactored accessing of vertex data
- Added CylinderShape
- Implemented ray/trimesh hit detection
- Added applet demo
- Added binaries and dependant libraries into package
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #49 - Posted 2008-03-11 16:20:30 »

May I ask how far are you long in having a full port of Bullet?

DP Smiley

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline jezek2
« Reply #50 - Posted 2008-03-11 17:26:55 »

May I ask how far are you long in having a full port of Bullet?

About base features, not that much, most visible missing things are:
AxisSweep3 (much better broadphase collision detection), moving trimeshes, some misc. shapes, ContinuousDynamicsWorld.

I'll leave extras (like multithreaded version, COLLADA support, etc.) to others to develop if someone wants them. It's simply not priority for me.
Offline LvR

Senior Newbie





« Reply #51 - Posted 2008-03-12 08:33:25 »

Hi

I've just register to JGO because I'm searching a physic library in java and I've discover your porting effort.
I've played a bit with JBullet, and you have done a very good work so far.

Your last post answer partially my current question : have you a comparison between Bullet and JBullet for features ported or not ?

For my project I'll need motors, so I think I'll port DynamicControlDemo if you have not started with it ?

Offline jezek2
« Reply #52 - Posted 2008-03-12 08:49:45 »

Hi

I've just register to JGO because I'm searching a physic library in java and I've discover your porting effort.
I've played a bit with JBullet, and you have done a very good work so far.

Thanks Smiley

Your last post answer partially my current question : have you a comparison between Bullet and JBullet for features ported or not ?

I might create one later, currently the best is to compare which classes are or are not implemented.

For my project I'll need motors, so I think I'll port DynamicControlDemo if you have not started with it ?

No I didn't, there are many demos which are not particular priority for me, would be nice if you help me port some of them, like this one Smiley
Offline LvR

Senior Newbie





« Reply #53 - Posted 2008-03-12 08:54:55 »

Ok, I'll start with DynamicControlDemo  Wink
Offline LvR

Senior Newbie





« Reply #54 - Posted 2008-03-12 14:22:30 »

It almost works, but I've a small bug : my joints are not correctly positionned.

As I discover the vecmath api, I don't know if my port is correct for the following line :

1  
localB = m_bodies[1+2*i]->getWorldTransform().inverse() * m_bodies[0]->getWorldTransform() * localA; 


in this :
1  
2  
3  
tmpTrans.inverse(bodies[1+2*i].getWorldTransform());
tmpTrans.mul(tmpTrans, bodies[0].getWorldTransform());
localB.mul(tmpTrans, localA);
Offline jezek2
« Reply #55 - Posted 2008-03-12 14:54:06 »

It almost works, but I've a small bug : my joints are not correctly positionned.

As I discover the vecmath api, I don't know if my port is correct for the following line :

1  
localB = m_bodies[1+2*i]->getWorldTransform().inverse() * m_bodies[0]->getWorldTransform() * localA; 


in this :
1  
2  
3  
tmpTrans.inverse(bodies[1+2*i].getWorldTransform());
tmpTrans.mul(tmpTrans, bodies[0].getWorldTransform());
localB.mul(tmpTrans, localA);


Seems fine to me. The second line can use one-parameter mul() but it doesn't hurt either.

The bug will be probably elsewhere, as a hint I can provide list of common bugs I encountered when porting:
- accidentally changed reference of Vector3f/etc field, instead of value by calling set(), that's the reason for finals everywhere Smiley
- when removing the "m_" prefix of C++ members, I sometimes aliased it with parameter and it wasn't working (obviously)
- subconsciously treated order of operands for multiply freely changeable, but that doesn't work for matrices/transforms (that's one of hidden consequences of operator overloading)

If you don't catch the error, you can send me the files, and I can look into it. It can be also bug in JBullet itself, not all code is covered by demos or tested.
Offline LvR

Senior Newbie





« Reply #56 - Posted 2008-03-12 15:40:22 »

I've check for these common bugs but I don't find what happens
I send you the files on your email.
Offline jezek2
« Reply #57 - Posted 2008-03-12 15:59:46 »

I've check for these common bugs but I don't find what happens
I send you the files on your email.

I just tested it, and it looks really good, both demo and source code Smiley

Now I must just find the bug... Wink
Offline jezek2
« Reply #58 - Posted 2008-03-13 08:34:38 »

I've check for these common bugs but I don't find what happens
I send you the files on your email.

Found the bug, it's on line 123 of TestRig.java, where QuaternionUtil.setRotation must be used instead of direct assign to quaternion fields. This fixed the position problem. There is another bug though, the simulation exhibits some jerkiness, I'll be investigating it further.
Offline LvR

Senior Newbie





« Reply #59 - Posted 2008-03-13 10:21:56 »

OK, thank you very much.
I've just found that the rotation matrix wasn't good, but i didn't go further.
Pages: 1 [2] 3 4 ... 6
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (16 views)
2014-07-24 01:59:36

Riven (16 views)
2014-07-23 21:16:32

Riven (14 views)
2014-07-23 21:07:15

Riven (16 views)
2014-07-23 20:56:16

ctomni231 (43 views)
2014-07-18 06:55:21

Zero Volt (40 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (36 views)
2014-07-16 23:30:00

Cero (51 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!