Designing a Java3D physics engine.

Hi all,

I am just doing some research into making a physics engine for java3D. Unfortunately I have no real idea how to get started! Here are a few of my queries blurted out in random order:
How would a potential physics engine fit into the java3D API? Would I need to write my own animation loop, collision detection system? Where (design) would I build my physics bits e.g. dynamics and kinematic solvers. I would love to seem some sort of high level picture of how all these things would fit together. A lot of physics SDKs talk of being middleware and running on top of a games engine, what is the distribution of tasks bewteen these two? What sort of features could I hope to include and standard and what features should I apire too (i.e. new techniques and ideas that are probably tricky to implement).
Sorry if all these questions seem silly but I have only just started looking into this and I’m just looking for some sort of guidance and direction. Any relevant texts or links would be greatly appreciated(and ideas).

Thanks Martin

I see that some of you people are discussing porting ODE to Java. I would like to create something similar to ODEs features but not to port it directly. Am I right in thinking that ODE does not follow an object orientated design and therefore would be better to redesign from the ground up but utilising the same physics / mathematics algorithms?

P.S. I am a final year uni student who has been given the task of writing a physics engine for gaming use and possibly for simulation use.

Yes that was my point, too, but I think we decided to port the physics stuff one to one, but design it OO (that’s why we call it JOODY - Java Object Oriented Dynamics Engine)

As it seems you have some knowledge about all this physics stuff, so it would be nice, if you could take part in the project - then you clould also improve stuff in the port, that you think are bad or where you know something better. We haven’t started yet, so ideas about the design are also welcome.

Arne

Hi,

Here is the best paper I found for collision detection:

Bruno

NB: I used it as a base for 3DzzD collision algorithm.

Don’t you want to contribute and create the JOODE physic engine with us, and we’ll do a Java3D binding/compatibility layer ? I think it’s a lot better, because of doing 2 different physics engines we could do one better, joining our competences…

IMHO the 3D renderer and Physics engine need not have anything to do with each other.

This is the design of Odejava - and you can use it right now with Java3D.

Will.

[quote]Am I right in thinking that ODE does not follow an object orientated
[/quote]
ODE is object orientated. They just provide a C interface to it so that it can be used without a c++ dependancy.

I wanted to do collision like http://citeseer.csail.mit.edu/cache/papers/cs/1044/ftp:zSzzSzftp.cs.unc.eduzSzpubzSzuserszSzgottschazSzobbt.pdf/gottschalk96obbtree.pdf

ODE is based around this paper http://delivery.acm.org/10.1145/200000/192168/p23-baraff.pdf?key1=192168&key2=9026338211&coll=GUIDE&dl=GUIDE&CFID=54369181&CFTOKEN=36983520

I hope you can access them. It might be that I have access becuase my uni is a subscriber. Let me know.

William is right, you don’t want your graphics functionality with your physics engine. To link the graphical functionality to the physics engine you need each graphical representation to be hanging of a transform group. After the physics engine has done a timestep you update all transform groups with the new positional information extracted from the physics engine model. Thats about it really.

PS if you are implementing a collision system then seperate that as well from the rigid body functionality, and then erm, contribute it to us! Or join the team.

Shawn Kendall at IMI is writing a Java3D oriented physics system right now.
It differ from the ODE approach in many ways, one key way being you dont need to maintain a seperate physics hirearchy.

if you can get his attention hes probably the best person to answer questions for you.